Modifying @INC
From: Perldiscuss - Perl Newsgroups And Mailing Lists (shahj_at_india.hp.com)
Date: 07/29/04
- Next message: Kamal Gupta: "RE: Modifying @INC"
- Previous message: Randy W. Sims: "Re: Keeping track of a variable"
- Next in thread: Kamal Gupta: "RE: Modifying @INC"
- Maybe reply: Kamal Gupta: "RE: Modifying @INC"
- Reply: Prasanna Kothari: "Re: Modifying @INC"
- Maybe reply: Bob Showalter: "RE: Modifying @INC"
- Maybe reply: Kamal Gupta: "RE: Modifying @INC"
- Reply: Joshua Colson: "Re: Modifying @INC"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Jul 2004 05:14:45 -0000 To: beginners@perl.org
I want to add some paths to the @INC array to resolve certain package
names at runtime.
One of the methods is: "push(@INC,$path) or unshift($path,@INC)" and then
say "require package_name;".
the problem with this is that we still need to use the "::" operator with
the symbols to resolve the package namespace.
eg: package_name::test_sub();
The other method that I came across was to use the PERL5LIB/ PERLLIB
environment variable. This actually needs us to create an OS level env
variable, which I would like to avoid.
Apart from these is there a method that can modify @INC at runtime.
- Next message: Kamal Gupta: "RE: Modifying @INC"
- Previous message: Randy W. Sims: "Re: Keeping track of a variable"
- Next in thread: Kamal Gupta: "RE: Modifying @INC"
- Maybe reply: Kamal Gupta: "RE: Modifying @INC"
- Reply: Prasanna Kothari: "Re: Modifying @INC"
- Maybe reply: Bob Showalter: "RE: Modifying @INC"
- Maybe reply: Kamal Gupta: "RE: Modifying @INC"
- Reply: Joshua Colson: "Re: Modifying @INC"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|