Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
PerlMonks equivalent on Starwberry Perl?

by exilepanda (Pilgrim)
on Jan 07, 2017 at 04:13 UTC ( #1179111=perlquestion: print w/replies, xml ) Need Help??

exilepanda has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks,

I mainly works with ActivePerl(Windows), and use to setup special machine based ENV variables, and sort of framework parameters declaration in Since it runs right before my "main" code is run, it suits my needs perfectly.

Now I am trying to use Strawberry, but I found there's no such under /site/lib. Is that anywhere in Strawberry can do the same trick ? Thanks in advance.

  • Comment on equivalent on Starwberry Perl?

Replies are listed 'Best First'.
Re: equivalent on Strawberry Perl?
by Athanasius (Bishop) on Jan 07, 2017 at 06:24 UTC

    Hello exilepanda,

    The obvious answer is to copy your existing file into the site/lib directory of your Strawberry distribution. But that will work only if the perl executable has been built with the appropriate compiler option, namely -DUSE_SITECUSTOMIZE (see the discussion of the -f flag in perlrun).

    Looking at the Strawberry Perls installed on my computer, and also at the various Release Notes under, the last Strawberry Perl executable I can find that was compiled with the -DUSE_SITECUSTOMIZE flag set is v5.12.3. I have no idea why the good folks at Strawberry began omitting that flag from version 5.14 onwards.

    Sorry, :-(

    Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

      I have no idea why the good folks at Strawberry began omitting that flag from version 5.14 onwards

      I don't know either but my assumption is that it would have been no longer deemed necessary.

      exilepanda, could you provide us with examples of the things that needs to set (and which Strawbeery Perl is failing to set) ?
      (Maybe there's a simple solution.)

        I am on 5.24. I will need sitecustomize for something like this :
        #1. export a global sharable variable require Exporter; our @ISA = qw/Exporter/; our @EXPORT = qw/%GV/; our %GV = (....); #2. add more Lib path push @INC, "D:/Lib/$ENV{SERVER_NAME}" if ($ENV{REMOTE_ADDR}) ; #3. define some dynamic path $ENV{MyData} = "D:/UsrData/Guest/"; $ENV{MyData} = "D:/UsrData/$ENV{USER}" if (length $ENV{USER});
        Though I got   -f    don't do $sitelib/ at startup from perl -h. But no different with/without it.
      Sigh.. Nailed! Have to fall back to Active State. Thank you very much for your help though.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1179111]
Approved by kevbot
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2020-02-24 01:38 GMT
Find Nodes?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?

    Results (104 votes). Check out past polls.