develooper Front page | perl.perl5.porters | Postings from December 2010

Where should dual-life modules from CPAN be installed?

Thread Next
From:
David Golden
Date:
December 27, 2010 03:51
Subject:
Where should dual-life modules from CPAN be installed?
Message ID:
AANLkTimQz+OrH35K2rHdE=MqruvySKeHQwkphGO8+cfx@mail.gmail.com
Historically, dual-life modules added to core had logic like this in
their Makefile.PL or Build.PL:

  installdirs   => ($] >= 5.009004 ? 'core' : 'site'), # Build.PL style

(That is from Module::Build, which was added to core in 5.10.)

Now that 5.12 re-orders @INC to put site libraries before core
libraries, should all dual life modules be installed to 'site' for
Perl >= 5.012?

Roughly speaking, I think that would mean the logic should be:

  installdirs => ($] ge $when_added_to_core && $] lt '5.012' ? 'core' : 'site' )

(with my preference for string comparison to avoid 64-bit decimal
equality comparison issues)

Does that make sense?

If so, dual-life maintainers, please double check your Makefile.PL or Build.PL

-- David

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