develooper Front page | perl.perl5.porters | Postings from August 2009

Re: help wrt old perl versions @INC

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
August 8, 2009 04:04
Subject:
Re: help wrt old perl versions @INC
Message ID:
20090808110440.GF60303@plum.flirble.org
On Sat, Aug 08, 2009 at 11:51:45AM +0200, Rafael Garcia-Suarez wrote:
> 2009/8/8 Jerome Quelin <jquelin@gmail.com>:
> > hi,
> >
> > i just compiled 5.10.1-rc1 for mandriva, and it seems to work fine.
> 
> >From the rpm specfile ? I think the spec file solves all of this; at
> least it did back in time for the 5.8.x series.
> 
> > however, since we ship lots of modules that are not yet rebuild with the
> > new perl, i want @INC to include the 5.10.0 @INC.
> >
> > i used the following command to configure:
> >
> > sh Configure -des \
> >  -Dinc_version_list="5.10.0 5.8.8 5.8.7 5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0 5.6.1 5.6.0" \
> >  ...
> >
> >
> > however, the resulting perl has the following @INC:
> >    /usr/lib/perl5/site_perl/5.10.1/x86_64-linux-thread-multi
> >    /usr/lib/perl5/site_perl/5.10.1
> >    /usr/lib/perl5/vendor_perl/5.10.1/x86_64-linux-thread-multi
> >    /usr/lib/perl5/vendor_perl/5.10.1
> >    /usr/lib/perl5/5.10.1/x86_64-linux-thread-multi
> >    /usr/lib/perl5/5.10.1
> >    /usr/lib/perl5/site_perl
> >    /usr/lib/perl5/vendor_perl/5.10.0
> >    /usr/lib/perl5/vendor_perl
> 
> Do the other directories exist ? Configure will only include
> directories it can find.

From reading Configure and some experimentation, Configure takes an explict
-Dinc_version_list as gospel, and won't bother trying to scan for the them
in this case.

However, the directories *do* have to exist at run time, else they aren't
added to @INC. So, I see this:

  @INC:
    lib
    /usr/local/lib/perl5/site_perl/5.11.0/x86_64-linux
    /usr/local/lib/perl5/site_perl/5.11.0
    /usr/local/lib/perl5/5.11.0/x86_64-linux
    /usr/local/lib/perl5/5.11.0
    /usr/local/lib/perl5/site_perl
    .

but

$ ./perl -Ilib -V:inc_version_list
inc_version_list='5.10.0 5.8.8 5.8.7 5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0 5.6.1 5.6.0';

which shows that Configure remembered the list passed in, and the perl binary
knows about it

(As I am not root on that machine, I can't create them to demonstrate that
once they exist they will be pushed into @INC)

Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About