develooper Front page | perl.perl5.porters | Postings from October 2007 documentation.

Thread Next
Michael G Schwern
October 24, 2007 06:07
Subject: documentation.
Message ID:
The docs for 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}/ at startup.

            Perl can be built so that it by default will try to execute
            $Config{sitelib}/ 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?!

               ...blah blah blah...

               This variable could be set in the file to
               configure the local Perl installation to use "sloppy" stat() by
               default.  See perlrun for more information about site

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}/" ) {
		require $Config{sitelib}/";

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 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About