
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] Non-standard Perl Module Locations
> For example, the ruby code is pretty
> simple:
>
> d = QAM.dirs
> $LOAD_PATH.unshift(d.rubylib_sitearch)
> $LOAD_PATH.unshift(d.rubylib_site)
> $LOAD_PATH.unshift(d.rubylib_arch)
> $LOAD_PATH.unshift(d.rubylib)
> ENV['PATH'] = d.release('bin') + ':' + ENV['PATH']
Almost identical with perl, just manipulate the @INC array.
unshift @INC, $d->perllib_sitesearch();
unshift @INC, $d->perllib_site();
See what perl uses by default for library paths
perl -e "print join(\"\\n\",@INC);"
Similarly the %ENV hash is tied to the process environment.
You could use the Env module to make manipulating path strings easier too.
perldoc Env
Home |
Main Index |
Thread Index