On Thu, 31 Mar 2005 14:46:18 +0100, Steve Hay <[EMAIL PROTECTED]> wrote:
> I was about to commit the attached patch to add support for
> USE_SITECUSTOMIZE to the Win32 makefiles, but it doesn't seem to be working.
Thanks for that. I already more or less talked Steve Peters into doing that.
> Have I done everything that I need to do?
>
> Running "perl -V" shows "-DUSE_SITECUSTOMIZE" in the "cflags" and
> "USE_SITECUSTOMIZE" in the "Compile-time options". "perl
> -V:usesitecustomize" says "define".
That was all I took care about. I tested the working of the flag being set. I
never tested anything beyond that point.
> 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?
>
> If that's OK then why is the script not being run?
>
> - Steve
--
H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using Perl 5.6.2, 5.8.0, 5.8.5, & 5.9.2 on HP-UX 10.20, 11.00 & 11.11,
AIX 4.3 & 5.2, SuSE 9.1 & 9.2, and Cygwin. http://www.cmve.net/~merijn
Smoking perl: http://www.test-smoke.org, perl QA: http://qa.perl.org
reports to: [EMAIL PROTECTED], [email protected]