diff options
author | Yves Orton <demerphq@gmail.com> | 2012-12-10 09:43:59 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2013-03-19 00:23:10 +0100 |
commit | 2d4cc5ff33ebe4b3884fbc2b801d833c145cd946 (patch) | |
tree | 67def71c752fe97bd561c6eb3515a385e4b17a08 /cpan | |
parent | 1ac81c06ff5e50e413e5fe9197f48f1c986af8be (diff) | |
download | perl-2d4cc5ff33ebe4b3884fbc2b801d833c145cd946.tar.gz |
update ExtUtils-MakeMaker to github v6.65_01
Perl core specific highlights:
* Fix hash related issues for 5.18.
* Do not hard code the list of perl header files - discover them from disk instead
* Don't need completely different include file collector on VMS.
Diffstat (limited to 'cpan')
33 files changed, 375 insertions, 164 deletions
diff --git a/cpan/ExtUtils-MakeMaker/Changes b/cpan/ExtUtils-MakeMaker/Changes index 0abb6d11a1..8053dbc164 100644 --- a/cpan/ExtUtils-MakeMaker/Changes +++ b/cpan/ExtUtils-MakeMaker/Changes @@ -1,3 +1,26 @@ +6.65_01 + New Features + * Improvements perlcritic support. (M. Schwern) + * Improvements to dynamic linking for gcc (Tobias Leich) + [github #43] + * Change $(PERL_HDRS) from a hard coded list of headers to + reading install directory for available header files. Allows + us to work with any version of Perl properly. + (Yves Orton, Craig A. Berry) [github #47] + + Doc Fixes + * Numerous typo fixes. (Ben Bullock) + [github #33] [github #34] [github #35] + * Various FAQ and doc improvements (M. Schwern, Ivan Bessarabov) + [github #44] + + Bug Fixes + * fixes relating to hash ordering (Yves Orton) + [github #46] [rt.cpan.org #83441] [rt.perl.org #116857] + * fixes to Mksymlists (Ben Bullock, Yves Orton) + [github #48] [github #49] [github #51] + + 6.64 Sun Dec 16 18:27:40 PST 2012 Build Fixes * Update the home page in the meta file. makemaker.org has been diff --git a/cpan/ExtUtils-MakeMaker/MANIFEST b/cpan/ExtUtils-MakeMaker/MANIFEST index 74d6075f59..72feb7d3b7 100644 --- a/cpan/ExtUtils-MakeMaker/MANIFEST +++ b/cpan/ExtUtils-MakeMaker/MANIFEST @@ -1,3 +1,4 @@ +.perlcriticrc bin/instmodsh bundled/CPAN-Meta-YAML/CPAN/Meta/YAML.pm bundled/CPAN-Meta/CPAN/Meta.pm @@ -107,6 +108,7 @@ t/liblist/win32/__test.lib 't/liblist/win32/di r/dir_test.lib' t/liblist/win32/dir/dir_test.lib t/liblist/win32/double.lib +t/liblist/win32/imp.dll.a t/liblist/win32/lib/CORE/c_test.lib t/liblist/win32/lib/CORE/double.lib t/liblist/win32/lib__test.lib @@ -166,6 +168,3 @@ t/WriteEmptyMakefile.t t/writemakefile_args.t t/xs.t TODO -META.yml Module YAML meta-data (added by MakeMaker) -META.json Module JSON meta-data (added by MakeMaker) -SIGNATURE Public-key signature (added by MakeMaker) diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm index 3b35d8bf8e..219506a58b 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm @@ -10,7 +10,7 @@ our @ISA = qw(Exporter); our @EXPORT = qw(test_harness pod2man perllocal_install uninstall warn_if_old_packlist); -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; my $Is_VMS = $^O eq 'VMS'; @@ -99,7 +99,7 @@ sub pod2man { if( !eval { require Pod::Man } ) { warn "Pod::Man is not available: $@". "Man pages will not be generated during this install.\n"; - return undef; + return 0; } } require Getopt::Long; diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm index 71fef20f10..8ee87835ac 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm @@ -2,7 +2,7 @@ package ExtUtils::Liblist; use strict; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; use File::Spec; require ExtUtils::Liblist::Kid; diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm index 3feb4fc224..84a9662b20 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm @@ -11,7 +11,7 @@ use 5.006; use strict; use warnings; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; use ExtUtils::MakeMaker::Config; use Cwd 'cwd'; @@ -422,7 +422,8 @@ sub _win32_try_attach_extension { sub _win32_lib_extensions { my %extensions; $extensions{ $Config{'lib_ext'} } = 1 if $Config{'lib_ext'}; - $extensions{".lib"} = 1; + $extensions{".dll.a"} = 1 if $extensions{".a"}; + $extensions{".lib"} = 1; return [ keys %extensions ]; } diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm index ab8e8e8e8f..8a4df3ff5d 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm @@ -3,7 +3,7 @@ package ExtUtils::MM; use strict; use ExtUtils::MakeMaker::Config; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; require ExtUtils::Liblist; require ExtUtils::MakeMaker; diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm index 28e433642e..a53108f471 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm @@ -1,7 +1,7 @@ package ExtUtils::MM_AIX; use strict; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; require ExtUtils::MM_Unix; our @ISA = qw(ExtUtils::MM_Unix); diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm index 73ce2498dc..a6062a6a3d 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm @@ -1,7 +1,7 @@ package ExtUtils::MM_Any; use strict; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; use Carp; use File::Spec; @@ -1332,7 +1332,7 @@ sub _mymeta_from_meta { }; last if $meta; } - return undef unless $meta; + return unless $meta; # META.yml before 6.25_01 cannot be trusted. META.yml lived in the source directory. # There was a good chance the author accidentally uploaded a stale META.yml if they @@ -1341,7 +1341,7 @@ sub _mymeta_from_meta { $meta->{generated_by} =~ /ExtUtils::MakeMaker version ([\d\._]+)/) { my $eummv = do { local $^W = 0; $1+0; }; if ($eummv < 6.2501) { - return undef; + return; } } @@ -2624,6 +2624,66 @@ sub _all_prereqs { return { %{$self->{PREREQ_PM}}, %{$self->{BUILD_REQUIRES}} }; } +=begin private + +=head3 _perl_header_files + + my $perl_header_files= $self->_perl_header_files; + +returns a sorted list of header files as found in PERL_SRC or $archlibexp/CORE. + +Used by perldepend() in MM_Unix and MM_VMS via _perl_header_files_fragment() + +=end private + +=cut + +sub _perl_header_files { + my $self = shift; + + my $header_dir = $self->{PERL_SRC} || $self->catdir($Config{archlibexp}, 'CORE'); + opendir my $dh, $header_dir + or die "Failed to opendir '$header_dir' to find header files: $!"; + + # we need to use a temporary here as the sort in scalar context would have undefined results. + my @perl_headers= sort grep { /\.h\z/ } readdir($dh); + + closedir $dh; + + return @perl_headers; +} + +=begin private + +=head3 _perl_header_files_fragment ($o, $separator) + + my $perl_header_files_fragment= $self->_perl_header_files_fragment("/"); + +return a Makefile fragment which holds the list of perl header files which +XS code depends on $(PERL_INC), and sets up the dependency for the $(OBJECT) file. + +The $separator argument defaults to "". MM_VMS will set it to "" and MM_UNIX to "/" +in perldepend(). This reason child subclasses need to control this is that in +VMS the $(PERL_INC) directory will already have delimiters in it, but in +UNIX $(PERL_INC) will need a slash between it an the filename. Hypothetically +win32 could use "\\" (but it doesn't need to). + +=end private + +=cut + +sub _perl_header_files_fragment { + my ($self, $separator)= @_; + $separator ||= ""; + return join("\\\n", + "PERL_HDRS = ", + map { + sprintf( " \$(PERL_INC)%s%s ", $separator, $_ ) + } $self->_perl_header_files() + ) . "\n\n" + . "\$(OBJECT) : \$(PERL_HDRS)\n"; +} + =head1 AUTHOR diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm index 3aa65bdb96..9d5aebbc33 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm @@ -26,7 +26,7 @@ require ExtUtils::MM_Any; require ExtUtils::MM_Unix; our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; =item os_flavor diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm index e462270c8c..2d7dad3847 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm @@ -9,7 +9,7 @@ require ExtUtils::MM_Unix; require ExtUtils::MM_Win32; our @ISA = qw( ExtUtils::MM_Unix ); -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; =head1 NAME diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm index 971fa30780..5dcffa6c0a 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_DOS.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_DOS; use strict; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm index c9ca0e2029..6d7375d87b 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm @@ -7,7 +7,7 @@ BEGIN { our @ISA = qw( ExtUtils::MM_Unix ); } -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; =head1 NAME diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm index 18f581dba9..a304a6fdce 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_MacOS.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_MacOS; use strict; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; sub new { die <<'UNSUPPORTED'; diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm index 661bc489d8..95770447b1 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm @@ -22,7 +22,7 @@ use strict; use ExtUtils::MakeMaker::Config; use File::Basename; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; require ExtUtils::MM_Win32; our @ISA = qw(ExtUtils::MM_Win32); diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm index e0cfb6e9b2..f4354b01f0 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm @@ -5,7 +5,7 @@ use strict; use ExtUtils::MakeMaker qw(neatvalue); use File::Spec; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; @@ -84,7 +84,7 @@ $self->{BASEEXT}.def: Makefile.PL system "emximp -o tmpimp$Config::Config{lib_ext} tmpimp.imp" and die "Cannot make import library: $!, \$?=$?"; # May be running under miniperl, so have no glob... - eval "unlink <tmp_imp/*>; 1" or system "rm tmp_imp/*"; + eval { unlink <tmp_imp/*>; 1 } or system "rm tmp_imp/*"; system "cd tmp_imp; $Config::Config{ar} x ../tmpimp$Config::Config{lib_ext}" and die "Cannot extract import objects: $!, \$?=$?"; } diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm index 9e7c1c9983..6b428374a9 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm @@ -1,7 +1,7 @@ package ExtUtils::MM_QNX; use strict; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; require ExtUtils::MM_Unix; our @ISA = qw(ExtUtils::MM_Unix); diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm index 62171e3571..0f6d683f04 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm @@ -1,7 +1,7 @@ package ExtUtils::MM_UWIN; use strict; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; require ExtUtils::MM_Unix; our @ISA = qw(ExtUtils::MM_Unix); diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm index 388192e8ef..ce9ea251c4 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm @@ -15,8 +15,8 @@ use ExtUtils::MakeMaker qw($Verbose neatvalue); # If we make $VERSION an our variable parse_version() breaks use vars qw($VERSION); -$VERSION = '6.64'; -$VERSION = eval $VERSION; +$VERSION = '6.65_01'; +$VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval] require ExtUtils::MM_Any; our @ISA = qw(ExtUtils::MM_Any); @@ -1193,7 +1193,7 @@ eval 'exec $interpreter $arg -S \$0 \${1+"\$\@"}' else { warn "Can't find $cmd in PATH, $file unchanged" if $Verbose; - return undef; + return; } return $shb } @@ -2754,55 +2754,15 @@ MAKE_FRAG return join "", @m unless $self->needs_linking; - push @m, q{ -PERL_HDRS = \ - $(PERL_INC)/EXTERN.h \ - $(PERL_INC)/INTERN.h \ - $(PERL_INC)/XSUB.h \ - $(PERL_INC)/av.h \ - $(PERL_INC)/config.h \ - $(PERL_INC)/cop.h \ - $(PERL_INC)/cv.h \ - $(PERL_INC)/dosish.h \ - $(PERL_INC)/embed.h \ - $(PERL_INC)/embedvar.h \ - $(PERL_INC)/fakethr.h \ - $(PERL_INC)/form.h \ - $(PERL_INC)/gv.h \ - $(PERL_INC)/handy.h \ - $(PERL_INC)/hv.h \ - $(PERL_INC)/intrpvar.h \ - $(PERL_INC)/iperlsys.h \ - $(PERL_INC)/keywords.h \ - $(PERL_INC)/mg.h \ - $(PERL_INC)/nostdio.h \ - $(PERL_INC)/op.h \ - $(PERL_INC)/opcode.h \ - $(PERL_INC)/patchlevel.h \ - $(PERL_INC)/perl.h \ - $(PERL_INC)/perlio.h \ - $(PERL_INC)/perlsdio.h \ - $(PERL_INC)/perlsfio.h \ - $(PERL_INC)/perlvars.h \ - $(PERL_INC)/perly.h \ - $(PERL_INC)/pp.h \ - $(PERL_INC)/pp_proto.h \ - $(PERL_INC)/proto.h \ - $(PERL_INC)/regcomp.h \ - $(PERL_INC)/regexp.h \ - $(PERL_INC)/regnodes.h \ - $(PERL_INC)/scope.h \ - $(PERL_INC)/sv.h \ - $(PERL_INC)/thread.h \ - $(PERL_INC)/unixish.h \ - $(PERL_INC)/util.h - -$(OBJECT) : $(PERL_HDRS) -} if $self->{OBJECT}; + if ($self->{OBJECT}) { + # Need to add an object file dependency on the perl headers. + # this is very important for XS modules in perl.git development. + push @m, $self->_perl_header_files_fragment("/"); # Directory separator between $(PERL_INC)/header.h + } push @m, join(" ", values %{$self->{XS}})." : \$(XSUBPPDEPS)\n" if %{$self->{XS}}; - join "\n", @m; + return join "\n", @m; } diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm index 254836738a..ebe1cfc281 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm @@ -15,7 +15,7 @@ BEGIN { use File::Basename; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; require ExtUtils::MM_Any; require ExtUtils::MM_Unix; @@ -1288,23 +1288,12 @@ sub perldepend { my($self) = @_; my(@m); - push @m, ' -$(OBJECT) : $(PERL_INC)EXTERN.h, $(PERL_INC)INTERN.h, $(PERL_INC)XSUB.h -$(OBJECT) : $(PERL_INC)av.h, $(PERL_INC)config.h -$(OBJECT) : $(PERL_INC)cop.h, $(PERL_INC)cv.h, $(PERL_INC)embed.h -$(OBJECT) : $(PERL_INC)embedvar.h, $(PERL_INC)form.h -$(OBJECT) : $(PERL_INC)gv.h, $(PERL_INC)handy.h, $(PERL_INC)hv.h -$(OBJECT) : $(PERL_INC)intrpvar.h, $(PERL_INC)iperlsys.h, $(PERL_INC)keywords.h -$(OBJECT) : $(PERL_INC)mg.h, $(PERL_INC)nostdio.h, $(PERL_INC)op.h -$(OBJECT) : $(PERL_INC)opcode.h, $(PERL_INC)patchlevel.h -$(OBJECT) : $(PERL_INC)perl.h, $(PERL_INC)perlio.h -$(OBJECT) : $(PERL_INC)perlsdio.h, $(PERL_INC)perlvars.h -$(OBJECT) : $(PERL_INC)perly.h, $(PERL_INC)pp.h, $(PERL_INC)pp_proto.h -$(OBJECT) : $(PERL_INC)proto.h, $(PERL_INC)regcomp.h, $(PERL_INC)regexp.h -$(OBJECT) : $(PERL_INC)regnodes.h, $(PERL_INC)scope.h, $(PERL_INC)sv.h -$(OBJECT) : $(PERL_INC)thread.h, $(PERL_INC)util.h, $(PERL_INC)vmsish.h - -' if $self->{OBJECT}; + if ($self->{OBJECT}) { + # Need to add an object file dependency on the perl headers. + # this is very important for XS modules in perl.git development. + + push @m, $self->_perl_header_files_fragment(""); # empty separator on VMS as its in the $(PERL_INC) + } if ($self->{PERL_SRC}) { my(@macros); diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm index 3feaca786e..86f0d88565 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm @@ -1,7 +1,7 @@ package ExtUtils::MM_VOS; use strict; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; require ExtUtils::MM_Unix; our @ISA = qw(ExtUtils::MM_Unix); diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm index 45712b49a2..9be1c68355 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm @@ -27,7 +27,7 @@ use ExtUtils::MakeMaker qw( neatvalue ); require ExtUtils::MM_Any; require ExtUtils::MM_Unix; our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; $ENV{EMXSHELL} = 'sh'; # to run `commands` diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm index f3121ae1ff..52464d9c93 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_Win95; use strict; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; require ExtUtils::MM_Win32; our @ISA = qw(ExtUtils::MM_Win32); diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm index 62a00391b9..64bf04e86f 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm @@ -3,7 +3,7 @@ package ExtUtils::MY; use strict; require ExtUtils::MM; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; our @ISA = qw(ExtUtils::MM); { diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm index d040891f94..885eb7a80f 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm @@ -18,8 +18,8 @@ our @Overridable; my @Prepend_parent; my %Recognized_Att_Keys; -our $VERSION = '6.64'; -$VERSION = eval $VERSION; +our $VERSION = '6.65_01'; +$VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval] # Emulate something resembling CVS $Revision$ (our $Revision = $VERSION) =~ s{_}{}; @@ -1196,7 +1196,7 @@ Makefiles with a single invocation of WriteMakefile(). =head2 How To Write A Makefile.PL -See ExtUtils::MakeMaker::Tutorial. +See L<ExtUtils::MakeMaker::Tutorial>. The long answer is the rest of the manpage :-) @@ -1225,7 +1225,7 @@ Other interesting targets in the generated Makefile are =head2 make test MakeMaker checks for the existence of a file named F<test.pl> in the -current directory and if it exists it execute the script with the +current directory, and if it exists it executes the script with the proper set of perl C<-I> options. MakeMaker also checks for any files matching glob("t/*.t"). It will @@ -1384,7 +1384,7 @@ the best: make test make install -make install per default writes some documentation of what has been +make install by default writes some documentation of what has been done into the file C<$(INSTALLARCHLIB)/perllocal.pod>. This feature can be bypassed by calling make pure_install. @@ -1416,9 +1416,9 @@ is built. You can invoke the corresponding section of the makefile with That produces a new perl binary in the current directory with all extensions linked in that can be found in INST_ARCHLIB, SITELIBEXP, and PERL_ARCHLIB. To do that, MakeMaker writes a new Makefile, on -UNIX, this is called Makefile.aperl (may be system dependent). If you -want to force the creation of a new perl, it is recommended, that you -delete this Makefile.aperl, so the directories are searched-through +UNIX, this is called F<Makefile.aperl> (may be system dependent). If you +want to force the creation of a new perl, it is recommended that you +delete this F<Makefile.aperl>, so the directories are searched through for linkable libraries again. The binary can be installed into the directory where perl normally @@ -1441,7 +1441,7 @@ or say In any case you will be prompted with the correct invocation of the C<inst_perl> target that installs the new binary into INSTALLBIN. -make inst_perl per default writes some documentation of what has been +make inst_perl by default writes some documentation of what has been done into the file C<$(INSTALLARCHLIB)/perllocal.pod>. This can be bypassed by calling make pure_inst_perl. @@ -1506,12 +1506,12 @@ relationship between INSTALLPRIVLIB and INSTALLARCHLIB is determined by Configure at perl compilation time. MakeMaker supports the user who sets INSTALLPRIVLIB. If INSTALLPRIVLIB is set, but INSTALLARCHLIB not, then MakeMaker defaults the latter to be the same subdirectory of -INSTALLPRIVLIB as Configure decided for the counterparts in %Config , +INSTALLPRIVLIB as Configure decided for the counterparts in %Config, otherwise it defaults to INSTALLPRIVLIB. The same relationship holds for INSTALLSITELIB and INSTALLSITEARCH. MakeMaker gives you much more freedom than needed to configure -internal variables and get different results. It is worth to mention, +internal variables and get different results. It is worth mentioning that make(1) also lets you configure most of the variables that are used in the Makefile. But in the majority of situations this will not be necessary, and should only be done if the author of a package @@ -1635,7 +1635,7 @@ in ext/SDBM_File A safe filename for the package. -Defaults to NAME above but with :: replaced with -. +Defaults to NAME below but with :: replaced with -. For example, Foo::Bar becomes Foo-Bar. @@ -1875,7 +1875,7 @@ Directory to hold the man pages at 'make' time =item INST_SCRIPT -Directory, where executable files should be installed during +Directory where executable files should be installed during 'make'. Defaults to "./blib/script", just to have a dummy location during testing. make install will copy the files in INST_SCRIPT to INSTALLSCRIPT. @@ -1936,7 +1936,7 @@ MakeMaker will turn it into an array with one element. =item LICENSE -The licensing terms of your distribution. Generally its "perl" for the +The licensing terms of your distribution. Generally it's "perl" for the same license as Perl itself. See L<Module::Build::API> for the list of options. @@ -1956,7 +1956,7 @@ parameter lets Makefile.PL know what make quirks to account for when generating the Makefile. MakeMaker also honors the MAKE environment variable. This parameter -takes precedent. +takes precedence. Currently the only significant values are 'dmake' and 'nmake' for Windows users, instructing MakeMaker to generate a Makefile in the flavour of @@ -1973,7 +1973,7 @@ you what Make you're supposed to invoke the Makefile with. =item MAKEAPERL -Boolean which tells MakeMaker, that it should include the rules to +Boolean which tells MakeMaker that it should include the rules to make a perl. This is handled automatically as a switch by MakeMaker. The user normally does not need it. @@ -2012,14 +2012,14 @@ Example similar to MAN1PODS. =item MAP_TARGET -If it is intended, that a new perl binary be produced, this variable +If it is intended that a new perl binary be produced, this variable may hold a name for that binary. Defaults to perl =item META_ADD =item META_MERGE -A hashrefs of items to add to the CPAN Meta file (F<META.yml> or +A hashref of items to add to the CPAN Meta file (F<META.yml> or F<META.json>). They differ in how they behave if they have the same key as the @@ -2033,11 +2033,11 @@ get the advantage of any future defaults. The minimum required version of Perl for this distribution. -Either 5.006001 or 5.6.1 format is acceptable. +Either the 5.006001 or the 5.6.1 format is acceptable. =item MYEXTLIB -If the extension links to a library that it builds set this to the +If the extension links to a library that it builds, set this to the name of the library (see SDBM_File) =item NAME @@ -2064,7 +2064,7 @@ this boolean variable yourself. =item NOECHO -Command so make does not print the literal commands its running. +Command so make does not print the literal commands it's running. By setting it to an empty string you can generate a Makefile that prints all commands. Mainly used in debugging MakeMaker itself. @@ -2111,7 +2111,7 @@ passed to subdirectory makes. =item PERL -Perl binary for tasks that can be done by miniperl +Perl binary for tasks that can be done by miniperl. =item PERL_CORE @@ -2162,7 +2162,7 @@ which rely on special alignment which is not provided by Perl's malloc(). =back -B<NOTE.> Negligence to set this flag in I<any one> of loaded extension +B<NOTE.> Neglecting to set this flag in I<any one> of the loaded extension nullifies many advantages of Perl's malloc(), such as better usage of system resources, error detection, memory usage reporting, catchable failure of memory allocations, etc. @@ -2171,7 +2171,7 @@ of memory allocations, etc. Directory under which core modules are to be installed. -Defaults to $Config{installprefixexp} falling back to +Defaults to $Config{installprefixexp}, falling back to $Config{installprefix}, $Config{prefixexp} or $Config{prefix} should $Config{installprefixexp} not exist. @@ -2234,11 +2234,11 @@ In this case the program will be run multiple times using each target file. perl bin/foobar.PL bin/foobar2 PL files are normally run B<after> pm_to_blib and include INST_LIB and -INST_ARCH in its C<@INC> so the just built modules can be +INST_ARCH in their C<@INC>, so the just built modules can be accessed... unless the PL file is making a module (or anything else in PM) in which case it is run B<before> pm_to_blib and does not include INST_LIB and INST_ARCH in its C<@INC>. This apparently odd behavior -is there for backwards compatibility (and its somewhat DWIM). +is there for backwards compatibility (and it's somewhat DWIM). =item PM @@ -2313,7 +2313,7 @@ guess about where to place things under the new PREFIX based on your Config defaults. Failing that, it will fall back to a structure which should be sensible for your platform. -If you specify LIB or any INSTALL* variables they will not be effected +If you specify LIB or any INSTALL* variables they will not be affected by the PREFIX. =item PREREQ_FATAL @@ -2325,7 +2325,7 @@ will C<die> instead of simply informing the user of the missing dependencies. It is I<extremely> rare to have to use C<PREREQ_FATAL>. Its use by module authors is I<strongly discouraged> and should never be used lightly. -Module installation tools have ways of resolving umet dependencies but +Module installation tools have ways of resolving unmet dependencies but to do that they need a F<Makefile>. Using C<PREREQ_FATAL> breaks this. That's bad. @@ -2370,7 +2370,7 @@ added to the output as an additional line of the form: $MIN_PERL_VERSION = '5.008001'; -If BUILD_REQUIRES is not empty, it will be dumped as $BUILD_REQUIRES hasref. +If BUILD_REQUIRES is not empty, it will be dumped as $BUILD_REQUIRES hashref. =item PRINT_PREREQ @@ -2470,7 +2470,7 @@ but these will fail: local $VERSION = '1.02'; local $FOO::VERSION = '1.30'; -"Version strings" are incompatible should not be used. +"Version strings" are incompatible and should not be used. # Bad $VERSION = 1.2.3; @@ -2665,7 +2665,7 @@ The correct code is C<< MAN3PODS => { } >>. =head2 Hintsfile support -MakeMaker.pm uses the architecture specific information from +MakeMaker.pm uses the architecture-specific information from Config.pm. In addition it evaluates architecture specific hints files in a C<hints/> directory. The hints files are expected to be named like their counterparts in C<PERL_SRC/hints>, but with an C<.pl> file diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm index 01d1e3e3ca..bb2d1c48cf 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm @@ -2,7 +2,7 @@ package ExtUtils::MakeMaker::Config; use strict; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; use Config (); diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod index 093b843fe8..4795100d26 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod @@ -1,6 +1,6 @@ package ExtUtils::MakeMaker::FAQ; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; 1; __END__ @@ -47,6 +47,9 @@ reason, do it the long way. Module::Build, as of 0.28, supports two ways to install to the same location as MakeMaker. +We highly recommend the install_base method, its the simplest and most +closely approximates the expected behavior of an installation prefix. + 1) Use INSTALL_BASE / C<--install_base> MakeMaker (as of 6.31) and Module::Build (as of 0.28) both can install @@ -58,6 +61,9 @@ C<--install_base> in MB to the same location. perl Makefile.PL INSTALL_BASE=/whatever perl Build.PL --install_base /whatever +This works most like other language's behavior when you specify a +prefix. We recommend this method. + 2) Use PREFIX / C<--prefix> Module::Build 0.28 added support for C<--prefix> which works like @@ -66,10 +72,14 @@ MakeMaker's PREFIX. perl Makefile.PL PREFIX=/whatever perl Build.PL --prefix /whatever +We highly discourage this method. It should only be used if you know +what you're doing and specifically need the PREFIX behavior. The +PREFIX algorithm is complicated and focused on matching the system +installation. =item How do I keep from installing man pages? -Recent versions of MakeMaker will only install man pages on Unix like +Recent versions of MakeMaker will only install man pages on Unix-like operating systems. For an individual module: @@ -119,6 +129,22 @@ installation structure matching INSTALL_BASE and using that instead. =back +=head2 Common errors and problems + +=over 4 + +=item "No rule to make target `/usr/lib/perl5/CORE/config.h', needed by `Makefile'" + +Just what it says, you're missing that file. MakeMaker uses it to +determine if perl has been rebuilt since the Makefile was made. It's +a bit of a bug that it halts installation. + +Some operating systems don't ship the CORE directory with their base +perl install. To solve the problem, you likely need to install a perl +development package such as perl-devel (CentOS, Fedora and other +Redhat systems) or perl (Ubuntu and other Debian systems). + +=back =head2 Philosophy and History @@ -196,7 +222,7 @@ and 1.10 to 1.010 which compare properly. $VERSION = sprintf "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/g; -If branches are involved (ie. $Revision: 1.5.3.4$) its a little more +If branches are involved (ie. $Revision: 1.5.3.4$) it's a little more complicated. # must be all on one line or MakeMaker will get confused. @@ -204,9 +230,9 @@ complicated. In SVN, $Revision$ should be the same for every file in the project so they would all have the same $VERSION. CVS and RCS have a different -$Revision$ per file so each file will have a differnt $VERSION. +$Revision$ per file so each file will have a different $VERSION. Distributed version control systems, such as SVK, may have a different -$Revision$ based on who checks out the file leading to a different $VERSION +$Revision$ based on who checks out the file, leading to a different $VERSION on each machine! Finally, some distributed version control systems, such as darcs, have no concept of revision number at all. @@ -222,7 +248,7 @@ To shut off its generation, pass the C<NO_META> flag to C<WriteMakefile()>. =item How do I delete everything not in my F<MANIFEST>? -Some folks are surpried that C<make distclean> does not delete +Some folks are surprised that C<make distclean> does not delete everything not listed in their MANIFEST (thus making a clean distribution) but only tells them what they need to delete. This is done because it is considered too dangerous. While developing your @@ -269,7 +295,7 @@ do that. Use at your own risk. Have fun blowing holes in your foot. =item Which tar should I use on Windows? -We recommend ptar from Archive::Tar not older that 1.66 with '-C' option. +We recommend ptar from Archive::Tar not older than 1.66 with '-C' option. =item Which zip should I use on Windows for '[nd]make zipdist'? @@ -282,12 +308,12 @@ We recommend InfoZIP: L<http://www.info-zip.org/Zip.html> =over 4 -=item How to I prevent "object version X.XX does not match bootstrap parameter Y.YY" errors? +=item How do I prevent "object version X.XX does not match bootstrap parameter Y.YY" errors? XS code is very sensitive to the module version number and will complain if the version number in your Perl module doesn't match. If you change your module's version # without rerunning Makefile.PL the old -version number will remain in the Makefile causing the XS code to be built +version number will remain in the Makefile, causing the XS code to be built with the wrong number. To avoid this, you can force the Makefile to be rebuilt whenever you diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod index dbe3087fed..82ab020f4c 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Tutorial.pod @@ -1,6 +1,6 @@ package ExtUtils::MakeMaker::Tutorial; -our $VERSION = 6.64; +our $VERSION = '6.65_01'; =head1 NAME @@ -19,7 +19,7 @@ ExtUtils::MakeMaker::Tutorial - Writing a module with MakeMaker =head1 DESCRIPTION This is a short tutorial on writing a simple module with MakeMaker. -Its really not that hard. +It's really not that hard. =head2 The Mantra @@ -95,8 +95,8 @@ See L<ExtUtils::Manifest> for more details. =item lib/ -This is the directory where your .pm and .pod files you wish to have -installed go. They are layed out according to namespace. So Foo::Bar +This is the directory where the .pm and .pod files you wish to have +installed go. They are laid out according to namespace. So Foo::Bar is F<lib/Foo/Bar.pm>. diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm index 0436691b94..2b73b725a9 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mkbootstrap.pm @@ -3,7 +3,7 @@ package ExtUtils::Mkbootstrap; # There's just too much Dynaloader incest here to turn on strict vars. use strict 'refs'; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; require Exporter; our @ISA = ('Exporter'); diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm index 1bc58fb290..1ea2ad2fca 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm @@ -10,7 +10,7 @@ use Config; our @ISA = qw(Exporter); our @EXPORT = qw(&Mksymlists); -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; sub Mksymlists { my(%spec) = @_; @@ -27,7 +27,7 @@ sub Mksymlists { unless ( ($spec{DL_FUNCS} and keys %{$spec{DL_FUNCS}}) or @{$spec{FUNCLIST}}); if (defined $spec{DL_FUNCS}) { - foreach my $package (keys %{$spec{DL_FUNCS}}) { + foreach my $package (sort keys %{$spec{DL_FUNCS}}) { my($packprefix,$bootseen); ($packprefix = $package) =~ s/\W/_/g; foreach my $sym (@{$spec{DL_FUNCS}->{$package}}) { @@ -106,14 +106,20 @@ sub _write_os2 { print $def "EXPORTS\n "; print $def join("\n ",@{$data->{DL_VARS}}, "\n") if @{$data->{DL_VARS}}; print $def join("\n ",@{$data->{FUNCLIST}}, "\n") if @{$data->{FUNCLIST}}; - if (%{$data->{IMPORTS}}) { + _print_imports($def, $data); + close $def; +} + +sub _print_imports { + my ($def, $data)= @_; + my $imports= $data->{IMPORTS} + or return; + if (keys %$imports) { print $def "IMPORTS\n"; - my ($name, $exp); - while (($name, $exp)= each %{$data->{IMPORTS}}) { - print $def " $name=$exp\n"; + foreach my $name (sort keys %$imports) { + print $def " $name=$imports->{$name}\n"; } } - close $def; } sub _write_win32 { @@ -150,13 +156,7 @@ sub _write_win32 { } } print $def join("\n ",@syms, "\n") if @syms; - if (%{$data->{IMPORTS}}) { - print $def "IMPORTS\n"; - my ($name, $exp); - while (($name, $exp)= each %{$data->{IMPORTS}}) { - print $def " $name=$exp\n"; - } - } + _print_imports($def, $data); close $def; } @@ -212,10 +212,10 @@ ExtUtils::Mksymlists - write linker options files for dynamic extension =head1 SYNOPSIS use ExtUtils::Mksymlists; - Mksymlists({ NAME => $name , + Mksymlists( NAME => $name , DL_VARS => [ $var1, $var2, $var3 ], DL_FUNCS => { $pkg1 => [ $func1, $func2 ], - $pkg2 => [ $func3 ] }); + $pkg2 => [ $func3 ] ); =head1 DESCRIPTION @@ -281,9 +281,9 @@ generation of the bootstrap function for the package. To still create the bootstrap name you have to specify the package name in the DL_FUNCS hash: - Mksymlists({ NAME => $name , + Mksymlists( NAME => $name , FUNCLIST => [ $func1, $func2 ], - DL_FUNCS => { $pkg => [] } }); + DL_FUNCS => { $pkg => [] } ); =item IMPORTS diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm index b287544780..c9f4d3e440 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm @@ -3,7 +3,7 @@ package ExtUtils::testlib; use strict; use warnings; -our $VERSION = '6.64'; +our $VERSION = '6.65_01'; use Cwd; use File::Spec; diff --git a/cpan/ExtUtils-MakeMaker/t/Liblist_Kid.t b/cpan/ExtUtils-MakeMaker/t/Liblist_Kid.t new file mode 100644 index 0000000000..8746e0a594 --- /dev/null +++ b/cpan/ExtUtils-MakeMaker/t/Liblist_Kid.t @@ -0,0 +1,156 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use lib 't/lib'; + +# Liblist wants to be an object which has File::Spec capabilities, so we +# mock one. + +BEGIN { + package MockEUMM; + use base 'File::Spec'; # what. + sub new { return bless {}, 'MockEUMM'; } +} + +package liblist_kid_test; + +use Test::More 'no_plan'; +use ExtUtils::MakeMaker::Config; +use File::Spec; + +run(); + +exit; + +sub run { + use_ok( 'ExtUtils::Liblist::Kid' ); + + move_to_os_test_data_dir(); + alias_kid_ext_for_convenience(); + + conf_reset(); + + return test_kid_win32() if $^O eq 'MSWin32'; + return; +} + +# This allows us to get a clean playing field and ensure that the current +# system configuration does not affect the test results. + +sub conf_reset { + delete $Config{$_} for keys %Config; + delete $ENV{LIB}; + delete $ENV{LIBRARY_PATH}; + + return; +} + +# This keeps the directory paths in the tests short and allows easy +# separation of OS-specific files. + +sub move_to_os_test_data_dir { + my %os_test_dirs = ( MSWin32 => 't/liblist/win32', ); + return if !$os_test_dirs{$^O}; + + chdir $os_test_dirs{$^O} or die "Could not change to liblist test dir '$os_test_dirs{$^O}': $!"; + return; +} + +# With this we can use a short function name in the tests and use the same +# one everywhere. + +sub alias_kid_ext_for_convenience { + my %os_ext_funcs = ( MSWin32 => \&ExtUtils::Liblist::Kid::_win32_ext, ); + *_kid_ext = $os_ext_funcs{$^O} if $os_ext_funcs{$^O}; + + return; +} +sub _kid_ext; + +# Since liblist is object-based, we need to provide a mock object. + +sub _ext { _kid_ext( MockEUMM->new, @_ ); } + +# tests go here + +sub test_kid_win32 { + + $Config{installarchlib} = 'lib'; + + is_deeply( [ _ext() ], [ '', '', '', '' ], 'empty input results in empty output' ); + is_deeply( [ _ext( 'unreal_test' ) ], [ '', '', '', '' ], 'non-existent file results in empty output' ); + is_deeply( [ _ext( 'test' ) ], [ 'test.lib', '', 'test.lib', '' ], 'existent file results in a path to the file. .lib is default extension with empty %Config' ); + is_deeply( [ _ext( 'c_test' ) ], [ 'lib\CORE\c_test.lib', '', 'lib\CORE\c_test.lib', '' ], '$Config{installarchlib}/CORE is the default search dir aside from cwd' ); + is_deeply( [ _ext( 'double' ) ], [ 'double.lib', '', 'double.lib', '' ], 'once an instance of a lib is found, the search stops' ); + is_deeply( [ _ext( 'test.lib' ) ], [ 'test.lib', '', 'test.lib', '' ], 'the extension is not tacked on twice' ); + is_deeply( [ _ext( 'test.a' ) ], [ 'test.a.lib', '', 'test.a.lib', '' ], 'but it will be tacked onto filenamess with other kinds of library extension' ); + is_deeply( [ _ext( 'test test2' ) ], [ 'test.lib test2.lib', '', 'test.lib test2.lib', '' ], 'multiple existing files end up separated by spaces' ); + is_deeply( [ _ext( 'test test2 unreal_test' ) ], [ 'test.lib test2.lib', '', 'test.lib test2.lib', '' ], "some existing files don't cause false positives" ); + is_deeply( [ _ext( '-l_test' ) ], [ 'lib_test.lib', '', 'lib_test.lib', '' ], 'prefixing a lib with -l triggers a second search with prefix "lib" when gcc is not in use' ); + is_deeply( [ _ext( '-l__test' ) ], [ '__test.lib', '', '__test.lib', '' ], 'unprefixed lib files are found first when -l is used' ); + is_deeply( [ _ext( '-llibtest' ) ], [ '', '', '', '' ], 'if -l is used and the lib name is already prefixed no second search without the prefix is done' ); + is_deeply( [ _ext( '-lunreal_test' ) ], [ '', '', '', '' ], 'searching with -l for a non-existent library does not cause an endless loop' ); + is_deeply( [ _ext( '"space lib"' ) ], [ '"space lib.lib"', '', '"space lib.lib"', '' ], 'lib with spaces in the name can be found with the help of quotes' ); + is_deeply( [ _ext( '"""space lib"""' ) ], [ '"space lib.lib"', '', '"space lib.lib"', '' ], 'Text::Parsewords deals with extraneous quotes' ); + + is_deeply( [ scalar _ext( 'test' ) ], ['test.lib'], 'asking for a scalar gives a single string' ); + + is_deeply( [ _ext( undef, 0, 1 ) ], [ '', '', '', '', [] ], 'asking for real names with empty input results in an empty extra array' ); + is_deeply( [ _ext( 'unreal_test', 0, 1 ) ], [ '', '', '', '', [] ], 'asking for real names with non-existent file results in an empty extra array' ); + is_deeply( [ _ext( 'c_test', 0, 1 ) ], [ 'lib\CORE\c_test.lib', '', 'lib\CORE\c_test.lib', '', ['lib/CORE\c_test.lib'] ], 'asking for real names with an existent file in search dir results in an extra array with a mixed-os file path?!' ); + is_deeply( [ _ext( 'test c_test', 0, 1 ) ], [ 'test.lib lib\CORE\c_test.lib', '', 'test.lib lib\CORE\c_test.lib', '', ['lib/CORE\c_test.lib'] ], 'files in cwd do not appear in the real name list?!' ); + is_deeply( [ _ext( '-lc_test c_test', 0, 1 ) ], [ 'lib\CORE\c_test.lib lib\CORE\c_test.lib', '', 'lib\CORE\c_test.lib lib\CORE\c_test.lib', '', ['lib/CORE\c_test.lib'] ], 'finding the same lib in a search dir both with and without -l results in a single listing in the array' ); + + is_deeply( [ _ext( 'test :nosearch unreal_test test2' ) ], [ 'test.lib unreal_test test2', '', 'test.lib unreal_test test2', '' ], ':nosearch can force passing through of filenames as they are' ); + is_deeply( [ _ext( 'test :nosearch -lunreal_test test2' ) ], [ 'test.lib unreal_test.lib test2', '', 'test.lib unreal_test.lib test2', '' ], 'lib names with -l after a :nosearch are suffixed with .lib and the -l is removed' ); + is_deeply( [ _ext( 'test :nosearch unreal_test :search test2' ) ], [ 'test.lib unreal_test test2.lib', '', 'test.lib unreal_test test2.lib', '' ], ':search enables file searching again' ); + is_deeply( [ _ext( 'test :meep test2' ) ], [ 'test.lib test2.lib', '', 'test.lib test2.lib', '' ], 'unknown :flags are safely ignored' ); + + my $curr = File::Spec->rel2abs( '' ); + is_deeply( [ _ext( "-L$curr/dir dir_test" ) ], [ $curr . '\dir\dir_test.lib', '', $curr . '\dir\dir_test.lib', '' ], 'directories in -L parameters are searched' ); + is_deeply( [ _ext( "-L/non_dir dir_test" ) ], [ '', '', '', '' ], 'non-existent -L dirs are ignored safely' ); + is_deeply( [ _ext( "-Ldir dir_test" ) ], [ $curr . '\dir\dir_test.lib', '', $curr . '\dir\dir_test.lib', '' ], 'relative -L directories work' ); + is_deeply( [ _ext( '-L"di r" dir_test' ) ], [ '"' . $curr . '\di r\dir_test.lib"', '', '"' . $curr . '\di r\dir_test.lib"', '' ], '-L directories with spaces work' ); + + $Config{perllibs} = 'pl'; + is_deeply( [ _ext( 'unreal_test' ) ], [ 'pl.lib', '', 'pl.lib', '' ], '$Config{perllibs} adds extra libs to be searched' ); + is_deeply( [ _ext( 'unreal_test :nodefault' ) ], [ '', '', '', '' ], ':nodefault flag prevents $Config{perllibs} from being added' ); + delete $Config{perllibs}; + + $Config{libpth} = 'libpath'; + is_deeply( [ _ext( 'lp_test' ) ], [ 'libpath\lp_test.lib', '', 'libpath\lp_test.lib', '' ], '$Config{libpth} adds extra search paths' ); + delete $Config{libpth}; + + $Config{lib_ext} = '.meep'; + is_deeply( [ _ext( 'test' ) ], [ 'test.meep', '', 'test.meep', '' ], '$Config{lib_ext} changes the lib extension to be searched for' ); + delete $Config{lib_ext}; + + $Config{lib_ext} = '.a'; + is_deeply( [ _ext( 'imp' ) ], [ 'imp.dll.a', '', 'imp.dll.a', '' ], '$Config{lib_ext} == ".a" will find *.dll.a too' ); + delete $Config{lib_ext}; + + $Config{cc} = 'C:/MinGW/bin/gcc.exe'; + + is_deeply( [ _ext( 'test' ) ], [ 'test.lib', '', 'test.lib', '' ], '[gcc] searching for straight lib names remains unchanged' ); + is_deeply( [ _ext( '-l__test' ) ], [ 'lib__test.lib', '', 'lib__test.lib', '' ], '[gcc] lib-prefixed library files are found first when -l is in use' ); + is_deeply( [ _ext( '-ltest' ) ], [ 'test.lib', '', 'test.lib', '' ], '[gcc] non-lib-prefixed library files are found on the second search when -l is in use' ); + is_deeply( [ _ext( '-llibtest' ) ], [ 'test.lib', '', 'test.lib', '' ], '[gcc] if -l is used and the lib name is already prefixed a second search without the lib is done' ); + is_deeply( [ _ext( ':nosearch -lunreal_test' ) ], [ '-lunreal_test', '', '-lunreal_test', '' ], '[gcc] lib names with -l after a :nosearch remain as they are' ); + + $ENV{LIBRARY_PATH} = 'libpath'; + is_deeply( [ _ext( 'lp_test' ) ], [ 'libpath\lp_test.lib', '', 'libpath\lp_test.lib', '' ], '[gcc] $ENV{LIBRARY_PATH} adds extra search paths' ); + delete $ENV{LIBRARY_PATH}; + + $Config{cc} = 'c:/Programme/Microsoft Visual Studio 9.0/VC/bin/cl.exe'; + + is_deeply( [ _ext( 'test' ) ], [ 'test.lib', '', 'test.lib', '' ], '[vc] searching for straight lib names remains unchanged' ); + is_deeply( [ _ext( ':nosearch -Lunreal_test' ) ], [ '-libpath:unreal_test', '', '-libpath:unreal_test', '' ], '[vc] lib dirs with -L after a :nosearch are prefixed with -libpath:' ); + ok( !exists $ENV{LIB}, '[vc] $ENV{LIB} is not autovivified' ); + + $ENV{LIB} = 'vc'; + is_deeply( [ _ext( 'vctest.lib' ) ], [ 'vc\vctest.lib', '', 'vc\vctest.lib', '' ], '[vc] $ENV{LIB} adds search paths' ); + + return; +} diff --git a/cpan/ExtUtils-MakeMaker/t/basic.t b/cpan/ExtUtils-MakeMaker/t/basic.t index fb374c0c9b..1410465a9f 100644 --- a/cpan/ExtUtils-MakeMaker/t/basic.t +++ b/cpan/ExtUtils-MakeMaker/t/basic.t @@ -412,8 +412,5 @@ close SAVERR; sub _normalize { my $hash = shift; - while(my($k,$v) = each %$hash) { - delete $hash->{$k}; - $hash->{lc $k} = $v; - } + %$hash= map { lc($_) => $hash->{$_} } keys %$hash; } diff --git a/cpan/ExtUtils-MakeMaker/t/pod2man.t b/cpan/ExtUtils-MakeMaker/t/pod2man.t index 1632234b15..d206e0bc95 100644 --- a/cpan/ExtUtils-MakeMaker/t/pod2man.t +++ b/cpan/ExtUtils-MakeMaker/t/pod2man.t @@ -38,7 +38,7 @@ use Test::More tests => 3; $warnings .= join '', @_; }; - is pod2man(), undef; + ok !pod2man(); is $warnings, <<'END' Pod::Man is not available: Simulated Pod::Man failure Man pages will not be generated during this install. |