SPUG: add a path to @INC
C.J. Collier
cjcollier at colliertech.org
Sun Jan 16 18:12:19 PST 2005
Note that if you want to use C<@INC> to C<use()> modules, I believe you
need to put the C<use lib '...';> in a C<BEGIN { ... }> block, thus:
=pod
BEGIN {
use lib '/foo/bar/baz';
}
use Wally;
=cut
I could be wrong, though. Whee.
On Jan 7, 2005, at 9:13 AM, Andrew Sweger wrote:
> On Fri, 7 Jan 2005, Sachin Chaturvedi wrote:
>
>> i want to modify my @INC and want to add the path /pkg/perl5plus/lib
>> in that . can i get any help in this issue.
>
> In a Perl script or module:
>
> use lib '/pkg/perl5plus/lib';
>
> For a one-liner:
>
> perl -I/pkg/perl5plus/lib -e '...'
>
> For more information:
>
> perldoc lib
>
> --
> Andrew B. Sweger -- The great thing about multitasking is that several
> things can go wrong at once.
>
>
> _____________________________________________________________
> Seattle Perl Users Group Mailing List
> POST TO: spug-list at mail.pm.org
> SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
> MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med
> WEB PAGE: http://seattleperl.org/
>
More information about the spug-list
mailing list