Skip Menu |

This queue is for tickets about the Errno CPAN distribution.

Report information
The Basics
Id: 24822
Status: open
Priority: 0/
Queue: Errno

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: (no value)
Fixed in: (no value)



Subject: Errno is shadowed by core version
Errno is part of the perl core as of 5.8.1. The CPAN version will be shadowed by the core version as the core library paths, by default, will come before the site paths. Users can work around this, if they happen to notice the install did not take, by using "make install UNINST=1" but that can have unexpected consequences if used widely and is not encouraged. To avoid the shadowing problem Errno should install itself to the core library path by default for those versions of Perl which ship with Errno. This is done by passing the following to WriteMakefile(). INSTALLDIRS => ($] >= 5.008001 ? 'perl' : 'site')
On Tue Feb 06 13:09:31 2007, MSCHWERN wrote: Show quoted text
> Errno is part of the perl core as of 5.8.1. The CPAN version will be > shadowed by the core version as the core library paths, by default, will > come before the site paths. Users can work around this, if they happen > to notice the install did not take, by using "make install UNINST=1" but > that can have unexpected consequences if used widely and is not
encouraged. Show quoted text
> > To avoid the shadowing problem Errno should install itself to the core > library path by default for those versions of Perl which ship with > Errno. This is done by passing the following to WriteMakefile(). > > INSTALLDIRS => ($] >= 5.008001 ? 'perl' : 'site')
There is another problem here, as well. In core, Errno.pm is installed in $Config{archlibexp}, but the above will put it in $Config{privlibexp}. Therefore I added 'use Config', and added the following to WriteMakefile(): INSTALLDIRS => 'perl', INSTALLPRIVLIB => $Config{archlibexp}, To conditionalize it as above, I guess you'd need: INSTALLDIRS => ($] >= 5.008001 ? 'perl' : 'site'), INSTALLPRIVLIB => ($] >= 5.008001 ? $Config{archlibexp} : $Config{sitelibexp}),
--- Errno-1.10/Makefile.PL 2006-12-27 09:32:26.000000000 -0500 +++ Errno-1.10/Makefile.PL.patched 2007-02-09 08:01:36.000000000 -0500 @@ -1,5 +1,7 @@ use ExtUtils::MakeMaker; +use Config; + @MAN3PODS = ($^O eq 'VMS' or grep { /PERL_CORE=1/ } @ARGV) ? (MAN3PODS => {}) : (); WriteMakefile( @@ -13,6 +15,8 @@ SUFFIX => '.gz', DIST_DEFAULT => 'd/Errno.pm tardist', }, + INSTALLDIRS => ($] >= 5.008001 ? 'perl' : 'site'), + INSTALLPRIVLIB => ($] >= 5.008001 ? $Config{archlibexp} : $Config{sitelibexp}), @MAN3PODS, );