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

Just to satisfy my curiosity: I have installed on my Windows system ActiveState Perl 5.8.8, and Cygwin with Perl 5.10.1. On a cmd.exe shell, perl -V displays:

@INC: C:/Perl588_822/site/lib C:/Perl588_822/lib .
which is exactly what I expect. In a Cygwin bash shell, perl -V displays:
@INC: /usr/lib/perl5/5.10/i686-cygwin /usr/lib/perl5/5.10 /usr/lib/perl5/site_perl/5.10/i686-cygwin /usr/lib/perl5/site_perl/5.10 /usr/lib/perl5/vendor_perl/5.10/i686-cygwin /usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .
The funny part are the two directories mentioning Perl 5.8. Neither do they exist, nor do I think that they appear as side-effect from my 5.8.8 installation (which was already present at the time when I installed Cygwin Perl), because the version number says 5.8, not 5.8.8.

These extra directories in the @INC path don't harm, but I'm curious to know where they come from.

If someone reading this, happens to have installed Cygwin Perl 5.10.1, could you please check your @INC and let me know whether you have these directories too?
-- 
Ronald Fischer <ynnor@mm.st>

Replies are listed 'Best First'.
Re: Cygwin Perl: Question about default @INC
by mr.nick (Chaplain) on Jan 09, 2012 at 13:52 UTC
    Yep, I have them too and I don't have any other version of perl installed other than the Cygwin one:
    $ perl -V Summary of my perl5 (revision 5 version 10 subversion 1) configuration +: Platform: osname=cygwin, osvers=1.7.5(0.22553), archname=i686-cygwin-thread- +multi-64int uname='cygwin_nt-5.1 reini 1.7.5(0.22553) 2010-04-12 19:07 i686 cy +gwin ' Built under cygwin Compiled at Aug 28 2010 20:17:29 %ENV: CYGWIN="" @INC: /usr/lib/perl5/5.10/i686-cygwin /usr/lib/perl5/5.10 /usr/lib/perl5/site_perl/5.10/i686-cygwin /usr/lib/perl5/site_perl/5.10 /usr/lib/perl5/vendor_perl/5.10/i686-cygwin /usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .

    mr.nick ...

Re: Cygwin Perl: Question about default @INC
by Eliya (Vicar) on Jan 09, 2012 at 16:00 UTC

    Those @INC directories are set at build time (so I suppose you didn't build the perl binary yourself).  And the Configure default is to include (compatible) directories of other Perl installations found on the build system.  See INSTALL (Coexistence with earlier versions...).

Re: Cygwin Perl: Question about default @INC
by Marshall (Canon) on Jan 09, 2012 at 16:24 UTC
    I used to have different Perl versions between Cygwin and MS Windows. Cygwin was at Perl 5.8 and Windows was at 5.10.1.

    Along the way, I hit some button that upgraded Cygwin and the result appears to be that both are at Perl 5.10.1

    I don't know how to explicitly maintain different versions.
    The Cygwin upgrade apparently figured out that I had a more recent Perl and it used it. How and why? I don't know. But that appears to be what happened.

    C:\Projects>perl -V Set up gcc environment - 3.4.5 (mingw-vista special r3) Summary of my perl5 (revision 5 version 10 subversion 1) configuration +: .... Locally applied patches: ActivePerl Build 1007 [291969] 0abd0d disable non-unicode case insensitive trie matching Built under MSWin32 Compiled at Jan 26 2010 23:15:11 @INC: C:/Perl/site/lib C:/Perl/lib . C:\Projects>bash bash-3.2$ perl -V Set up gcc environment - 3.4.5 (mingw-vista special r3) Summary of my perl5 (revision 5 version 10 subversion 1) configuration +: .... Locally applied patches: ActivePerl Build 1007 [291969] 0abd0d disable non-unicode case insensitive trie matching Built under MSWin32 Compiled at Jan 26 2010 23:15:11 @INC: C:/Perl/site/lib C:/Perl/lib . bash-3.2$
      These are both ActiveState Perls.
        Yes. I understand that.

        The system didn't start out that way.

        The sequence was :
        (1) install Active State Perl (Perl 5.6)
        (2) install Cygwin (Perl 5.8)
        (3) upgrade Active State (to Perl 5.10)
        (4) upgrade Cygwin (changed Perl installation to AS Perl 5.10)

        What happened appears to be that the upgrade of Cygwin used the upgrade of Active State Perl.

        I'm not saying that I have the "answer". I am just presenting some "weird stuff" that I've personally seen re: Cygwin.