Hello All,
I have a perl script which has
(assuming BAR.pm is in /tmp/foo/)
BEGIN {
push @::INC , /tmp/foo;
# use BAR; # Does not work
require BAR; # Works fine
}
Can I get to use 'use' instead of require any how
Thanx
Ram
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
append @INC before use module
Hello All,
I have a perl script which has
(assuming BAR.pm is in /tmp/foo/)
BEGIN {
push @::INC , /tmp/foo;
# use BAR; # Does not work
require BAR; # Works fine
}
Can I get to use 'use' instead of require any how
Thanx
Ram
Ramprasad A Padmanabhan wrote:
Hello All,
I have a perl script which has
(assuming BAR.pm is in /tmp/foo/)
BEGIN {
push @::INC , /tmp/foo;
# use BAR; # Does not work
require BAR; # Works fine
}
Can I get to use 'use' instead of require any how
Thanx
Ram
On Mon, Sep 30, 2002 at 11:25:32AM -0700, david wrote:
what sort of error message do you get? assume i have: /home/david/perl/A.pm,
the following works for me:
BEGIN{
push @INC, '/home/david/perl';
use A;
}
Are you sure?
Remember that . is in @INC by default.
In
Paul Johnson wrote:
Remember that . is in @INC by default.
sorry, i use this only as an example
In this case you want the use statement after the BEGIN block.
But really you want use lib. It goes back to before anything that
anyone should reasonably be using now.
agree. there