Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: strawberry perl library path?

by adrive (Scribe)
on Apr 17, 2008 at 03:23 UTC ( #680998=note: print w/replies, xml ) Need Help??


in reply to strawberry perl library path?

but...i can't possibly change all my shebangs of my existing projects just because strawberry is hardcoded to a path. (not sure bout hardcoded..but there should be a way to change the path?)

Replies are listed 'Best First'.
Re^2: strawberry perl library path?
by GrandFather (Sage) on Apr 17, 2008 at 04:06 UTC

    For various internal reasons Strawberry Perl's install path is fixed. However Windows pretty much ignores the shebang line so the path given there doesn't matter.

    Probably your best solution is to use the right click 'open with' menu option in the explorer on a .pl file and associate Strawberry Perl's executable path ('C:\strawberry\perl\bin\perl.exe') with the .pl extension.


    Perl is environmentally friendly - it saves trees
      Windows pretty much ignores the shebang line

      But I think apache takes notice of it and expects it to be correct.

      Cheers,
      Rob
        and you can config apache to ignore shebang, or merely hard link /usr/bin/perl to your real perl
Re^2: strawberry perl library path?
by syphilis (Bishop) on Apr 17, 2008 at 04:22 UTC
    First up, don't worry about the LIB and INCLUDE environment variables. They don't do anything for Strawberry Perl anyway.

    1) Copy everything that's in the C:\strawberry\perl folder to C:\usr. Update: This doesn't mean that you simply copy that "perl" folder into C:\usr - that would result in the wrong directory structure for #!/usr/bin/perl to be pertinent. Instead you copy the folders that are in C:\strawberry\perl (namely bin, site and lib) into the C:\usr folder.
    2) Rename C:\strawberry\perl to C:\strawberry\perl_hide so that it never gets loaded by mistake. You could delete it entirely if you're happy to burn your bridges.
    3) In C:\usr\lib\Config.pm and C:\usr\lib\Config_heavy.pl change every occurrence of C:\strawberry\perl to C:\usr
    4) Amend your path to include C:\usr\bin instead of C:\strawberry\perl\bin.

    Afaik, that should be all you need do ... except that I don't how CPAN is affected. (I still install modules by the older, unautomated procedure, and don't use CPAN.)

    Cheers,
    Rob
      LIB and INCLUDE are needed for installing CPAN modules that include XS. They have no impact otherwise.

      The PATH variable is the only one that matters at run-time.

      Also, instead of installing the strawberry executable, if you are moving things around, you might want to look at the zip archive instead of the installer.
        LIB and INCLUDE are needed for installing CPAN modules that include XS

        I can find no evidence of that - but it's something that can easily be settled. If the LIB and INCLUDE environment variables are cleared (set LIB= and set INCLUDE=) what gets broken ?

        I've been running Strawberry with those variables unset for over a year (during which time I've installed numerous extensions) without any problems at all.

        I've also tried adding to the search paths via the LIB and INCLUDE variables, but any aditional paths that are included in those variables are simply ignored. Afaict neither Strawberry Perl nor the MinGW installation that ships with it take any notice whatsoever of LIB and INCLUDE.

        Can you provide some evidence to the contrary ?

        Cheers,
        Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://680998]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2020-06-01 14:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (2 votes). Check out past polls.

    Notices?