r6578 - in /branches/upstream/libclass-inspector-perl/current: ./ inc/Module/ inc/Module/Install/ lib/Class/ t/
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Mon Aug 13 19:47:53 UTC 2007
Author: dmn
Date: Mon Aug 13 19:47:53 2007
New Revision: 6578
URL: http://svn.debian.org/wsvn/?sc=1&rev=6578
Log:
[svn-upgrade] Integrating new upstream version, libclass-inspector-perl (1.17)
Added:
branches/upstream/libclass-inspector-perl/current/t/99_author.t
Removed:
branches/upstream/libclass-inspector-perl/current/t/99_pod.t
Modified:
branches/upstream/libclass-inspector-perl/current/Changes
branches/upstream/libclass-inspector-perl/current/MANIFEST
branches/upstream/libclass-inspector-perl/current/META.yml
branches/upstream/libclass-inspector-perl/current/Makefile.PL
branches/upstream/libclass-inspector-perl/current/README
branches/upstream/libclass-inspector-perl/current/inc/Module/Install.pm
branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Base.pm
branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Can.pm
branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Fetch.pm
branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Makefile.pm
branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Metadata.pm
branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Win32.pm
branches/upstream/libclass-inspector-perl/current/inc/Module/Install/WriteAll.pm
branches/upstream/libclass-inspector-perl/current/lib/Class/Inspector.pm
branches/upstream/libclass-inspector-perl/current/t/01_compile.t
branches/upstream/libclass-inspector-perl/current/t/02_main.t
Modified: branches/upstream/libclass-inspector-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libclass-inspector-perl/current/Changes?rev=6578&op=diff
==============================================================================
--- branches/upstream/libclass-inspector-perl/current/Changes (original)
+++ branches/upstream/libclass-inspector-perl/current/Changes Mon Aug 13 19:47:53 2007
@@ -1,4 +1,9 @@
Revision history for Perl extension Class::Inspector.
+
+1.17 Mon 6 Aug 2007
+ - Classes with leading numbers after the first :: are permitted
+ - Removing some old cruft from the tests
+ - Updated to Module::Install 0.65
1.16 Wed 10 May 2006
- This release contains only build-time changes
Modified: branches/upstream/libclass-inspector-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/branches/upstream/libclass-inspector-perl/current/MANIFEST?rev=6578&op=diff
==============================================================================
--- branches/upstream/libclass-inspector-perl/current/MANIFEST (original)
+++ branches/upstream/libclass-inspector-perl/current/MANIFEST Mon Aug 13 19:47:53 2007
@@ -15,4 +15,4 @@
README
t/01_compile.t
t/02_main.t
-t/99_pod.t
+t/99_author.t
Modified: branches/upstream/libclass-inspector-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libclass-inspector-perl/current/META.yml?rev=6578&op=diff
==============================================================================
--- branches/upstream/libclass-inspector-perl/current/META.yml (original)
+++ branches/upstream/libclass-inspector-perl/current/META.yml Mon Aug 13 19:47:53 2007
@@ -1,17 +1,20 @@
-
-no_index:
- directory:
+---
+abstract: Get information about a class and its structure
+author: 'Adam Kennedy <adamk at cpan.org>'
+build_requires:
+ Test::More: 0.47
+distribution_type: module
+generated_by: Module::Install version 0.67
+license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.3.html
+ version: 1.3
+name: Class-Inspector
+no_index:
+ directory:
- inc
- t
-generated_by: Module::Install version 0.62
-distribution_type: module
-version: 1.16
-name: Class-Inspector
-author: Adam Kennedy <cpan at ali.as>
-license: perl
-build_requires:
- Test::More: 0.47
-requires:
+requires:
+ File::Spec: 0.80
perl: 5.005
- File::Spec: 0.80
-abstract: Get information about a class and its structure
+version: 1.17
Modified: branches/upstream/libclass-inspector-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libclass-inspector-perl/current/Makefile.PL?rev=6578&op=diff
==============================================================================
--- branches/upstream/libclass-inspector-perl/current/Makefile.PL (original)
+++ branches/upstream/libclass-inspector-perl/current/Makefile.PL Mon Aug 13 19:47:53 2007
@@ -1,3 +1,4 @@
+use strict;
use inc::Module::Install;
name 'Class-Inspector';
Modified: branches/upstream/libclass-inspector-perl/current/README
URL: http://svn.debian.org/wsvn/branches/upstream/libclass-inspector-perl/current/README?rev=6578&op=diff
==============================================================================
--- branches/upstream/libclass-inspector-perl/current/README (original)
+++ branches/upstream/libclass-inspector-perl/current/README Mon Aug 13 19:47:53 2007
@@ -197,13 +197,13 @@
author.
AUTHOR
- Adam Kennedy <cpan at ali.as>
+ Adam Kennedy <adamk at cpan.org>
SEE ALSO
<http://ali.as/>, Class::Handle
COPYRIGHT
- Copyright (c) 2002 - 2006 Adam Kennedy. All rights reserved.
+ Copyright (c) 2002 - 2006 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Modified: branches/upstream/libclass-inspector-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libclass-inspector-perl/current/inc/Module/Install.pm?rev=6578&op=diff
==============================================================================
--- branches/upstream/libclass-inspector-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/libclass-inspector-perl/current/inc/Module/Install.pm Mon Aug 13 19:47:53 2007
@@ -28,7 +28,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.62';
+ $VERSION = '0.67';
}
# Whether or not inc::Module::Install is actually loaded, the
@@ -51,6 +51,22 @@
END_DIE
}
+# If the script that is loading Module::Install is from the future,
+# then make will detect this and cause it to re-run over and over
+# again. This is bad. Rather than taking action to touch it (which
+# is unreliable on some platforms and requires write permissions)
+# for now we should catch this and refuse to run.
+if ( -f $0 and (stat($0))[9] > time ) {
+ die << "END_DIE";
+Your installer $0 has a modification time in the future.
+
+This is known to create infinite loops in make.
+
+Please correct this, then run $0 again.
+
+END_DIE
+}
+
use Cwd ();
use File::Find ();
use File::Path ();
@@ -116,7 +132,7 @@
my %seen;
foreach my $obj ( @exts ) {
while (my ($method, $glob) = each %{ref($obj) . '::'}) {
- next unless exists &{ref($obj).'::'.$method};
+ next unless $obj->can($method);
next if $method =~ /^_/;
next if $method eq uc($method);
$seen{$method}++;
Modified: branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Base.pm?rev=6578&op=diff
==============================================================================
--- branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Base.pm Mon Aug 13 19:47:53 2007
@@ -1,7 +1,7 @@
#line 1
package Module::Install::Base;
-$VERSION = '0.62';
+$VERSION = '0.67';
# Suspend handler for "redefined" warnings
BEGIN {
Modified: branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Can.pm?rev=6578&op=diff
==============================================================================
--- branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Can.pm (original)
+++ branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Can.pm Mon Aug 13 19:47:53 2007
@@ -11,7 +11,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.62';
+ $VERSION = '0.67';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Fetch.pm?rev=6578&op=diff
==============================================================================
--- branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Fetch.pm (original)
+++ branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Fetch.pm Mon Aug 13 19:47:53 2007
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.62';
+ $VERSION = '0.67';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Makefile.pm?rev=6578&op=diff
==============================================================================
--- branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Makefile.pm Mon Aug 13 19:47:53 2007
@@ -7,7 +7,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.62';
+ $VERSION = '0.67';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
@@ -17,189 +17,221 @@
my %seen = ();
sub prompt {
- shift;
-
- # Infinite loop protection
- my @c = caller();
- if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
- die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
- }
-
- # In automated testing, always use defaults
- if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
- local $ENV{PERL_MM_USE_DEFAULT} = 1;
- goto &ExtUtils::MakeMaker::prompt;
- } else {
- goto &ExtUtils::MakeMaker::prompt;
- }
+ shift;
+
+ # Infinite loop protection
+ my @c = caller();
+ if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
+ die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
+ }
+
+ # In automated testing, always use defaults
+ if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
+ local $ENV{PERL_MM_USE_DEFAULT} = 1;
+ goto &ExtUtils::MakeMaker::prompt;
+ } else {
+ goto &ExtUtils::MakeMaker::prompt;
+ }
}
sub makemaker_args {
- my $self = shift;
- my $args = ($self->{makemaker_args} ||= {});
- %$args = ( %$args, @_ ) if @_;
- $args;
+ my $self = shift;
+ my $args = ($self->{makemaker_args} ||= {});
+ %$args = ( %$args, @_ ) if @_;
+ $args;
}
# For mm args that take multiple space-seperated args,
# append an argument to the current list.
sub makemaker_append {
- my $self = shift;
- my $name = shift;
- my $args = $self->makemaker_args;
- $args->{name} = defined $args->{$name}
- ? join( ' ', $args->{name}, @_ )
- : join( ' ', @_ );
+ my $self = sShift;
+ my $name = shift;
+ my $args = $self->makemaker_args;
+ $args->{name} = defined $args->{$name}
+ ? join( ' ', $args->{name}, @_ )
+ : join( ' ', @_ );
}
sub build_subdirs {
- my $self = shift;
- my $subdirs = $self->makemaker_args->{DIR} ||= [];
- for my $subdir (@_) {
- push @$subdirs, $subdir;
- }
+ my $self = shift;
+ my $subdirs = $self->makemaker_args->{DIR} ||= [];
+ for my $subdir (@_) {
+ push @$subdirs, $subdir;
+ }
}
sub clean_files {
- my $self = shift;
- my $clean = $self->makemaker_args->{clean} ||= {};
- %$clean = (
- %$clean,
- FILES => join(' ', grep length, $clean->{FILES}, @_),
- );
+ my $self = shift;
+ my $clean = $self->makemaker_args->{clean} ||= {};
+ %$clean = (
+ %$clean,
+ FILES => join(' ', grep length, $clean->{FILES}, @_),
+ );
}
sub realclean_files {
- my $self = shift;
- my $realclean = $self->makemaker_args->{realclean} ||= {};
- %$realclean = (
- %$realclean,
- FILES => join(' ', grep length, $realclean->{FILES}, @_),
- );
+ my $self = shift;
+ my $realclean = $self->makemaker_args->{realclean} ||= {};
+ %$realclean = (
+ %$realclean,
+ FILES => join(' ', grep length, $realclean->{FILES}, @_),
+ );
}
sub libs {
- my $self = shift;
- my $libs = ref $_[0] ? shift : [ shift ];
- $self->makemaker_args( LIBS => $libs );
+ my $self = shift;
+ my $libs = ref $_[0] ? shift : [ shift ];
+ $self->makemaker_args( LIBS => $libs );
}
sub inc {
- my $self = shift;
- $self->makemaker_args( INC => shift );
+ my $self = shift;
+ $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";
+ }
+ require File::Find;
+ %test_dir = ();
+ File::Find::find( \&_wanted_t, $dir );
+ $self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir );
}
sub write {
- my $self = shift;
- die "&Makefile->write() takes no arguments\n" if @_;
-
- my $args = $self->makemaker_args;
- $args->{DISTNAME} = $self->name;
- $args->{NAME} = $self->module_name || $self->name || $self->determine_NAME($args);
- $args->{VERSION} = $self->version || $self->determine_VERSION($args);
- $args->{NAME} =~ s/-/::/g;
- if ( $self->tests ) {
- $args->{test} = { TESTS => $self->tests };
- }
- if ($] >= 5.005) {
- $args->{ABSTRACT} = $self->abstract;
- $args->{AUTHOR} = $self->author;
- }
- if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
- $args->{NO_META} = 1;
- }
- if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
- $args->{SIGN} = 1;
- }
- unless ( $self->is_admin ) {
- delete $args->{SIGN};
- }
-
- # merge both kinds of requires into prereq_pm
- my $prereq = ($args->{PREREQ_PM} ||= {});
- %$prereq = ( %$prereq, map { @$_ } map { @$_ } grep $_,
- ($self->build_requires, $self->requires) );
-
- # merge both kinds of requires into prereq_pm
- my $subdirs = ($args->{DIR} ||= []);
- if ($self->bundles) {
- foreach my $bundle (@{ $self->bundles }) {
- my ($file, $dir) = @$bundle;
- push @$subdirs, $dir if -d $dir;
- delete $prereq->{$file};
- }
- }
-
- if ( my $perl_version = $self->perl_version ) {
- eval "use $perl_version; 1"
- or die "ERROR: perl: Version $] is installed, "
- . "but we need version >= $perl_version";
- }
-
- my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
- if ($self->admin->preop) {
- $args{dist} = $self->admin->preop;
- }
-
- my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
- $self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile');
+ my $self = shift;
+ die "&Makefile->write() takes no arguments\n" if @_;
+
+ my $args = $self->makemaker_args;
+ $args->{DISTNAME} = $self->name;
+ $args->{NAME} = $self->module_name || $self->name || $self->determine_NAME($args);
+ $args->{VERSION} = $self->version || $self->determine_VERSION($args);
+ $args->{NAME} =~ s/-/::/g;
+ if ( $self->tests ) {
+ $args->{test} = { TESTS => $self->tests };
+ }
+ if ($] >= 5.005) {
+ $args->{ABSTRACT} = $self->abstract;
+ $args->{AUTHOR} = $self->author;
+ }
+ if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
+ $args->{NO_META} = 1;
+ }
+ if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
+ $args->{SIGN} = 1;
+ }
+ unless ( $self->is_admin ) {
+ delete $args->{SIGN};
+ }
+
+ # merge both kinds of requires into prereq_pm
+ my $prereq = ($args->{PREREQ_PM} ||= {});
+ %$prereq = ( %$prereq,
+ map { @$_ }
+ map { @$_ }
+ grep $_,
+ ($self->build_requires, $self->requires)
+ );
+
+ # merge both kinds of requires into prereq_pm
+ my $subdirs = ($args->{DIR} ||= []);
+ if ($self->bundles) {
+ foreach my $bundle (@{ $self->bundles }) {
+ my ($file, $dir) = @$bundle;
+ push @$subdirs, $dir if -d $dir;
+ delete $prereq->{$file};
+ }
+ }
+
+ if ( my $perl_version = $self->perl_version ) {
+ eval "use $perl_version; 1"
+ or die "ERROR: perl: Version $] is installed, "
+ . "but we need version >= $perl_version";
+ }
+
+ $args->{INSTALLDIRS} = $self->installdirs;
+
+ my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
+
+ my $user_preop = delete $args{dist}->{PREOP};
+ if (my $preop = $self->admin->preop($user_preop)) {
+ $args{dist} = $preop;
+ }
+
+ my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
+ $self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile');
}
sub fix_up_makefile {
- my $self = shift;
- my $makefile_name = shift;
- my $top_class = ref($self->_top) || '';
- my $top_version = $self->_top->VERSION || '';
-
- my $preamble = $self->preamble
- ? "# Preamble by $top_class $top_version\n"
- . $self->preamble
- : '';
- my $postamble = "# Postamble by $top_class $top_version\n"
- . ($self->postamble || '');
-
- local *MAKEFILE;
- open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
- 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;
- $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
- $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
- $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
-
- # Module::Install will never be used to build the Core Perl
- # Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks
- # PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist
- $makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m;
- #$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m;
-
- # 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: $!";
- print MAKEFILE "$preamble$makefile$postamble" or die $!;
- close MAKEFILE or die $!;
-
- 1;
+ my $self = shift;
+ my $makefile_name = shift;
+ my $top_class = ref($self->_top) || '';
+ my $top_version = $self->_top->VERSION || '';
+
+ my $preamble = $self->preamble
+ ? "# Preamble by $top_class $top_version\n"
+ . $self->preamble
+ : '';
+ my $postamble = "# Postamble by $top_class $top_version\n"
+ . ($self->postamble || '');
+
+ local *MAKEFILE;
+ open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
+ 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;
+ $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
+ $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
+ $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
+
+ # Module::Install will never be used to build the Core Perl
+ # Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks
+ # PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist
+ $makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m;
+ #$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m;
+
+ # Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well.
+ $makefile =~ s/("?)-I\$\(PERL_LIB\)\1//g;
+
+ # 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: $!";
+ print MAKEFILE "$preamble$makefile$postamble" or die $!;
+ close MAKEFILE or die $!;
+
+ 1;
}
sub preamble {
- my ($self, $text) = @_;
- $self->{preamble} = $text . $self->{preamble} if defined $text;
- $self->{preamble};
+ my ($self, $text) = @_;
+ $self->{preamble} = $text . $self->{preamble} if defined $text;
+ $self->{preamble};
}
sub postamble {
- my ($self, $text) = @_;
- $self->{postamble} ||= $self->admin->postamble;
- $self->{postamble} .= $text if defined $text;
- $self->{postamble}
+ my ($self, $text) = @_;
+ $self->{postamble} ||= $self->admin->postamble;
+ $self->{postamble} .= $text if defined $text;
+ $self->{postamble}
}
1;
__END__
-#line 331
+#line 363
Modified: branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Metadata.pm?rev=6578&op=diff
==============================================================================
--- branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Metadata.pm Mon Aug 13 19:47:53 2007
@@ -6,14 +6,14 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.62';
+ $VERSION = '0.67';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
my @scalar_keys = qw{
name module_name abstract author version license
- distribution_type perl_version tests
+ distribution_type perl_version tests installdirs
};
my @tuple_keys = qw{
@@ -56,9 +56,23 @@
};
}
+# configure_requires is currently a null-op
+sub configure_requires { 1 }
+
+# Aliases for build_requires that will have alternative
+# meanings in some future version of META.yml.
+sub test_requires { shift->build_requires(@_) }
+sub install_requires { shift->build_requires(@_) }
+
+# Aliases for installdirs options
+sub install_as_core { $_[0]->installdirs('perl') }
+sub install_as_cpan { $_[0]->installdirs('site') }
+sub install_as_site { $_[0]->installdirs('site') }
+sub install_as_vendor { $_[0]->installdirs('vendor') }
+
sub sign {
my $self = shift;
- return $self->{'values'}{'sign'} if defined wantarray and !@_;
+ return $self->{'values'}{'sign'} if defined wantarray and ! @_;
$self->{'values'}{'sign'} = ( @_ ? $_[0] : 1 );
return $self;
}
@@ -123,9 +137,9 @@
require Module::Build;
my $build = Module::Build->new(
- dist_name => $self->{name},
- dist_version => $self->{version},
- license => $self->{license},
+ dist_name => $self->name,
+ dist_version => $self->version,
+ license => $self->license,
);
$self->provides(%{ $build->find_dist_packages || {} });
}
@@ -279,9 +293,11 @@
if (
$self->_slurp($file) =~ m/
- =head \d \s+
- (?:licen[cs]e|licensing|copyright|legal)\b
- (.*?)
+ (
+ =head \d \s+
+ (?:licen[cs]e|licensing|copyright|legal)\b
+ .*?
+ )
(=head\\d.*|=cut.*|)
\z
/ixms
@@ -289,19 +305,24 @@
{
my $license_text = $1;
my @phrases = (
- 'under the same (?:terms|license) as perl itself' => 'perl',
- 'GNU public license' => 'gpl',
- 'GNU lesser public license' => 'gpl',
- 'BSD license' => 'bsd',
- 'Artistic license' => 'artistic',
- 'GPL' => 'gpl',
- 'LGPL' => 'lgpl',
- 'BSD' => 'bsd',
- 'Artistic' => 'artistic',
+ 'under the same (?:terms|license) as perl itself' => 'perl', 1,
+ 'GNU public license' => 'gpl', 1,
+ 'GNU lesser public license' => 'gpl', 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,
);
- while ( my ( $pattern, $license ) = splice( @phrases, 0, 2 ) ) {
+ while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
$pattern =~ s{\s+}{\\s+}g;
if ( $license_text =~ /\b$pattern\b/i ) {
+ if ( $osi and $license_text =~ /All rights reserved/i ) {
+ warn "LEGAL WARNING: 'All rights reserved' may invalidate Open Source licenses. Consider removing it.";
+ }
$self->license($license);
return 1;
}
Modified: branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Win32.pm?rev=6578&op=diff
==============================================================================
--- branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Win32.pm (original)
+++ branches/upstream/libclass-inspector-perl/current/inc/Module/Install/Win32.pm Mon Aug 13 19:47:53 2007
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.62';
+ $VERSION = '0.67';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: branches/upstream/libclass-inspector-perl/current/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libclass-inspector-perl/current/inc/Module/Install/WriteAll.pm?rev=6578&op=diff
==============================================================================
--- branches/upstream/libclass-inspector-perl/current/inc/Module/Install/WriteAll.pm (original)
+++ branches/upstream/libclass-inspector-perl/current/inc/Module/Install/WriteAll.pm Mon Aug 13 19:47:53 2007
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.62';
+ $VERSION = '0.67';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: branches/upstream/libclass-inspector-perl/current/lib/Class/Inspector.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libclass-inspector-perl/current/lib/Class/Inspector.pm?rev=6578&op=diff
==============================================================================
--- branches/upstream/libclass-inspector-perl/current/lib/Class/Inspector.pm (original)
+++ branches/upstream/libclass-inspector-perl/current/lib/Class/Inspector.pm Mon Aug 13 19:47:53 2007
@@ -48,11 +48,11 @@
# Globals
use vars qw{$VERSION $RE_IDENT $RE_CLASS $UNIX};
BEGIN {
- $VERSION = '1.16';
+ $VERSION = '1.17';
# Predefine some regexs
$RE_IDENT = qr/\A[^\W\d]\w*\z/s;
- $RE_CLASS = qr/\A[^\W\d]\w*(?:(?:'|::)[^\W\d]\w*)*\z/s;
+ $RE_CLASS = qr/\A[^\W\d]\w*(?:(?:'|::)\w+)*\z/s;
# Are we on something Unix-like?
$UNIX = !! ( $File::Spec::ISA[0] eq 'File::Spec::Unix' );
@@ -610,7 +610,7 @@
=head1 AUTHOR
-Adam Kennedy E<lt>cpan at ali.asE<gt>
+Adam Kennedy E<lt>adamk at cpan.orgE<gt>
=head1 SEE ALSO
@@ -618,7 +618,7 @@
=head1 COPYRIGHT
-Copyright (c) 2002 - 2006 Adam Kennedy. All rights reserved.
+Copyright (c) 2002 - 2006 Adam Kennedy.
This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.
Modified: branches/upstream/libclass-inspector-perl/current/t/01_compile.t
URL: http://svn.debian.org/wsvn/branches/upstream/libclass-inspector-perl/current/t/01_compile.t?rev=6578&op=diff
==============================================================================
--- branches/upstream/libclass-inspector-perl/current/t/01_compile.t (original)
+++ branches/upstream/libclass-inspector-perl/current/t/01_compile.t Mon Aug 13 19:47:53 2007
@@ -1,24 +1,13 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
# Load testing for Class::Inspector
# This test only tests that the module compiles.
use strict;
-use lib ();
-use File::Spec::Functions ':ALL';
BEGIN {
- $| = 1;
- unless ( $ENV{HARNESS_ACTIVE} ) {
- require FindBin;
- $FindBin::Bin = $FindBin::Bin; # Avoid a warning
- chdir catdir( $FindBin::Bin, updir() );
- lib->import(
- catdir('blib', 'arch'),
- catdir('blib', 'lib' ),
- catdir('lib'),
- );
- }
+ $| = 1;
+ $^W = 1;
}
use Test::More tests => 2;
Modified: branches/upstream/libclass-inspector-perl/current/t/02_main.t
URL: http://svn.debian.org/wsvn/branches/upstream/libclass-inspector-perl/current/t/02_main.t?rev=6578&op=diff
==============================================================================
--- branches/upstream/libclass-inspector-perl/current/t/02_main.t (original)
+++ branches/upstream/libclass-inspector-perl/current/t/02_main.t Mon Aug 13 19:47:53 2007
@@ -6,20 +6,9 @@
use strict;
-use lib ();
-use File::Spec::Functions ':ALL';
BEGIN {
- $| = 1;
- unless ( $ENV{HARNESS_ACTIVE} ) {
- require FindBin;
- $FindBin::Bin = $FindBin::Bin; # Avoid a warning
- chdir catdir( $FindBin::Bin, updir() );
- lib->import(
- catdir('blib', 'arch'),
- catdir('blib', 'lib' ),
- catdir('lib'),
- );
- }
+ $| = 1;
+ $^W = 1;
}
use Test::More tests => 54;
Added: branches/upstream/libclass-inspector-perl/current/t/99_author.t
URL: http://svn.debian.org/wsvn/branches/upstream/libclass-inspector-perl/current/t/99_author.t?rev=6578&op=file
==============================================================================
--- branches/upstream/libclass-inspector-perl/current/t/99_author.t (added)
+++ branches/upstream/libclass-inspector-perl/current/t/99_author.t Mon Aug 13 19:47:53 2007
@@ -1,0 +1,76 @@
+#!/usr/bin/perl
+
+use strict;
+BEGIN {
+ $| = 1;
+ $^W = 1;
+}
+use Test::More;
+
+# Skip if doing a regular install
+unless ( $ENV{AUTOMATED_TESTING} ) {
+ plan( skip_all => "Author tests not required for installation" );
+}
+
+# Load the testing modules
+eval "use Test::Pod 1.00";
+
+# Can we run the version tests
+eval "use Test::MinimumVersion;";
+
+
+
+
+
+#####################################################################
+# WARNING: INSANE BLACK MAGIC
+#####################################################################
+
+# Hack Pod::Simple::BlackBox to ignore the Test::Inline
+# "Extended Begin" syntax.
+# For example, "=begin has more than one word errors"
+my $begin;
+if ( $Test::Pod::VERSION ) {
+ $begin = \&Pod::Simple::BlackBox::_ponder_begin;
+}
+sub mybegin {
+ my $para = $_[1];
+ my $content = join ' ', splice @$para, 2;
+ $content =~ s/^\s+//s;
+ $content =~ s/\s+$//s;
+ my @words = split /\s+/, $content;
+ if ( $words[0] =~ /^test(?:ing)?\z/s ) {
+ foreach ( 2 .. $#$para ) {
+ $para->[$_] = '';
+ }
+ $para->[2] = $words[0];
+ }
+
+ # Continue as normal
+ push @$para, @words;
+ return &$begin(@_);
+}
+
+SCOPE: {
+ local $^W = 0;
+ if ( $Test::Pod::VERSION ) {
+ *Pod::Simple::BlackBox::_ponder_begin = \&mybegin;
+ }
+}
+
+#####################################################################
+# END BLACK MAGIC
+#####################################################################
+
+plan( 'no_plan' );
+ok( 1, "Running author tests" );
+
+# Test POD
+if ( $Test::Pod::VERSION ) {
+ all_pod_files_ok();
+}
+
+# Test version
+if ( $Test::MinimumVersion::VERSION and $Test::MinimumVersion::VERSION > 0.05 ) {
+ all_minimum_version_from_metayml_ok();
+}
More information about the Pkg-perl-cvs-commits
mailing list