r5732 - in /packages/libsub-exporter-perl/trunk: ./ debian/ inc/Module/ inc/Module/Install/ lib/Sub/ lib/Sub/Exporter/ t/

eloy at users.alioth.debian.org eloy at users.alioth.debian.org
Wed Jul 11 11:04:19 UTC 2007


Author: eloy
Date: Wed Jul 11 11:04:19 2007
New Revision: 5732

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=5732
Log:
new upstream version

Added:
    packages/libsub-exporter-perl/trunk/lib/Sub/Exporter/Cookbook.pod
      - copied unchanged from r5731, packages/libsub-exporter-perl/branches/upstream/current/lib/Sub/Exporter/Cookbook.pod
    packages/libsub-exporter-perl/trunk/t/util-currychain.t
      - copied unchanged from r5731, packages/libsub-exporter-perl/branches/upstream/current/t/util-currychain.t
Modified:
    packages/libsub-exporter-perl/trunk/Changes
    packages/libsub-exporter-perl/trunk/MANIFEST
    packages/libsub-exporter-perl/trunk/META.yml
    packages/libsub-exporter-perl/trunk/debian/changelog
    packages/libsub-exporter-perl/trunk/inc/Module/Install.pm
    packages/libsub-exporter-perl/trunk/inc/Module/Install/Base.pm
    packages/libsub-exporter-perl/trunk/inc/Module/Install/Can.pm
    packages/libsub-exporter-perl/trunk/inc/Module/Install/Fetch.pm
    packages/libsub-exporter-perl/trunk/inc/Module/Install/Makefile.pm
    packages/libsub-exporter-perl/trunk/inc/Module/Install/Metadata.pm
    packages/libsub-exporter-perl/trunk/inc/Module/Install/Win32.pm
    packages/libsub-exporter-perl/trunk/inc/Module/Install/WriteAll.pm
    packages/libsub-exporter-perl/trunk/lib/Sub/Exporter.pm
    packages/libsub-exporter-perl/trunk/lib/Sub/Exporter/Tutorial.pod
    packages/libsub-exporter-perl/trunk/lib/Sub/Exporter/Util.pm
    packages/libsub-exporter-perl/trunk/t/pod-coverage.t

Modified: packages/libsub-exporter-perl/trunk/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/trunk/Changes?rev=5732&op=diff
==============================================================================
--- packages/libsub-exporter-perl/trunk/Changes (original)
+++ packages/libsub-exporter-perl/trunk/Changes Wed Jul 11 11:04:19 2007
@@ -1,4 +1,10 @@
 Revision history for Sub-Exporter
+
+0.975   2007-07-04
+        update Tutorial to show (preferred) \'name' style for generators
+        changed "standard" name of curry_class to curry_method
+        added curry_chain
+        added Sub::Exporter::Cookbook
 
 0.974   2007-04-22
         fix a bug that didn't mind trying to export a routine that didn't exist

Modified: packages/libsub-exporter-perl/trunk/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/trunk/MANIFEST?rev=5732&op=diff
==============================================================================
--- packages/libsub-exporter-perl/trunk/MANIFEST (original)
+++ packages/libsub-exporter-perl/trunk/MANIFEST Wed Jul 11 11:04:19 2007
@@ -8,6 +8,7 @@
 inc/Module/Install/Win32.pm
 inc/Module/Install/WriteAll.pm
 lib/Sub/Exporter.pm
+lib/Sub/Exporter/Cookbook.pod
 lib/Sub/Exporter/Tutorial.pod
 lib/Sub/Exporter/Util.pm
 LICENSE
@@ -35,6 +36,7 @@
 t/real-export-href.t
 t/real-export-setup.t
 t/util-curry.t
+t/util-currychain.t
 t/util-like.t
 t/util-merge.t
 t/util-mixin.t

Modified: packages/libsub-exporter-perl/trunk/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/trunk/META.yml?rev=5732&op=diff
==============================================================================
--- packages/libsub-exporter-perl/trunk/META.yml (original)
+++ packages/libsub-exporter-perl/trunk/META.yml Wed Jul 11 11:04:19 2007
@@ -1,7 +1,7 @@
 --- 
 author: Ricardo SIGNES <rjbs at cpan.org>
 distribution_type: module
-generated_by: Module::Install version 0.65
+generated_by: Module::Install version 0.67
 license: perl
 meta-spec: 
   url: http://module-build.sourceforge.net/META-spec-v1.3.html
@@ -15,4 +15,4 @@
   Data::OptList: 0.1
   Params::Util: 0.14
   Sub::Install: 0.92
-version: 0.974
+version: 0.975

Modified: packages/libsub-exporter-perl/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/trunk/debian/changelog?rev=5732&op=diff
==============================================================================
--- packages/libsub-exporter-perl/trunk/debian/changelog (original)
+++ packages/libsub-exporter-perl/trunk/debian/changelog Wed Jul 11 11:04:19 2007
@@ -1,3 +1,9 @@
+libsub-exporter-perl (0.975-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org>  Wed, 11 Jul 2007 13:01:26 +0200
+
 libsub-exporter-perl (0.974-1) unstable; urgency=low
 
   * New upstream release

Modified: packages/libsub-exporter-perl/trunk/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/trunk/inc/Module/Install.pm?rev=5732&op=diff
==============================================================================
--- packages/libsub-exporter-perl/trunk/inc/Module/Install.pm (original)
+++ packages/libsub-exporter-perl/trunk/inc/Module/Install.pm Wed Jul 11 11:04:19 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.65';
+    $VERSION = '0.67';
 }
 
 # Whether or not inc::Module::Install is actually loaded, the

Modified: packages/libsub-exporter-perl/trunk/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/trunk/inc/Module/Install/Base.pm?rev=5732&op=diff
==============================================================================
--- packages/libsub-exporter-perl/trunk/inc/Module/Install/Base.pm (original)
+++ packages/libsub-exporter-perl/trunk/inc/Module/Install/Base.pm Wed Jul 11 11:04:19 2007
@@ -1,7 +1,7 @@
 #line 1
 package Module::Install::Base;
 
-$VERSION = '0.65';
+$VERSION = '0.67';
 
 # Suspend handler for "redefined" warnings
 BEGIN {

Modified: packages/libsub-exporter-perl/trunk/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/trunk/inc/Module/Install/Can.pm?rev=5732&op=diff
==============================================================================
--- packages/libsub-exporter-perl/trunk/inc/Module/Install/Can.pm (original)
+++ packages/libsub-exporter-perl/trunk/inc/Module/Install/Can.pm Wed Jul 11 11:04:19 2007
@@ -11,7 +11,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.65';
+	$VERSION = '0.67';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: packages/libsub-exporter-perl/trunk/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/trunk/inc/Module/Install/Fetch.pm?rev=5732&op=diff
==============================================================================
--- packages/libsub-exporter-perl/trunk/inc/Module/Install/Fetch.pm (original)
+++ packages/libsub-exporter-perl/trunk/inc/Module/Install/Fetch.pm Wed Jul 11 11:04:19 2007
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.65';
+	$VERSION = '0.67';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: packages/libsub-exporter-perl/trunk/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/trunk/inc/Module/Install/Makefile.pm?rev=5732&op=diff
==============================================================================
--- packages/libsub-exporter-perl/trunk/inc/Module/Install/Makefile.pm (original)
+++ packages/libsub-exporter-perl/trunk/inc/Module/Install/Makefile.pm Wed Jul 11 11:04:19 2007
@@ -7,7 +7,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.65';
+	$VERSION = '0.67';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -17,196 +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";
-    }
-
-    $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');
+	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;
-
-    # 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;
+	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 338
+#line 363

Modified: packages/libsub-exporter-perl/trunk/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/trunk/inc/Module/Install/Metadata.pm?rev=5732&op=diff
==============================================================================
--- packages/libsub-exporter-perl/trunk/inc/Module/Install/Metadata.pm (original)
+++ packages/libsub-exporter-perl/trunk/inc/Module/Install/Metadata.pm Wed Jul 11 11:04:19 2007
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.65';
+	$VERSION = '0.67';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -56,14 +56,23 @@
     };
 }
 
-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') }
+# 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;
 }
@@ -296,20 +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',
-            'MIT'                                             => 'MIT',
+            '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: packages/libsub-exporter-perl/trunk/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/trunk/inc/Module/Install/Win32.pm?rev=5732&op=diff
==============================================================================
--- packages/libsub-exporter-perl/trunk/inc/Module/Install/Win32.pm (original)
+++ packages/libsub-exporter-perl/trunk/inc/Module/Install/Win32.pm Wed Jul 11 11:04:19 2007
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.65';
+	$VERSION = '0.67';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: packages/libsub-exporter-perl/trunk/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/trunk/inc/Module/Install/WriteAll.pm?rev=5732&op=diff
==============================================================================
--- packages/libsub-exporter-perl/trunk/inc/Module/Install/WriteAll.pm (original)
+++ packages/libsub-exporter-perl/trunk/inc/Module/Install/WriteAll.pm Wed Jul 11 11:04:19 2007
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.65';
+	$VERSION = '0.67';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: packages/libsub-exporter-perl/trunk/lib/Sub/Exporter.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/trunk/lib/Sub/Exporter.pm?rev=5732&op=diff
==============================================================================
--- packages/libsub-exporter-perl/trunk/lib/Sub/Exporter.pm (original)
+++ packages/libsub-exporter-perl/trunk/lib/Sub/Exporter.pm Wed Jul 11 11:04:19 2007
@@ -14,13 +14,13 @@
 
 =head1 VERSION
 
-version 0.974
-
-  $Id: /my/cs/projects/Sub-Exporter/trunk/lib/Sub/Exporter.pm 31455 2007-04-22T13:38:51.095739Z rjbs  $
+version 0.975
+
+  $Id: /my/cs/projects/Sub-Exporter/trunk/lib/Sub/Exporter.pm 31990 2007-07-06T02:33:04.864653Z rjbs  $
 
 =cut
 
-our $VERSION = '0.974';
+our $VERSION = '0.975';
 
 =head1 SYNOPSIS
 
@@ -465,7 +465,7 @@
     delete $group_arg->{-prefix};
     delete $group_arg->{-suffix};
 
-    my $group = Params::Util::_CODELIKE($exports)
+    my $group = Params::Util::_CODELIKE($exports) ## no critic Private
               ? $exports->($class, $group_name, $group_arg, $collection)
               : $class->$$exports($group_name, $group_arg, $collection);
 
@@ -516,7 +516,7 @@
       };
 
       my $error_msg = "collection $name failed validation";
-      if (Params::Util::_SCALAR0($hook)) {
+      if (Params::Util::_SCALAR0($hook)) { ## no critic Private
         Carp::croak $error_msg unless $class->$$hook($value, $arg);
       } else {
         Carp::croak $error_msg unless $hook->($value, $arg);
@@ -765,7 +765,7 @@
   # overloading precedence would turn an overloaded-as-code generator object
   # into a string before code. -- rjbs, 2006-06-11
   return $generator->($class, $name, $arg, $collection)
-    if Params::Util::_CODELIKE($generator);
+    if Params::Util::_CODELIKE($generator); ## no critic Private
 
   # This "must" be a scalar reference, to a generator method name.
   # -- rjbs, 2006-12-05
@@ -950,14 +950,13 @@
 
 =head1 BUGS
 
-Please report any bugs or feature requests to C<bug-sub-exporter at rt.cpan.org>,
-or through the web interface at L<http://rt.cpan.org>. I will be notified, and
-then you'll automatically be notified of progress on your bug as I make
-changes.
+Please report any bugs or feature requests through the web interface at
+L<http://rt.cpan.org>. I will be notified, and then you'll automatically be
+notified of progress on your bug as I make changes.
 
 =head1 COPYRIGHT
 
-Copyright 2006 Ricardo SIGNES.  This program is free software;  you can
+Copyright 2006-2007, Ricardo SIGNES.  This program is free software;  you can
 redistribute it and/or modify it under the same terms as Perl itself.
 
 =cut

Modified: packages/libsub-exporter-perl/trunk/lib/Sub/Exporter/Tutorial.pod
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/trunk/lib/Sub/Exporter/Tutorial.pod?rev=5732&op=diff
==============================================================================
--- packages/libsub-exporter-perl/trunk/lib/Sub/Exporter/Tutorial.pod (original)
+++ packages/libsub-exporter-perl/trunk/lib/Sub/Exporter/Tutorial.pod Wed Jul 11 11:04:19 2007
@@ -5,7 +5,7 @@
 
 =head1 VERSION
 
-  $Id$
+  $Id: /my/cs/projects/Sub-Exporter/trunk/lib/Sub/Exporter/Tutorial.pod 31962 2007-07-04T02:29:46.946587Z rjbs  $
 
 =head1 DESCRIPTION
 
@@ -177,7 +177,7 @@
   }
 
   use Sub::Exporter -setup => {
-    exports => [ counter => \&_build_counter ],
+    exports => [ counter => \'_build_counter' ],
     groups  => { default => [ qw(counter) ] },
   };
 
@@ -189,6 +189,11 @@
 group, but Sub::Exporter arguments -- anything beginning with a dash -- are
 never passed in.  When groups are nested, the arguments are merged as the
 groups are expanded.
+
+Notice, too, that in the example above, we gave a reference to a method I<name>
+rather than a method I<implementation>.  By giving the name rather than the
+subroutine, we make it possible for subclasses of our "Package::Counter" module
+to replace the C<_build_counter> method.
 
 When a generator is called, it is passed four parameters:
 
@@ -257,7 +262,7 @@
 
 =head1 COPYRIGHT
 
-Copyright 2006 Ricardo SIGNES.  This program is free software;  you can
+Copyright 2007 Ricardo SIGNES.  This program is free software;  you can
 redistribute it and/or modify it under the same terms as Perl itself.
 
 =cut

Modified: packages/libsub-exporter-perl/trunk/lib/Sub/Exporter/Util.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/trunk/lib/Sub/Exporter/Util.pm?rev=5732&op=diff
==============================================================================
--- packages/libsub-exporter-perl/trunk/lib/Sub/Exporter/Util.pm (original)
+++ packages/libsub-exporter-perl/trunk/lib/Sub/Exporter/Util.pm Wed Jul 11 11:04:19 2007
@@ -3,19 +3,22 @@
 
 package Sub::Exporter::Util;
 
+use Data::OptList ();
+use Params::Util ();
+
 =head1 NAME
 
 Sub::Exporter::Util - utilities to make Sub::Exporter easier
 
 =head1 VERSION
 
-version 0.022
-
-  $Id$
-
-=cut
-
-our $VERSION = '0.022';
+version 0.975
+
+  $Id: /my/cs/projects/Sub-Exporter/trunk/lib/Sub/Exporter/Util.pm 31990 2007-07-06T02:33:04.864653Z rjbs  $
+
+=cut
+
+our $VERSION = '0.975';
 
 =head1 DESCRIPTION
 
@@ -25,14 +28,14 @@
 
 =head1 THE UTILITIES
 
-=head2 curry_class
+=head2 curry_method
 
   exports => {
-    some_method => curry_class,
-  }
-
-This utility returns a generator which will produce a class-curried version of
-a method.  In other words, it will export a method call with the exporting
+    some_method => curry_method,
+  }
+
+This utility returns a generator which will produce an invocant-curried version
+of a method.  In other words, it will export a method call with the exporting
 class built in as the invocant.
 
 A module importing the code some the above example might do this:
@@ -50,20 +53,88 @@
 If Some::Module is subclassed and the subclass's import method is called to
 import C<some_method>, the subclass will be curried in as the invocant.
 
-If an argument is provided for C<curry_class> it is used as the name of the
+If an argument is provided for C<curry_method> it is used as the name of the
 curried method to export.  This means you could export a Widget constructor
 like this:
 
-  exports => { widget => curry_class('new') }
-
-=cut
-
-sub curry_class {
+  exports => { widget => curry_method('new') }
+
+This utility may also be called as C<curry_class>, for backwards compatibility.
+
+=cut
+
+sub curry_method {
   my $override_name = shift;
   sub {
     my ($class, $name) = @_;
     $name = $override_name if defined $override_name;
     sub { $class->$name(@_); };
+  }
+}
+
+BEGIN { *curry_class = \&curry_method; }
+
+=head2 curry_chain
+
+C<curry_chain> behaves like C<L</curry_method>>, but is meant for generating
+exports that will call several methods in succession.
+
+  exports => {
+    reticulate => curry_chain([
+      new => gather_data => analyze => [ detail => 100 ] => results
+    ]),
+  }
+
+If imported from Spliner, calling the C<reticulate> routine will be equivalent
+to:
+
+  Splinter->new->gather_data->analyze(detail => 100)->results;
+
+If any method returns something on which methods may not be called, the routine
+croaks.
+
+The arguments to C<curry_chain> form an optlist.  The names are methods to be
+called and the arguments, if given, are arrayrefs to be dereferenced and passed
+as arguments to those methods.  C<curry_chain> returns a generator like those
+expected by Sub::Exporter.
+
+B<Achtung!> at present, there is no way to pass arguments from the generated
+routine to the method calls.  This will probably be solved in future revisions
+by allowing the opt list's values to be subroutines that will be called with
+the generated routine's stack.
+
+=cut
+
+sub curry_chain {
+  # In the future, we can make \%arg an optional prepend, like the "special"
+  # args to the default Sub::Exporter-generated import routine.
+  my (@opt_list) = @_;
+
+  my $pairs = Data::OptList::mkopt(\@opt_list, 'args', 'ARRAY');
+
+  sub {
+    my ($class) = @_;
+
+    sub {
+      my $next = $class;
+
+      for my $i (0 .. $#$pairs) {
+        my $pair = $pairs->[ $i ];
+        
+        unless (Params::Util::_INVOCANT($next)) { ## no critic Private
+          my $str = defined $next ? "'$next'" : 'undef';
+          Carp::croak("can't call $pair->[0] on non-invocant $str")
+        }
+
+        my ($method, $args) = @$pair;
+
+        if ($i == $#$pairs) {
+          return $next->$method($args ? @$args : ());
+        } else {
+          $next = $next->$method($args ? @$args : ());
+        }
+      }
+    };
   }
 }
 
@@ -211,7 +282,13 @@
 }
 
 use Sub::Exporter -setup => {
-  exports => [ qw(like merge_col curry_class mixin_exporter) ]
+  exports => [ qw(
+    like
+    merge_col
+    curry_method curry_class
+    curry_chain
+    mixin_exporter
+  ) ]
 };
 
 =head1 AUTHOR
@@ -220,14 +297,13 @@
 
 =head1 BUGS
 
-Please report any bugs or feature requests to C<bug-sub-exporter at rt.cpan.org>,
-or through the web interface at L<http://rt.cpan.org>. I will be notified, and
-then you'll automatically be notified of progress on your bug as I make
-changes.
+Please report any bugs or feature requests through the web interface at
+L<http://rt.cpan.org>. I will be notified, and then you'll automatically be
+notified of progress on your bug as I make changes.
 
 =head1 COPYRIGHT
 
-Copyright 2006 Ricardo SIGNES.  This program is free software;  you can
+Copyright 2006-2007, Ricardo SIGNES.  This program is free software;  you can
 redistribute it and/or modify it under the same terms as Perl itself.
 
 =cut

Modified: packages/libsub-exporter-perl/trunk/t/pod-coverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libsub-exporter-perl/trunk/t/pod-coverage.t?rev=5732&op=diff
==============================================================================
--- packages/libsub-exporter-perl/trunk/t/pod-coverage.t (original)
+++ packages/libsub-exporter-perl/trunk/t/pod-coverage.t Wed Jul 11 11:04:19 2007
@@ -16,4 +16,6 @@
     if $@;
 }
 
-all_pod_coverage_ok;
+all_pod_coverage_ok({
+  trustme => [ 'curry_class' ],
+});




More information about the Pkg-perl-cvs-commits mailing list