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

Re: deprecating Switch.pm

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
March 4, 2009 13:57
Subject:
Re: deprecating Switch.pm
Message ID:
20090304215647.GP81285@plum.flirble.org
On Wed, Mar 04, 2009 at 01:21:32PM -0800, Michael G Schwern wrote:
> Rafael Garcia-Suarez wrote:
> > 2009/2/28 Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>:
> >> I have a partial solution[0] but there is an obstacle. Here's the
> >> Makefile.PL of the CPAN version of Switch-1.14:
> >>
> >>  use ExtUtils::MakeMaker;
> >>  WriteMakefile(
> >>      NAME => q[Switch],
> >>      VERSION_FROM => q[Switch.pm],
> >>      PREREQ_PM => { 'Filter::Util::Call' => 0, 'Text::Balanced' => 0 },
> >>      INSTALLDIRS => $] >= 5.00703 ? 'perl' : 'site',
> >>  );
> >>
> >> For all modules that set INSTALLDIRS to 'perl' the installation simply
> >> overwrites the already installed Switch.pm or even refrains from doing
> >> it when the files are really identical. In such a case installing from
> >> CPAN with MakeMAker does not resolve the situation.
> >>
> >> Are you intending to demand that these distros be changed to always
> >> specify "site"?
> > 
> > Arguably, with the new layout, 'perl' is no longer necessary. Should
> > even MakeMaker attempt to install into 'perl' ?
> 
> I think I missed a memo.  What?

5.11's @INC order now has siteperl ahead of the core library:

  Compiled at Mar  4 2009 20:54:46
  @INC:
    /home/nick/Sandpit/snap5.9.x-GitLive-blead-731-ge74f3fd/lib/perl5/site_perl/5.11.0/x86_64-linux-thread-multi
    /home/nick/Sandpit/snap5.9.x-GitLive-blead-731-ge74f3fd/lib/perl5/site_perl/5.11.0
    /home/nick/Sandpit/snap5.9.x-GitLive-blead-731-ge74f3fd/lib/perl5/5.11.0/x86_64-linux-thread-multi
    /home/nick/Sandpit/snap5.9.x-GitLive-blead-731-ge74f3fd/lib/perl5/5.11.0
    .



This means that updates of dual life modules from CPAN need not go in "perl" -
if they install to "site" (like any other module) they'll be picked up first.

In fact, "need" is a bit weak - we don't really *want* them to go to "perl"
any more, because it violates the nice segregation the better @INC order gives
- nothing need touch the core's installed tree once it's been installed.


Hence why the question as to whether we should

a: patch the Makefile.PL of all dual life modules to have INSTALLDIRS be
   "site" for 5.11 onwards (and still "perl" for pre-5.11)

b: patch MakeMaker to politely ignore "perl" on 5.11 and later, and substitute
   "site"



That was the memo. An answer can wait until 5.12 is close.
(I'd like 5.12 to be close, but that's another story)

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