Steve Hay <[EMAIL PROTECTED]> writes:

> I've created a script called sitecustomize.pl in c:\perl\site\lib (which 
> is the path output by "perl -V:sitelibexp"), but the script doesn't seem 
> to be getting run.  For example, if I have
> 
>     print STDERR "Hello, world.\n";
> 
> in the script, then I would expect to see that message output when I run 
> "perl -e 1", but this doesn't happen.
> 
> I walked through S_parse_body() in a debugger and the new chunk of code 
> there is being run:
> 
> #ifdef USE_SITECUSTOMIZE
>     if (!minus_f) {
>     if (!PL_preambleav)
>         PL_preambleav = newAV();
>     av_unshift(PL_preambleav, 1);
>     (void)av_store(PL_preambleav, 0, Perl_newSVpvf(aTHX_ "BEGIN { do 
> '%s/sitecustomize.pl' }", SITELIB_EXP));
>     }
> #endif
> 
> The only strange thing that I noticed is that SITELIB_EXP, as returned 
> by PerlEnvSiteLibPath(), was ";C:/perl/site/lib".  Is that leading 
> semi-colon to be expected?

I did certainly not expect the leading ";" to be there.  I think that
explains why it does not work on this platform.  I never tried to
enable SITECUSTOMIZE on Win32 before.

--Gisle

Reply via email to