Hello community,
here is the log from the commit of package perl-Module-Install-ExtraTests for
openSUSE:Factory checked in at 2013-06-06 12:21:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Module-Install-ExtraTests (Old)
and /work/SRC/openSUSE:Factory/.perl-Module-Install-ExtraTests.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Module-Install-ExtraTests"
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Module-Install-ExtraTests/perl-Module-Install-ExtraTests.changes
2011-09-23 12:38:07.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Module-Install-ExtraTests.new/perl-Module-Install-ExtraTests.changes
2013-06-06 12:21:47.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Jun 5 18:42:45 UTC 2013 - [email protected]
+
+- updated to 0.008
+ fix a documentation/code mismatch on VERSION (thanks, ETHER)
+
+-------------------------------------------------------------------
Old:
----
Module-Install-ExtraTests-0.007.tar.gz
New:
----
Module-Install-ExtraTests-0.008.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Module-Install-ExtraTests.spec ++++++
--- /var/tmp/diff_new_pack.XOhb1e/_old 2013-06-06 12:21:48.000000000 +0200
+++ /var/tmp/diff_new_pack.XOhb1e/_new 2013-06-06 12:21:48.000000000 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package perl-Module-Install-ExtraTests (Version 0.007)
+# spec file for package perl-Module-Install-ExtraTests
#
-# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,54 +15,49 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# norootforbuild
-
Name: perl-Module-Install-ExtraTests
-Version: 0.007
-Release: 2
+Version: 0.008
+Release: 0
+%define cpan_name Module-Install-ExtraTests
Summary: Contextual tests that the harness can ignore
-Source:
http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Module-Install-ExtraTests-%{version}.tar.gz
-Url: http://search.cpan.org/dist/Module-Install-ExtraTests
-Group: Development/Libraries/Perl
License: Artistic-1.0 or GPL-1.0+
+Group: Development/Libraries/Perl
+Url: http://search.cpan.org/dist/Module-Install-ExtraTests/
+Source:
http://www.cpan.org/authors/id/R/RJ/RJBS/%{cpan_name}-%{version}.tar.gz
+BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%{perl_requires}
BuildRequires: perl
BuildRequires: perl-macros
-BuildRequires: make
-BuildRequires: perl(ExtUtils::MakeMaker) >= 6.42
+#BuildRequires: perl(inc::Module::Install)
+#BuildRequires: perl(JSON)
+#BuildRequires: perl(LWP::Simple)
+#BuildRequires: perl(Module::Build)
+#BuildRequires: perl(Module::Install::Base)
+#BuildRequires: perl(Parse::CPAN::Meta)
+#BuildRequires: perl(YAML::Tiny)
+%{perl_requires}
%description
-Adds contextual tests that the harness can ignore.
+contextual tests that the harness can ignore
%prep
-%setup -q -n "Module-Install-ExtraTests-%{version}"
-%__sed -i '/^auto_install/d' Makefile.PL
+%setup -q -n %{cpan_name}-%{version}
%build
-%__perl Makefile.PL PREFIX="%{_prefix}"
-%__make %{?jobs:-j%{jobs}}
+%{__perl} Makefile.PL INSTALLDIRS=vendor
+%{__make} %{?_smp_mflags}
+
+%check
+%{__make} test
%install
%perl_make_install
%perl_process_packlist
+%perl_gen_filelist
-%check
-%__make test
-
-%clean
-%{?buildroot:%__rm -rf "%{buildroot}"}
-
-%files
-%defattr(-,root,root)
-%doc Changes README
-%dir %{perl_vendorlib}/Module
-%dir %{perl_vendorlib}/Module/Install
-%{perl_vendorlib}/Module/Install/ExtraTests.pm
-%dir %{perl_vendorarch}/auto/Module
-%dir %{perl_vendorarch}/auto/Module/Install
-%{perl_vendorarch}/auto/Module/Install/ExtraTests
-%doc %{perl_man3dir}/Module::Install::ExtraTests.%{perl_man3ext}%{ext_man}
+%files -f %{name}.files
+%defattr(-,root,root,755)
+%doc Changes LICENSE MYMETA.json MYMETA.yml README
%changelog
++++++ Module-Install-ExtraTests-0.007.tar.gz ->
Module-Install-ExtraTests-0.008.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-Install-ExtraTests-0.007/Changes
new/Module-Install-ExtraTests-0.008/Changes
--- old/Module-Install-ExtraTests-0.007/Changes 2010-04-24 01:06:54.000000000
+0200
+++ new/Module-Install-ExtraTests-0.008/Changes 2012-12-30 02:09:45.000000000
+0100
@@ -1,5 +1,8 @@
Revision history for Module-Install-ExtraTests
+0.008 2012-12-29
+ fix a documentation/code mismatch on VERSION (thanks, ETHER)
+
0.007 2010-04-23
Only call the custom MakeMaker methods if the Makefile.PL actually
used (by FLORA)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-Install-ExtraTests-0.007/MANIFEST
new/Module-Install-ExtraTests-0.008/MANIFEST
--- old/Module-Install-ExtraTests-0.007/MANIFEST 2010-04-24
01:13:39.000000000 +0200
+++ new/Module-Install-ExtraTests-0.008/MANIFEST 2012-12-30
02:11:31.000000000 +0100
@@ -14,6 +14,8 @@
Makefile.PL
MANIFEST This list of files
META.yml
+MYMETA.json
+MYMETA.yml
README
t/basic.t
xt/release/pod-coverage.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-Install-ExtraTests-0.007/META.yml
new/Module-Install-ExtraTests-0.008/META.yml
--- old/Module-Install-ExtraTests-0.007/META.yml 2010-04-24
01:13:39.000000000 +0200
+++ new/Module-Install-ExtraTests-0.008/META.yml 2012-12-30
02:11:30.000000000 +0100
@@ -3,11 +3,12 @@
author:
- TESTS
build_requires:
- ExtUtils::MakeMaker: 6.42
+ ExtUtils::MakeMaker: 6.59
configure_requires:
- ExtUtils::MakeMaker: 6.42
+ ExtUtils::MakeMaker: 6.59
distribution_type: module
-generated_by: 'Module::Install version 0.95'
+dynamic_config: 1
+generated_by: 'Module::Install version 1.06'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -23,4 +24,4 @@
resources:
license: http://dev.perl.org/licenses/
repository: git://git.codesimply.com/Module-Install-ExtraTests.git
-version: 0.007
+version: 0.008
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-Install-ExtraTests-0.007/MYMETA.json
new/Module-Install-ExtraTests-0.008/MYMETA.json
--- old/Module-Install-ExtraTests-0.007/MYMETA.json 1970-01-01
01:00:00.000000000 +0100
+++ new/Module-Install-ExtraTests-0.008/MYMETA.json 2012-12-30
02:11:30.000000000 +0100
@@ -0,0 +1,41 @@
+{
+ "abstract" : "contextual tests that the harness can ignore",
+ "author" : [
+ "TESTS"
+ ],
+ "dynamic_config" : 0,
+ "generated_by" : "ExtUtils::MakeMaker version 6.64, CPAN::Meta::Converter
version 2.120921",
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "Module-Install-ExtraTests",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "inc"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "6.59"
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "perl" : "5.006"
+ }
+ }
+ },
+ "release_status" : "stable",
+ "version" : "0.008"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Module-Install-ExtraTests-0.007/MYMETA.yml
new/Module-Install-ExtraTests-0.008/MYMETA.yml
--- old/Module-Install-ExtraTests-0.007/MYMETA.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/Module-Install-ExtraTests-0.008/MYMETA.yml 2012-12-30
02:11:30.000000000 +0100
@@ -0,0 +1,22 @@
+---
+abstract: 'contextual tests that the harness can ignore'
+author:
+ - TESTS
+build_requires:
+ ExtUtils::MakeMaker: 6.59
+configure_requires:
+ ExtUtils::MakeMaker: 0
+dynamic_config: 0
+generated_by: 'ExtUtils::MakeMaker version 6.64, CPAN::Meta::Converter version
2.120921'
+license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: Module-Install-ExtraTests
+no_index:
+ directory:
+ - t
+ - inc
+requires:
+ perl: 5.006
+version: 0.008
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Module-Install-ExtraTests-0.007/inc/Module/Install/Base.pm
new/Module-Install-ExtraTests-0.008/inc/Module/Install/Base.pm
--- old/Module-Install-ExtraTests-0.007/inc/Module/Install/Base.pm
2010-04-24 01:13:38.000000000 +0200
+++ new/Module-Install-ExtraTests-0.008/inc/Module/Install/Base.pm
2012-12-30 02:11:30.000000000 +0100
@@ -4,7 +4,7 @@
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
- $VERSION = '0.95';
+ $VERSION = '1.06';
}
# Suspend handler for "redefined" warnings
@@ -51,13 +51,18 @@
#line 106
sub is_admin {
- $_[0]->admin->VERSION;
+ ! $_[0]->admin->isa('Module::Install::Base::FakeAdmin');
}
sub DESTROY {}
package Module::Install::Base::FakeAdmin;
+use vars qw{$VERSION};
+BEGIN {
+ $VERSION = $Module::Install::Base::VERSION;
+}
+
my $fake;
sub new {
@@ -75,4 +80,4 @@
1;
-#line 154
+#line 159
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Module-Install-ExtraTests-0.007/inc/Module/Install/Can.pm
new/Module-Install-ExtraTests-0.008/inc/Module/Install/Can.pm
--- old/Module-Install-ExtraTests-0.007/inc/Module/Install/Can.pm
2010-04-24 01:13:38.000000000 +0200
+++ new/Module-Install-ExtraTests-0.008/inc/Module/Install/Can.pm
2012-12-30 02:11:30.000000000 +0100
@@ -3,13 +3,12 @@
use strict;
use Config ();
-use File::Spec ();
use ExtUtils::MakeMaker ();
use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.95';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -29,7 +28,7 @@
eval { require $mod; $pkg->VERSION($ver || 0); 1 };
}
-# check if we can run some command
+# Check if we can run some command
sub can_run {
my ($self, $cmd) = @_;
@@ -38,14 +37,88 @@
for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
next if $dir eq '';
- my $abs = File::Spec->catfile($dir, $_[1]);
+ require File::Spec;
+ my $abs = File::Spec->catfile($dir, $cmd);
return $abs if (-x $abs or $abs = MM->maybe_command($abs));
}
return;
}
-# can we locate a (the) C compiler
+# Can our C compiler environment build XS files
+sub can_xs {
+ my $self = shift;
+
+ # Ensure we have the CBuilder module
+ $self->configure_requires( 'ExtUtils::CBuilder' => 0.27 );
+
+ # Do we have the configure_requires checker?
+ local $@;
+ eval "require ExtUtils::CBuilder;";
+ if ( $@ ) {
+ # They don't obey configure_requires, so it is
+ # someone old and delicate. Try to avoid hurting
+ # them by falling back to an older simpler test.
+ return $self->can_cc();
+ }
+
+ # Do we have a working C compiler
+ my $builder = ExtUtils::CBuilder->new(
+ quiet => 1,
+ );
+ unless ( $builder->have_compiler ) {
+ # No working C compiler
+ return 0;
+ }
+
+ # Write a C file representative of what XS becomes
+ require File::Temp;
+ my ( $FH, $tmpfile ) = File::Temp::tempfile(
+ "compilexs-XXXXX",
+ SUFFIX => '.c',
+ );
+ binmode $FH;
+ print $FH <<'END_C';
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+int main(int argc, char **argv) {
+ return 0;
+}
+
+int boot_sanexs() {
+ return 1;
+}
+
+END_C
+ close $FH;
+
+ # Can the C compiler access the same headers XS does
+ my @libs = ();
+ my $object = undef;
+ eval {
+ local $^W = 0;
+ $object = $builder->compile(
+ source => $tmpfile,
+ );
+ @libs = $builder->link(
+ objects => $object,
+ module_name => 'sanexs',
+ );
+ };
+ my $result = $@ ? 0 : 1;
+
+ # Clean up all the build files
+ foreach ( $tmpfile, $object, @libs ) {
+ next unless defined $_;
+ 1 while unlink;
+ }
+
+ return $result;
+}
+
+# Can we locate a (the) C compiler
sub can_cc {
my $self = shift;
my @chunks = split(/ /, $Config::Config{cc}) or return;
@@ -78,4 +151,4 @@
__END__
-#line 156
+#line 236
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Module-Install-ExtraTests-0.007/inc/Module/Install/Fetch.pm
new/Module-Install-ExtraTests-0.008/inc/Module/Install/Fetch.pm
--- old/Module-Install-ExtraTests-0.007/inc/Module/Install/Fetch.pm
2010-04-24 01:13:38.000000000 +0200
+++ new/Module-Install-ExtraTests-0.008/inc/Module/Install/Fetch.pm
2012-12-30 02:11:30.000000000 +0100
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.95';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Module-Install-ExtraTests-0.007/inc/Module/Install/Makefile.pm
new/Module-Install-ExtraTests-0.008/inc/Module/Install/Makefile.pm
--- old/Module-Install-ExtraTests-0.007/inc/Module/Install/Makefile.pm
2010-04-24 01:13:38.000000000 +0200
+++ new/Module-Install-ExtraTests-0.008/inc/Module/Install/Makefile.pm
2012-12-30 02:11:30.000000000 +0100
@@ -4,10 +4,11 @@
use strict 'vars';
use ExtUtils::MakeMaker ();
use Module::Install::Base ();
+use Fcntl qw/:flock :seek/;
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.95';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -101,24 +102,26 @@
my ($self, %new_args) = @_;
my $args = ( $self->{makemaker_args} ||= {} );
foreach my $key (keys %new_args) {
- if ($makemaker_argtype{$key} eq 'ARRAY') {
- $args->{$key} = [] unless defined $args->{$key};
- unless (ref $args->{$key} eq 'ARRAY') {
- $args->{$key} = [$args->{$key}]
+ if ($makemaker_argtype{$key}) {
+ if ($makemaker_argtype{$key} eq 'ARRAY') {
+ $args->{$key} = [] unless defined $args->{$key};
+ unless (ref $args->{$key} eq 'ARRAY') {
+ $args->{$key} = [$args->{$key}]
+ }
+ push @{$args->{$key}},
+ ref $new_args{$key} eq 'ARRAY'
+ ? @{$new_args{$key}}
+ : $new_args{$key};
}
- push @{$args->{$key}},
- ref $new_args{$key} eq 'ARRAY'
- ? @{$new_args{$key}}
- : $new_args{$key};
- }
- elsif ($makemaker_argtype{$key} eq 'HASH') {
- $args->{$key} = {} unless defined $args->{$key};
- foreach my $skey (keys %{ $new_args{$key} }) {
- $args->{$key}{$skey} = $new_args{$key}{$skey};
+ elsif ($makemaker_argtype{$key} eq 'HASH') {
+ $args->{$key} = {} unless defined $args->{$key};
+ foreach my $skey (keys %{ $new_args{$key} }) {
+ $args->{$key}{$skey} =
$new_args{$key}{$skey};
+ }
+ }
+ elsif ($makemaker_argtype{$key} eq 'APPENDABLE') {
+ $self->makemaker_append($key =>
$new_args{$key});
}
- }
- elsif ($makemaker_argtype{$key} eq 'APPENDABLE') {
- $self->makemaker_append($key => $new_args{$key});
}
else {
if (defined $args->{$key}) {
@@ -178,28 +181,22 @@
$self->makemaker_args( INC => shift );
}
-my %test_dir = ();
-
sub _wanted_t {
- /\.t$/ and -f $_ and $test_dir{$File::Find::dir} = 1;
}
sub tests_recursive {
my $self = shift;
- if ( $self->tests ) {
- die "tests_recursive will not work if tests are already
defined";
- }
my $dir = shift || 't';
unless ( -d $dir ) {
die "tests_recursive dir '$dir' does not exist";
}
- %test_dir = ();
+ my %tests = map { $_ => 1 } split / /, ($self->tests || '');
require File::Find;
- File::Find::find( \&_wanted_t, $dir );
- if ( -d 'xt' and ($Module::Install::AUTHOR or $ENV{RELEASE_TESTING}) ) {
- File::Find::find( \&_wanted_t, 'xt' );
- }
- $self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir );
+ File::Find::find(
+ sub { /\.t$/ and -f $_ and $tests{"$File::Find::dir/*.t"} = 1 },
+ $dir
+ );
+ $self->tests( join ' ', sort keys %tests );
}
sub write {
@@ -218,18 +215,22 @@
require ExtUtils::MakeMaker;
if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) {
- # MakeMaker can complain about module versions that include
- # an underscore, even though its own version may contain one!
- # Hence the funny regexp to get rid of it. See RT #35800
- # for details.
- my $v = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/;
- $self->build_requires( 'ExtUtils::MakeMaker' => $v );
- $self->configure_requires( 'ExtUtils::MakeMaker' => $v );
+ # This previous attempted to inherit the version of
+ # ExtUtils::MakeMaker in use by the module author, but this
+ # was found to be untenable as some authors build releases
+ # using future dev versions of EU:MM that nobody else has.
+ # Instead, #toolchain suggests we use 6.59 which is the most
+ # stable version on CPAN at time of writing and is, to quote
+ # ribasushi, "not terminally fucked, > and tested enough".
+ # TODO: We will now need to maintain this over time to push
+ # the version up as new versions are released.
+ $self->build_requires( 'ExtUtils::MakeMaker' => 6.59 );
+ $self->configure_requires( 'ExtUtils::MakeMaker' => 6.59 );
} else {
# Allow legacy-compatibility with 5.005 by depending on the
# most recent EU:MM that supported 5.005.
- $self->build_requires( 'ExtUtils::MakeMaker' => 6.42 );
- $self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 );
+ $self->build_requires( 'ExtUtils::MakeMaker' => 6.36 );
+ $self->configure_requires( 'ExtUtils::MakeMaker' => 6.36 );
}
# Generate the MakeMaker params
@@ -244,13 +245,15 @@
'all_from' if you prefer) in Makefile.PL.
EOT
- $DB::single = 1;
if ( $self->tests ) {
my @tests = split ' ', $self->tests;
my %seen;
$args->{test} = {
TESTS => (join ' ', grep {!$seen{$_}++} @tests),
};
+ } elsif ( $Module::Install::ExtraTests::use_extratests ) {
+ # Module::Install::ExtraTests doesn't set $self->tests and does its
own tests via harness.
+ # So, just ignore our xt tests here.
} elsif ( -d 'xt' and ($Module::Install::AUTHOR or
$ENV{RELEASE_TESTING}) ) {
$args->{test} = {
TESTS => join( ' ', map { "$_/*.t" } grep { -d $_ } qw{
t xt } ),
@@ -297,13 +300,22 @@
# Remove any reference to perl, BUILD_REQUIRES doesn't support it
delete $args->{BUILD_REQUIRES}->{perl};
- # Delete bundled dists from prereq_pm
- my $subdirs = ($args->{DIR} ||= []);
+ # Delete bundled dists from prereq_pm, add it to Makefile DIR
+ my $subdirs = ($args->{DIR} || []);
if ($self->bundles) {
+ my %processed;
foreach my $bundle (@{ $self->bundles }) {
- my ($file, $dir) = @$bundle;
- push @$subdirs, $dir if -d $dir;
- delete $build_prereq->{$file}; #Delete from build
prereqs only
+ my ($mod_name, $dist_dir) = @$bundle;
+ delete $prereq->{$mod_name};
+ $dist_dir = File::Basename::basename($dist_dir); # dir
for building this module
+ if (not exists $processed{$dist_dir}) {
+ if (-d $dist_dir) {
+ # List as sub-directory to be processed
by make
+ push @$subdirs, $dist_dir;
+ }
+ # Else do nothing: the module is already
present on the system
+ $processed{$dist_dir} = undef;
+ }
}
}
@@ -356,9 +368,9 @@
. ($self->postamble || '');
local *MAKEFILE;
- open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't
open $makefile_name: $!";
+ open MAKEFILE, "+< $makefile_name" or die "fix_up_makefile: Couldn't
open $makefile_name: $!";
+ eval { flock MAKEFILE, LOCK_EX };
my $makefile = do { local $/; <MAKEFILE> };
- close MAKEFILE or die $!;
$makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
$makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
@@ -378,7 +390,8 @@
# XXX - This is currently unused; not sure if it breaks other MM-users
# $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg;
- open MAKEFILE, "> $makefile_name" or die "fix_up_makefile: Couldn't
open $makefile_name: $!";
+ seek MAKEFILE, 0, SEEK_SET;
+ truncate MAKEFILE, 0;
print MAKEFILE "$preamble$makefile$postamble" or die $!;
close MAKEFILE or die $!;
@@ -402,4 +415,4 @@
__END__
-#line 531
+#line 544
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Module-Install-ExtraTests-0.007/inc/Module/Install/Metadata.pm
new/Module-Install-ExtraTests-0.008/inc/Module/Install/Metadata.pm
--- old/Module-Install-ExtraTests-0.007/inc/Module/Install/Metadata.pm
2010-04-24 01:13:38.000000000 +0200
+++ new/Module-Install-ExtraTests-0.008/inc/Module/Install/Metadata.pm
2012-12-30 02:11:30.000000000 +0100
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.95';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -151,15 +151,21 @@
sub install_as_vendor { $_[0]->installdirs('vendor') }
sub dynamic_config {
- my $self = shift;
- unless ( @_ ) {
- warn "You MUST provide an explicit true/false value to
dynamic_config\n";
- return $self;
+ my $self = shift;
+ my $value = @_ ? shift : 1;
+ if ( $self->{values}->{dynamic_config} ) {
+ # Once dynamic we never change to static, for safety
+ return 0;
}
- $self->{values}->{dynamic_config} = $_[0] ? 1 : 0;
+ $self->{values}->{dynamic_config} = $value ? 1 : 0;
return 1;
}
+# Convenience command
+sub static_config {
+ shift->dynamic_config(0);
+}
+
sub perl_version {
my $self = shift;
return $self->{values}->{perl_version} unless @_;
@@ -170,7 +176,7 @@
# Normalize the version
$version = $self->_perl_version($version);
- # We don't support the reall old versions
+ # We don't support the really old versions
unless ( $version >= 5.005 ) {
die "Module::Install only supports 5.005 or newer (use
ExtUtils::MakeMaker)\n";
}
@@ -178,43 +184,6 @@
$self->{values}->{perl_version} = $version;
}
-#Stolen from M::B
-my %license_urls = (
- perl => 'http://dev.perl.org/licenses/',
- apache => 'http://apache.org/licenses/LICENSE-2.0',
- artistic => 'http://opensource.org/licenses/artistic-license.php',
- artistic_2 => 'http://opensource.org/licenses/artistic-license-2.0.php',
- lgpl => 'http://opensource.org/licenses/lgpl-license.php',
- lgpl2 => 'http://opensource.org/licenses/lgpl-2.1.php',
- lgpl3 => 'http://opensource.org/licenses/lgpl-3.0.html',
- bsd => 'http://opensource.org/licenses/bsd-license.php',
- gpl => 'http://opensource.org/licenses/gpl-license.php',
- gpl2 => 'http://opensource.org/licenses/gpl-2.0.php',
- gpl3 => 'http://opensource.org/licenses/gpl-3.0.html',
- mit => 'http://opensource.org/licenses/mit-license.php',
- mozilla => 'http://opensource.org/licenses/mozilla1.1.php',
- open_source => undef,
- unrestricted => undef,
- restrictive => undef,
- unknown => undef,
-);
-
-sub license {
- my $self = shift;
- return $self->{values}->{license} unless @_;
- my $license = shift or die(
- 'Did not provide a value to license()'
- );
- $self->{values}->{license} = $license;
-
- # Automatically fill in license URLs
- if ( $license_urls{$license} ) {
- $self->resources( license => $license_urls{$license} );
- }
-
- return 1;
-}
-
sub all_from {
my ( $self, $file ) = @_;
@@ -354,6 +323,9 @@
require ExtUtils::MM_Unix;
my ( $self, $file ) = @_;
$self->version( ExtUtils::MM_Unix->parse_version($file) );
+
+ # for version integrity check
+ $self->makemaker_args( VERSION_FROM => $file );
}
sub abstract_from {
@@ -364,7 +336,7 @@
{ DISTNAME => $self->name },
'ExtUtils::MM_Unix'
)->parse_abstract($file)
- );
+ );
}
# Add both distribution and module name
@@ -479,42 +451,90 @@
}
}
+#Stolen from M::B
+my %license_urls = (
+ perl => 'http://dev.perl.org/licenses/',
+ apache => 'http://apache.org/licenses/LICENSE-2.0',
+ apache_1_1 => 'http://apache.org/licenses/LICENSE-1.1',
+ artistic => 'http://opensource.org/licenses/artistic-license.php',
+ artistic_2 => 'http://opensource.org/licenses/artistic-license-2.0.php',
+ lgpl => 'http://opensource.org/licenses/lgpl-license.php',
+ lgpl2 => 'http://opensource.org/licenses/lgpl-2.1.php',
+ lgpl3 => 'http://opensource.org/licenses/lgpl-3.0.html',
+ bsd => 'http://opensource.org/licenses/bsd-license.php',
+ gpl => 'http://opensource.org/licenses/gpl-license.php',
+ gpl2 => 'http://opensource.org/licenses/gpl-2.0.php',
+ gpl3 => 'http://opensource.org/licenses/gpl-3.0.html',
+ mit => 'http://opensource.org/licenses/mit-license.php',
+ mozilla => 'http://opensource.org/licenses/mozilla1.1.php',
+ open_source => undef,
+ unrestricted => undef,
+ restrictive => undef,
+ unknown => undef,
+);
+
+sub license {
+ my $self = shift;
+ return $self->{values}->{license} unless @_;
+ my $license = shift or die(
+ 'Did not provide a value to license()'
+ );
+ $license = __extract_license($license) || lc $license;
+ $self->{values}->{license} = $license;
+
+ # Automatically fill in license URLs
+ if ( $license_urls{$license} ) {
+ $self->resources( license => $license_urls{$license} );
+ }
+
+ return 1;
+}
+
sub _extract_license {
my $pod = shift;
my $matched;
return __extract_license(
($matched) = $pod =~ m/
- (=head \d \s+ (?:licen[cs]e|licensing)\b.*?)
+ (=head \d \s+ L(?i:ICEN[CS]E|ICENSING)\b.*?)
(=head \d.*|=cut.*|)\z
- /ixms
+ /xms
) || __extract_license(
($matched) = $pod =~ m/
- (=head \d \s+ (?:copyrights?|legal)\b.*?)
+ (=head \d \s+ (?:C(?i:OPYRIGHTS?)|L(?i:EGAL))\b.*?)
(=head \d.*|=cut.*|)\z
- /ixms
+ /xms
);
}
sub __extract_license {
my $license_text = shift or return;
my @phrases = (
- 'under the same (?:terms|license) as (?:perl|the perl
programming language)' => 'perl', 1,
- 'under the terms of (?:perl|the perl programming language)
itself' => 'perl', 1,
- 'Artistic and GPL' => 'perl', 1,
- 'GNU general public license' => 'gpl', 1,
- 'GNU public license' => 'gpl', 1,
- 'GNU lesser general public license' => 'lgpl', 1,
- 'GNU lesser public license' => 'lgpl', 1,
- 'GNU library general public license' => 'lgpl', 1,
- 'GNU library public license' => 'lgpl', 1,
- 'BSD license' => 'bsd', 1,
- 'Artistic license' => 'artistic', 1,
- 'GPL' => 'gpl', 1,
- 'LGPL' => 'lgpl', 1,
- 'BSD' => 'bsd', 1,
- 'Artistic' => 'artistic', 1,
- 'MIT' => 'mit', 1,
- 'proprietary' => 'proprietary', 0,
+ '(?:under )?the same (?:terms|license) as (?:perl|the perl
(?:\d )?programming language)' => 'perl', 1,
+ '(?:under )?the terms of (?:perl|the perl programming language)
itself' => 'perl', 1,
+ 'Artistic and GPL' => 'perl', 1,
+ 'GNU general public license' => 'gpl', 1,
+ 'GNU public license' => 'gpl', 1,
+ 'GNU lesser general public license' => 'lgpl', 1,
+ 'GNU lesser public license' => 'lgpl', 1,
+ 'GNU library general public license' => 'lgpl', 1,
+ 'GNU library public license' => 'lgpl', 1,
+ 'GNU Free Documentation license' => 'unrestricted', 1,
+ 'GNU Affero General Public License' => 'open_source', 1,
+ '(?:Free)?BSD license' => 'bsd', 1,
+ 'Artistic license 2\.0' => 'artistic_2', 1,
+ 'Artistic license' => 'artistic', 1,
+ 'Apache (?:Software )?license' => 'apache', 1,
+ 'GPL' => 'gpl', 1,
+ 'LGPL' => 'lgpl', 1,
+ 'BSD' => 'bsd', 1,
+ 'Artistic' => 'artistic', 1,
+ 'MIT' => 'mit', 1,
+ 'Mozilla Public License' => 'mozilla', 1,
+ 'Q Public License' => 'open_source', 1,
+ 'OpenSSL License' => 'unrestricted', 1,
+ 'SSLeay License' => 'unrestricted', 1,
+ 'zlib License' => 'open_source', 1,
+ 'proprietary' => 'proprietary', 0,
);
while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
$pattern =~ s#\s+#\\s+#gs;
@@ -522,6 +542,7 @@
return $license;
}
}
+ return '';
}
sub license_from {
@@ -536,9 +557,9 @@
sub _extract_bugtracker {
my @links = $_[0] =~ m#L<(
- \Qhttp://rt.cpan.org/\E[^>]+|
- \Qhttp://github.com/\E[\w_]+/[\w_]+/issues|
- \Qhttp://code.google.com/p/\E[\w_\-]+/issues/list
+ https?\Q://rt.cpan.org/\E[^>]+|
+ https?\Q://github.com/\E[\w_]+/[\w_]+/issues|
+ https?\Q://code.google.com/p/\E[\w_\-]+/issues/list
)>#gx;
my %links;
@links{@links}=();
@@ -567,7 +588,7 @@
sub requires_from {
my $self = shift;
my $content = Module::Install::_readperl($_[0]);
- my @requires = $content =~
m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg;
+ my @requires = $content =~
m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+(v?[\d\.]+)/mg;
while ( @requires ) {
my $module = shift @requires;
my $version = shift @requires;
@@ -602,8 +623,15 @@
return $v;
}
-
-
+sub add_metadata {
+ my $self = shift;
+ my %hash = @_;
+ for my $key (keys %hash) {
+ warn "add_metadata: $key is not prefixed with 'x_'.\n" .
+ "Use appopriate function to add non-private metadata.\n" unless
$key =~ /^x_/;
+ $self->{values}->{$key} = $hash{$key};
+ }
+}
######################################################################
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Module-Install-ExtraTests-0.007/inc/Module/Install/Win32.pm
new/Module-Install-ExtraTests-0.008/inc/Module/Install/Win32.pm
--- old/Module-Install-ExtraTests-0.007/inc/Module/Install/Win32.pm
2010-04-24 01:13:38.000000000 +0200
+++ new/Module-Install-ExtraTests-0.008/inc/Module/Install/Win32.pm
2012-12-30 02:11:30.000000000 +0100
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.95';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Module-Install-ExtraTests-0.007/inc/Module/Install/WriteAll.pm
new/Module-Install-ExtraTests-0.008/inc/Module/Install/WriteAll.pm
--- old/Module-Install-ExtraTests-0.007/inc/Module/Install/WriteAll.pm
2010-04-24 01:13:38.000000000 +0200
+++ new/Module-Install-ExtraTests-0.008/inc/Module/Install/WriteAll.pm
2012-12-30 02:11:30.000000000 +0100
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.95';;
+ $VERSION = '1.06';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Module-Install-ExtraTests-0.007/inc/Module/Install.pm
new/Module-Install-ExtraTests-0.008/inc/Module/Install.pm
--- old/Module-Install-ExtraTests-0.007/inc/Module/Install.pm 2010-04-24
01:13:38.000000000 +0200
+++ new/Module-Install-ExtraTests-0.008/inc/Module/Install.pm 2012-12-30
02:11:30.000000000 +0100
@@ -22,7 +22,6 @@
use Cwd ();
use File::Find ();
use File::Path ();
-use FindBin;
use vars qw{$VERSION $MAIN};
BEGIN {
@@ -32,7 +31,7 @@
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '0.95';
+ $VERSION = '1.06';
# Storage for the pseudo-singleton
$MAIN = undef;
@@ -127,6 +126,11 @@
#-------------------------------------------------------------
unless ( -f $self->{file} ) {
+ foreach my $key (keys %INC) {
+ delete $INC{$key} if $key =~ /Module\/Install/;
+ }
+
+ local $^W;
require "$self->{path}/$self->{dispatch}.pm";
File::Path::mkpath("$self->{prefix}/$self->{author}");
$self->{admin} = "$self->{name}::$self->{dispatch}"->new( _top
=> $self );
@@ -135,12 +139,13 @@
goto &{"$self->{name}::import"};
}
+ local $^W;
*{"${who}::AUTOLOAD"} = $self->autoload;
$self->preload;
# Unregister loader and worker packages so subdirs can use them again
- delete $INC{"$self->{file}"};
- delete $INC{"$self->{path}.pm"};
+ delete $INC{'inc/Module/Install.pm'};
+ delete $INC{'Module/Install.pm'};
# Save to the singleton
$MAIN = $self;
@@ -159,7 +164,21 @@
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
- $$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
+ unless ($$sym =~ s/([^:]+)$//) {
+ # XXX: it looks like we can't retrieve the missing
function
+ # via $$sym (usually $main::AUTOLOAD) in this case.
+ # I'm still wondering if we should slurp Makefile.PL to
+ # get some context or not ...
+ my ($package, $file, $line) = caller;
+ die <<"EOT";
+Unknown function is found at $file line $line.
+Execution of $file aborted due to runtime errors.
+
+If you're a contributor to a project, you may need to install
+some Module::Install extensions from CPAN (or other repository).
+If you're a user of a module, please contact the author.
+EOT
+ }
my $method = $1;
if ( uc($method) eq $method ) {
# Do nothing
@@ -200,6 +219,7 @@
my $who = $self->_caller;
foreach my $name ( sort keys %seen ) {
+ local $^W;
*{"${who}::$name"} = sub {
${"${who}::AUTOLOAD"} = "${who}::$name";
goto &{"${who}::AUTOLOAD"};
@@ -210,12 +230,18 @@
sub new {
my ($class, %args) = @_;
+ delete $INC{'FindBin.pm'};
+ {
+ # to suppress the redefine warning
+ local $SIG{__WARN__} = sub {};
+ require FindBin;
+ }
+
# ignore the prefix on extension modules built from top level.
my $base_path = Cwd::abs_path($FindBin::Bin);
unless ( Cwd::abs_path(Cwd::cwd()) eq $base_path ) {
delete $args{prefix};
}
-
return $args{_self} if $args{_self};
$args{dispatch} ||= 'Admin';
@@ -268,8 +294,10 @@
sub load_extensions {
my ($self, $path, $top) = @_;
+ my $should_reload = 0;
unless ( grep { ! ref $_ and lc $_ eq lc $self->{prefix} } @INC ) {
unshift @INC, $self->{prefix};
+ $should_reload = 1;
}
foreach my $rv ( $self->find_extensions($path) ) {
@@ -277,12 +305,13 @@
next if $self->{pathnames}{$pkg};
local $@;
- my $new = eval { require $file; $pkg->can('new') };
+ my $new = eval { local $^W; require $file; $pkg->can('new') };
unless ( $new ) {
warn $@ if $@;
next;
}
- $self->{pathnames}{$pkg} = delete $INC{$file};
+ $self->{pathnames}{$pkg} =
+ $should_reload ? delete $INC{$file} : $INC{$file};
push @{$self->{extensions}}, &{$new}($pkg, _top => $top );
}
@@ -422,7 +451,7 @@
}
sub _cmp ($$) {
- _version($_[0]) <=> _version($_[1]);
+ _version($_[1]) <=> _version($_[2]);
}
# Cloned from Params::Util::_CLASS
@@ -438,4 +467,4 @@
1;
-# Copyright 2008 - 2010 Adam Kennedy.
+# Copyright 2008 - 2012 Adam Kennedy.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Module-Install-ExtraTests-0.007/lib/Module/Install/ExtraTests.pm
new/Module-Install-ExtraTests-0.008/lib/Module/Install/ExtraTests.pm
--- old/Module-Install-ExtraTests-0.007/lib/Module/Install/ExtraTests.pm
2010-04-24 01:06:57.000000000 +0200
+++ new/Module-Install-ExtraTests-0.008/lib/Module/Install/ExtraTests.pm
2012-12-30 02:09:10.000000000 +0100
@@ -5,7 +5,7 @@
use Module::Install::Base;
BEGIN {
- our $VERSION = '0.007';
+ our $VERSION = '0.008';
our $ISCORE = 1;
our @ISA = qw{Module::Install::Base};
}
@@ -117,7 +117,7 @@
=head1 VERSION
-0.001
+0.008
=head1 COMMANDS
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]