in reply to How to add a file to @INC path in perl
Files aren't added to @INC, directories are. For example, if Porter.pm was located in /home/ikegami/perl5/lib, I could do
use lib "/home/ikegami/perl5/lib"; use Porter;
Keep in mind that if the package is My::Porter you, should place the file in /home/ikegami/perl5/lib/My and use
use lib "/home/ikegami/perl5/lib"; use My::Porter;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How to add a file to @INC path in perl
by prafulltc (Acolyte) on Aug 31, 2011 at 07:24 UTC | |
by ikegami (Patriarch) on Aug 31, 2011 at 07:26 UTC | |
by DrHyde (Prior) on Aug 31, 2011 at 10:03 UTC | |
Re^2: How to add a file to @INC path in perl
by Kc12349 (Monk) on Aug 31, 2011 at 22:42 UTC |
In Section
Seekers of Perl Wisdom