Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Strawberry Perl: my @INC gets/is destroyed on XP after some days

by karlgoethebier (Abbot)
on Aug 23, 2015 at 15:30 UTC ( [id://1139585]=perlquestion: print w/replies, xml ) Need Help??

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

Hi all,

last week i observed that @INC "gets destroyed" on my old XP box.

That means @INC contains /usr/local/lib/bla... "after a while". Really weird.

I fixed it twice with reinstall and repair.

I'm a bit surprised and perplexed.

Thank you very much for any hint on how to continue and for further investigations.

Update: Thank you very much BrowserUk, syphilis, Laurent_R, planetscape, Athanasius and Anonymous Monk for giving advice.

I think i'll try a portable edition of Strawberry, as Athanasius suggested. And I'll keep you up to date about my efforts.

Update2: I checked out the portable edition and now everything works. Thanks to all.

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Replies are listed 'Best First'.
Re: Strawberry Perl: my @INC gets/is destroyed on XP after some days
by Laurent_R (Canon) on Aug 23, 2015 at 18:53 UTC
    Are you also using Cygwin? Could it be that you have two versions of Perl (including related utilities) conflicting?

    On one PC at home, I have Perl for both Windows (Strawberry) and Cygwin and I don't think that I ever had any such problems, and I don't see it very likely, but it might happen sometimes, who knows? At least the symptoms you are reporting (with Unix path types) give the impression that it could be something like this.

    Update: I had not seen your answer saying that you are also running Cygwin when I wrote this post asking the question. I was disturbed by a phone call when writing this and I did not think about refreshing the thread before posting. Sorry for asking somewhat obsolete questions.

Re: Strawberry Perl: my @INC gets/is destroyed on XP after some days
by planetscape (Chancellor) on Aug 23, 2015 at 19:52 UTC

    I must concur with those pointing the finger at Cygwin. On every box on which I've had Cygwin Perl and another, ActiveState, Strawberry, what-have-you, I've ended up with strangely intermixed Perls. The problem usually (seems to) begin with CPAN working directories being conflated.

    Good luck. Please keep us posted if you find a solution.

    HTH,

    planetscape
Re: Strawberry Perl: my @INC gets/is destroyed on XP after some days ( %ENV )
by Anonymous Monk on Aug 23, 2015 at 21:58 UTC

    Do some diagnostics

    perl -V > perl-V-before-when-its-good.txt

    perl -V > perl-V-after-when-its-bad.txt

    Share that information with us, compare that information, trace down the culprit that is setting those %ENV vars, then clear them

Re: Strawberry Perl: my @INC gets/is destroyed on XP after some days
by BrowserUk (Patriarch) on Aug 23, 2015 at 16:35 UTC

      No, not really. I'm not using it with *nix-style paths in @INC.

      But 'after a while' i get *nix-style paths in @INC.

      I noticed it first after firing up my emacs shortcut for shell-comand-on-region for perltidy and emacs told me that something went wrong.

      Examining @INC the usual way (like perl -E 'say for @INC;') shows these *nix-style paths.

      Well, i have also cygwin installed on my box. But i run Strawberry Perl from cmd.

      Best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

        i have also cygwin installed on my box.

        That is almost certainly the source of your problem. Somehow your two perl installs are interacting.

        I don't have any details for you -- I gave up on cygwin within days of the first time I installed it 12+ years ago -- but that's where you need to look.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
        In the absence of evidence, opinion is indistinguishable from prejudice.
        I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!
        Examining @INC the usual way (like perl -E 'say for @INC;') shows these *nix-style paths

        This would almost certainly indicate that the PATH environment variable is currently set such that the first perl.exe to be located is Cygwin's, not Strawberry's.
        Next time this happens, run PATH to see what that environment variable actually contains ... and then try to work out why it changed.

        Cheers,
        Rob
Re: Strawberry Perl: my @INC gets/is destroyed on XP after some days
by Athanasius (Archbishop) on Aug 24, 2015 at 07:35 UTC

    Hello karlgoethebier,

    As others have said, it looks like a conflict between your Cygwin and Strawberry Perls. If so, why not switch to a portable edition of the latter? See http://strawberryperl.com/releases.html. I’ve always found the “PortableZIP editions” to be excellent.

    You fire up your portable edition from a command prompt via portableshell.bat, and the environment variables, etc., are automatically set to their correct values for this particular Perl version. You can run multiple versions on your system in this way without any problems — in parallel, if you like, with no conflicts.

    Just a thought,

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1139585]
Approved by Athanasius
Front-paged by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-26 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found