List Info

Thread: sitecustomize.pl documentation.




sitecustomize.pl documentation.
user name
2007-10-24 08:07:04
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.

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)


-- 
On error resume stupid


Re: sitecustomize.pl documentation.
user name
2007-10-24 08:26:37
On Wed, 24 Oct 2007 09:07:04 -0400, Michael G Schwern
<schwernpobox.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
                        http
://www.goldmark.org/jeff/stupid-disclaimers/

AW: sitecustomize.pl documentation.
user name
2007-10-24 08:28:08

> -----Ursprüngliche Nachricht-----
> Von: Michael G Schwern [mailto:schwerngmail.com]Im Auftrag 
> von Michael
> G Schwern
> Gesendet: Mittwoch, 24. Oktober 2007 15:07
> An: Perl 5 Porters
> Betreff: sitecustomize.pl documentation.
> 
> 
> The docs for sitecustomize.pl seem a wee bit sparse. 

	yes, indeed

> 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?

	not really magical but END blocks from sitecustomize.pl
	are executed "very late".

> What are some examples of things to do with it?  (INC and 
> other global
> variables, anything else?)

	* prepare the environment for database drivers
	* set custom default signal handlers

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )