Can I append @INC before use module

2002-09-30 Thread Ramprasad A Padmanabhan
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]

RE: Can I append @INC before use module

2002-09-30 Thread NYIMI Jose (BMB)
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

Re: Can I append @INC before use module

2002-09-30 Thread david
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

Re: Can I append @INC before use module

2002-09-30 Thread Paul Johnson
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

Re: Can I append @INC before use module

2002-09-30 Thread david
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