On Windows 7, @INC contains *nix Paths

Posted by raf924 on 2018-03-02 09:38

Hello, I'm having an issue with a Windows instance of ActivePerl 5.24 x64.

As you can see, even though I'm on Windows, for some reason the @INC variable contains *nix paths.
I'm pretty sure that wasn't the case before but unfortunately I didn't take note of what I might have done that would change it.

Has anyone ever has such an issue before? What could be the cause and how could I fix it besides re-installing ActivePerl (which I can do but would rather not) ?

Please and thank you

ActiveState Staff
Fri, 2018-03-02 10:57

Restart the Perl interpreter interactively and check @INC before you run any of your scripts.

If the change does not appear until you run scripts, here are some things that scripts can do to change @INC during the current session:
- A "use lib" statement in your script or in one of the modules you are using can alter @INC.
- An ordinary "push" can add to @INC; it's just an array.

If the change to @INC survives a restart of Perl, and appears before any scripts run:
- Check for a PERL5LIB or PERLLIB env var getting set. These will alter @INC every time you start Perl.
- Look for a sitecustomize.pl or sitecustomize.pm in one of the Lib paths that Perl knows.

When you find the source, review where it comes from. The code might not be Windows compatible.