The docs for sitecustomize.pl seem a wee bit sparse. I didn't even know it
existed until I saw a bug about it go by here. It's mentioned once in perlrun
and once in perlvar. Both instances are incidental and unlikely to be found.
From perlrun, sitecustomize is mentioned as part of the flag to disable it.
−f Disable executing $Config{sitelib}/sitecustomize.pl at startup.
Perl can be built so that it by default will try to execute
$Config{sitelib}/sitecustomize.pl at startup. This is a hook that
allows the sysadmin to customize how perl behaves. It can for
instance be used to add entries to the @INC array to make perl
find modules in non‐standard locations.
From perlvar, it's mentioned as part of the ${^WIN32_SLOPPY_STAT} variable?!
${^WIN32_SLOPPY_STAT}
...blah blah blah...
This variable could be set in the sitecustomize.pl file to
configure the local Perl installation to use "sloppy" stat() by
default. See perlrun for more information about site
customization.
The first problem is where should proper docs for this thing go? perlrun
seems the best place as it contains all the other things which effect perl
startup (environment variables and switches).
The second problem is describing just what it does. At first glance you'd
expect it to be something like...
if( -r "$Config{sitelib}/sitecustomize.pl" ) {
require $Config{sitelib}/sitecustomize.pl";
}
What package is it in? (Appears to be main)
What if there's errors? (They appear to be silently discarded, $@ is not set)
What lexical scope? (Appears to be it's own)
How do you build perl so that sitecustomize.pl is used? (-Dusesitecustomize)
Is there anything else magical about it?
What are some examples of things to do with it? (@INC and other global
variables, anything else?)
How can I tell if it's been compiled in? ($Config{usesitecustomize})
--
On error resume stupid
Thread Next