[Pdx-pm] how to append to library path?

Tom Phoenix rootbeer at redcat.com
Mon Dec 15 22:35:02 CST 2003

On Mon, 15 Dec 2003, John Springer wrote:

> Now be gentle.

Maybe I should have put a smiley on my message, but I thought it was
redundant.  :-)

> At least one place where this a real pain is in a shared webserver
> environment, where you can't modify the binary, you can't easily change
> the ENV, and you can't alter the command line invocation.  So you're
> down to changing the source code. On every script.  Over and over.
> It's a nuisance, if nothing else.


> But it would surely be nice to have a default place in ~/ or ./ that
> perl would look in.

It's worth considering. I have to admit that I like the idea of having
Perl look _only_ in /etc/perl-config.pl or somesuch. (Sorry, but that
filepath would have to be spelled out at compile time. And don't ask me
what name it should be on Windows or something else.) That file could look
in user directories or not, at the administrator's option.

If somebody wants to add that feature to Perl (or talk somebody else into
doing so), try it out. But be sure to benchmark how much it slows down
every invocation when there's no config file, and how much when there's a
config file that looks in all of the likely places where config files live
on a given system. It's probably not much of a slowdown, but on small,
frequently-called programs (such as those on a webserver), it could double
the compilation time.

At least, that's what happens with the version of Perl that's installed in
my brain, but that one needs some patching anyway.


--Tom Phoenix

More information about the Pdx-pm-list mailing list