On Saturday, July 6, 2002, at 10:00 , John Almberg wrote:
> I have a related question . . . where does @INC come from? I guess there
> is
> a configuration file somewhere?
>
> -- John
more info available at perldoc perlvar
a quick deconstruction:
@: this is an array
INC: short for include
hence the array of thing we may need to go to for includes,
eg: all the default "-I<inc_dir>" stuff.
Try to remember that the
use FOO::BAR
merely 'reads the include' as it were and 'imports'
any reference to things in the FOO::BAR module....
As is noted - the base @INC is compiled into perl - and
there is a reasonably standard hierarchy about how things
should hang below that level.
As also noted the traditional ways of manipulating it are
a) the "use lib <token>;" pragma
b) the '-I<dir>' "command line" option
for fun tried to programme that in
#!/usr/bin/perl -I'<path_to_lib>' -w
but that did not work
c) set the Environmental variable LIB5PERL
which is useful if you find that you are installing
into non-standard directories such as
$ENV{HOME}/lib/perl
ciao
drieux
---
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]