On Wed, 24 Oct 2007 09:07:04 -0400, Michael G Schwern
<schwern pobox.com>
wrote:
> 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/sitecustomize.pl at startup.
>
> Perl can be built so that it by default
will try to execute
> $Config/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.
and in INSTALL:
=item USE_SITECUSTOMIZE
Run-time customization of INC can be enabled with:
sh Configure -Dusesitecustomize
Which will define USE_SITECUSTOMIZE and
$Config.
When enabled, make perl run
F<$sitelibexp/sitecustomize.pl> before
anything else. This script can then be set up to add
additional
entries to INC.
> 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/sitecustomize.pl" )
{
> require $Config/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)
>
>
--
H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/
)
using & porting perl 5.6.2, 5.8.x, 5.10.x on HP-UX
10.20, 11.00, 11.11,
& 11.23, SuSE 10.1 & 10.2, AIX 5.2, and Cygwin.
http://qa.perl.org
http://mirrors.de
velooper.com/hpux/ http://www.test-smoke.org
a>
http
://www.goldmark.org/jeff/stupid-disclaimers/
|