in reply to Re: Problem using -I argument with Perl
in thread Problem using -I argument with Perl
This worked as required and gave the following from the print C:\perl-programs\modules C:/perl5/lib C:/perl5/site/lib . I then tried to use a moudule in the new directory with a new line at the end of the code above ofuse strict "vars"; my $inc_item; use lib "C:\\perl-programs\\modules"; foreach $inc_item (@INC) { print "$inc_item\n"; }
However, this did not worked as I then got the following Can't locate modules/test.pm in @INC (@INC contains: C:\perl-programs\modules C: /perl5/lib C:/perl5/site/lib .) at C:\perl-programs\test-inc-iarg.pz line 13. BEGIN failed--compilation aborted at C:\perl-programs\test-inc-iarg.pz line 13. It seems that the lines are not processed in order so that it 'got' to theuse modules::test-module
before the use lib line even though this nearer the beginning. How can this be made to work?use modules::test-module
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Problem using -I argument with Perl
by rinceWind (Monsignor) on Jan 10, 2007 at 19:19 UTC | |
by merrymonk (Hermit) on Jan 11, 2007 at 08:16 UTC | |
|
Re^3: Problem using -I argument with Perl
by MaxKlokan (Monk) on Jan 11, 2007 at 09:16 UTC |