r34356 - in /branches/upstream/libpoe-component-pluggable-perl/current: ./ inc/Module/ inc/Module/Install/ lib/POE/Component/ t/

ryan52-guest at users.alioth.debian.org ryan52-guest at users.alioth.debian.org
Wed Apr 29 22:29:11 UTC 2009


Author: ryan52-guest
Date: Wed Apr 29 22:29:06 2009
New Revision: 34356

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=34356
Log:
[svn-upgrade] Integrating new upstream version, libpoe-component-pluggable-perl (1.20)

Modified:
    branches/upstream/libpoe-component-pluggable-perl/current/Changes
    branches/upstream/libpoe-component-pluggable-perl/current/META.yml
    branches/upstream/libpoe-component-pluggable-perl/current/Makefile.PL
    branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install.pm
    branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Base.pm
    branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Can.pm
    branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Fetch.pm
    branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Makefile.pm
    branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Metadata.pm
    branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Win32.pm
    branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/WriteAll.pm
    branches/upstream/libpoe-component-pluggable-perl/current/lib/POE/Component/Pluggable.pm
    branches/upstream/libpoe-component-pluggable-perl/current/t/01_basic.t

Modified: branches/upstream/libpoe-component-pluggable-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/Changes?rev=34356&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/Changes (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/Changes Wed Apr 29 22:29:06 2009
@@ -1,5 +1,10 @@
 POE::Component::Pluggable
 =========================
+
+1.20  Wed Apr 29 09:27:08 BST 2009
+    - Removed the crufty checks in Makefile.PL for 'weaken' support and
+      required Task::Weaken instead.
+    - Fixed some warnings when plugin return undef.
 
 1.18  Sat Apr 11 10:05:02 BST 2009
     - Tidied up all the code. Removed hard tabs and made code more readable

Modified: branches/upstream/libpoe-component-pluggable-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/META.yml?rev=34356&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/META.yml (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/META.yml Wed Apr 29 22:29:06 2009
@@ -3,11 +3,12 @@
 author:
   - 'Chris Williams <chris at bingosnet.co.uk>'
 build_requires:
+  ExtUtils::MakeMaker: 6.42
   Test::More: 0.47
 configure_requires:
-  ExtUtils::MakeMaker: 6.50
+  ExtUtils::MakeMaker: 6.42
 distribution_type: module
-generated_by: 'Module::Install version 0.81'
+generated_by: 'Module::Install version 0.85'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -20,8 +21,9 @@
     - t
 requires:
   POE: 1.004
+  Task::Weaken: 0
   perl: 5.6.0
 resources:
   license: http://dev.perl.org/licenses/
   repository: git://github.com/bingos/poe-component-pluggable.git
-version: 1.18
+version: 1.20

Modified: branches/upstream/libpoe-component-pluggable-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/Makefile.PL?rev=34356&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/Makefile.PL (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/Makefile.PL Wed Apr 29 22:29:06 2009
@@ -5,32 +5,9 @@
 license 'perl';
 version_from 'lib/POE/Component/Pluggable.pm';
 abstract_from 'lib/POE/Component/Pluggable.pm';
+perl_version '5.006';
 build_requires 'Test::More' => 0.47;
-perl_version '5.006';
-eval "use Scalar::Util qw(weaken);";
-if ( $@ ) {
-   unless ( can_cc() ) {
-	print <<NOTICE;
-
-\a--------------------------------------------------------------
-Hi,
-
-Sorry about this but we require weak references by using 
-Scalar::Util::weaken.
-
-You don't appear to have a version of Scalar::Util installed
-that supports weaken and your don't have a working compiler
-available so that we can install a version of Scalar::Util
-that does support weaken.
-
-Giving up.
---------------------------------------------------------------
-
-NOTICE
-       exit 0;
-   }
-   requires 'Scalar::Util' => 1.19;
-}
+requires 'Task::Weaken' => 0;
 requires 'POE' => 1.004;
 eval "auto_set_repository";
 WriteAll();

Modified: branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install.pm?rev=34356&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install.pm Wed Apr 29 22:29:06 2009
@@ -17,12 +17,10 @@
 #     3. The ./inc/ version of Module::Install loads
 # }
 
-BEGIN {
-	require 5.004;
-}
+use 5.005;
 use strict 'vars';
 
-use vars qw{$VERSION};
+use vars qw{$VERSION $MAIN};
 BEGIN {
 	# All Module::Install core packages now require synchronised versions.
 	# This will be used to ensure we don't accidentally load old or
@@ -30,7 +28,10 @@
 	# 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.81';
+	$VERSION = '0.85';
+
+	# Storage for the pseudo-singleton
+	$MAIN    = undef;
 
 	*inc::Module::Install::VERSION = *VERSION;
 	@inc::Module::Install::ISA     = __PACKAGE__;
@@ -93,6 +94,7 @@
 
 
 
+
 # Build.PL was formerly supported, but no longer is due to excessive
 # difficulty in implementing every single feature twice.
 if ( $0 =~ /Build.PL$/i ) { die <<"END_DIE" }
@@ -131,14 +133,22 @@
 	$sym->{$cwd} = sub {
 		my $pwd = Cwd::cwd();
 		if ( my $code = $sym->{$pwd} ) {
-			# delegate back to parent dirs
+			# Delegate back to parent dirs
 			goto &$code unless $cwd eq $pwd;
 		}
 		$$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
-		unless ( uc($1) eq $1 ) {
-			unshift @_, ( $self, $1 );
-			goto &{$self->can('call')};
+		my $method = $1;
+		if ( uc($method) eq $method ) {
+			# Do nothing
+			return;
+		} elsif ( $method =~ /^_/ and $self->can($method) ) {
+			# Dispatch to the root M:I class
+			return $self->$method(@_);
 		}
+
+		# Dispatch to the appropriate plugin
+		unshift @_, ( $self, $1 );
+		goto &{$self->can('call')};
 	};
 }
 
@@ -163,6 +173,9 @@
 	delete $INC{"$self->{file}"};
 	delete $INC{"$self->{path}.pm"};
 
+	# Save to the singleton
+	$MAIN = $self;
+
 	return 1;
 }
 
@@ -176,8 +189,7 @@
 
 	my @exts = @{$self->{extensions}};
 	unless ( @exts ) {
-		my $admin = $self->{admin};
-		@exts = $admin->load_all_extensions;
+		@exts = $self->{admin}->load_all_extensions;
 	}
 
 	my %seen;
@@ -260,7 +272,7 @@
 sub load_extensions {
 	my ($self, $path, $top) = @_;
 
-	unless ( grep { !ref $_ and lc $_ eq lc $self->{prefix} } @INC ) {
+	unless ( grep { ! ref $_ and lc $_ eq lc $self->{prefix} } @INC ) {
 		unshift @INC, $self->{prefix};
 	}
 

Modified: branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Base.pm?rev=34356&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Base.pm Wed Apr 29 22:29:06 2009
@@ -1,7 +1,11 @@
 #line 1
 package Module::Install::Base;
 
-$VERSION = '0.81';
+use strict 'vars';
+use vars qw{$VERSION};
+BEGIN {
+	$VERSION = '0.85';
+}
 
 # Suspend handler for "redefined" warnings
 BEGIN {
@@ -12,51 +16,61 @@
 ### This is the ONLY module that shouldn't have strict on
 # use strict;
 
-#line 41
+#line 45
 
 sub new {
-    my ($class, %args) = @_;
+	my ($class, %args) = @_;
 
-    foreach my $method ( qw(call load) ) {
-        *{"$class\::$method"} = sub {
-            shift()->_top->$method(@_);
-        } unless defined &{"$class\::$method"};
-    }
+	foreach my $method ( qw(call load) ) {
+		next if defined &{"$class\::$method"};
+		*{"$class\::$method"} = sub {
+			shift()->_top->$method(@_);
+		};
+	}
 
-    bless( \%args, $class );
+	bless( \%args, $class );
 }
 
-#line 61
+#line 66
 
 sub AUTOLOAD {
-    my $self = shift;
-    local $@;
-    my $autoload = eval { $self->_top->autoload } or return;
-    goto &$autoload;
+	my $self = shift;
+	local $@;
+	my $autoload = eval {
+		$self->_top->autoload
+	} or return;
+	goto &$autoload;
 }
 
-#line 76
+#line 83
 
-sub _top { $_[0]->{_top} }
+sub _top {
+	$_[0]->{_top};
+}
 
-#line 89
+#line 98
 
 sub admin {
-    $_[0]->_top->{admin} or Module::Install::Base::FakeAdmin->new;
+	$_[0]->_top->{admin}
+	or
+	Module::Install::Base::FakeAdmin->new;
 }
 
-#line 101
+#line 114
 
 sub is_admin {
-    $_[0]->admin->VERSION;
+	$_[0]->admin->VERSION;
 }
 
 sub DESTROY {}
 
 package Module::Install::Base::FakeAdmin;
 
-my $Fake;
-sub new { $Fake ||= bless(\@_, $_[0]) }
+my $fake;
+
+sub new {
+	$fake ||= bless(\@_, $_[0]);
+}
 
 sub AUTOLOAD {}
 
@@ -69,4 +83,4 @@
 
 1;
 
-#line 146
+#line 162

Modified: branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Can.pm?rev=34356&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Can.pm (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Can.pm Wed Apr 29 22:29:06 2009
@@ -9,7 +9,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.81';
+	$VERSION = '0.85';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Fetch.pm?rev=34356&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Fetch.pm (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Fetch.pm Wed Apr 29 22:29:06 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.81';
+	$VERSION = '0.85';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Makefile.pm?rev=34356&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Makefile.pm Wed Apr 29 22:29:06 2009
@@ -7,7 +7,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.81';
+	$VERSION = '0.85';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -114,17 +114,32 @@
 	my $self = shift;
 	die "&Makefile->write() takes no arguments\n" if @_;
 
-	# Make sure we have a new enough
+	# Check the current Perl version
+	my $perl_version = $self->perl_version;
+	if ( $perl_version ) {
+		eval "use $perl_version; 1"
+			or die "ERROR: perl: Version $] is installed, "
+			. "but we need version >= $perl_version";
+	}
+
+	# Make sure we have a new enough MakeMaker
 	require ExtUtils::MakeMaker;
 
-	# 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.
-
-	$self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
-
-	# Generate the
+	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.
+		$self->build_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
+		$self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
+	} 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 );
+	}
+
+	# Generate the MakeMaker params
 	my $args = $self->makemaker_args;
 	$args->{DISTNAME} = $self->name;
 	$args->{NAME}     = $self->module_name || $self->name;
@@ -133,7 +148,7 @@
 	if ( $self->tests ) {
 		$args->{test} = { TESTS => $self->tests };
 	}
-	if ($] >= 5.005) {
+	if ( $] >= 5.005 ) {
 		$args->{ABSTRACT} = $self->abstract;
 		$args->{AUTHOR}   = $self->author;
 	}
@@ -147,7 +162,7 @@
 		delete $args->{SIGN};
 	}
 
-	# merge both kinds of requires into prereq_pm
+	# Merge both kinds of requires into prereq_pm
 	my $prereq = ($args->{PREREQ_PM} ||= {});
 	%$prereq = ( %$prereq,
 		map { @$_ }
@@ -250,4 +265,4 @@
 
 __END__
 
-#line 379
+#line 394

Modified: branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Metadata.pm?rev=34356&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Metadata.pm Wed Apr 29 22:29:06 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.81';
+	$VERSION = '0.85';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }

Modified: branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Win32.pm?rev=34356&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Win32.pm (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/Win32.pm Wed Apr 29 22:29:06 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.81';
+	$VERSION = '0.85';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }

Modified: branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/WriteAll.pm?rev=34356&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/WriteAll.pm (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/WriteAll.pm Wed Apr 29 22:29:06 2009
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.81';
+	$VERSION = '0.85';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }

Modified: branches/upstream/libpoe-component-pluggable-perl/current/lib/POE/Component/Pluggable.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/lib/POE/Component/Pluggable.pm?rev=34356&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/lib/POE/Component/Pluggable.pm (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/lib/POE/Component/Pluggable.pm Wed Apr 29 22:29:06 2009
@@ -6,7 +6,7 @@
 use POE::Component::Pluggable::Pipeline;
 use POE::Component::Pluggable::Constants qw(:ALL);
 
-our $VERSION='1.18';
+our $VERSION='1.20';
 
 sub _pluggable_init {
     my ($self, %opts) = @_;
@@ -83,6 +83,7 @@
             $self->_handle_error('_default', $ret, $alias);
         }
 
+	$ret = PLUGIN_EAT_NONE unless defined $ret;
         return $return if $ret == PLUGIN_EAT_PLUGIN;
         $return = PLUGIN_EAT_ALL if $ret == PLUGIN_EAT_CLIENT;
         return PLUGIN_EAT_ALL if $ret == PLUGIN_EAT_ALL;
@@ -99,10 +100,11 @@
         chomp $@;
         warn "$sub call on $source failed: $@\n" if $self->{_pluggable_debug};
     }
-    elsif ($return != PLUGIN_EAT_NONE
+    elsif ( !defined $return || 
+      ($return != PLUGIN_EAT_NONE
       && $return != PLUGIN_EAT_PLUGIN
       && $return != PLUGIN_EAT_CLIENT
-      && $return != PLUGIN_EAT_ALL) {
+      && $return != PLUGIN_EAT_ALL) ) {
         warn "$sub call on $source did not return a valid EAT constant\n";
     }
 

Modified: branches/upstream/libpoe-component-pluggable-perl/current/t/01_basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/t/01_basic.t?rev=34356&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/t/01_basic.t (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/t/01_basic.t Wed Apr 29 22:29:06 2009
@@ -1,6 +1,6 @@
 use strict;
 use warnings;
-use Test::More tests => 7;
+use Test::More tests => 9;
 
 {
   package TestSubClass;
@@ -16,7 +16,7 @@
     $self->_pluggable_init( prefix => 'testsub_', types => [ 'SERVER' ] );
     $self->{session_id} = POE::Session->create(
 	object_states => [
-		$self => [ qw(_start __send_event test shutdown) ],
+		$self => [ qw(_start __send_event test noret shutdown) ],
 	],
 	heap => $self,
 	options => { trace => 0 },
@@ -65,6 +65,12 @@
     $self->_send_event( $self->{_pluggable_prefix} . 'test', @args );
     return;
   }
+
+  sub noret {
+    my ($kernel,$self, at args) = @_[KERNEL,OBJECT,ARG0..$#_];
+    $self->_send_event( $self->{_pluggable_prefix} . 'noret', @args );
+    return;
+  }
 }
 
 {
@@ -96,6 +102,12 @@
     pass(__PACKAGE__ . ' test event' );
     return PLUGIN_EAT_NONE;
   }
+
+  sub SERVER_noret {
+    my ($self,$irc) = splice @_, 0, 2;
+    pass(__PACKAGE__ . ' noret event' );
+    return;
+  }
 }
 
 use strict;
@@ -104,7 +116,7 @@
 
 POE::Session->create(
 	package_states => [
-		'main' => [qw(_start testsub_test testsub_plugin_add testsub_plugin_del)],
+		'main' => [qw(_start testsub_test testsub_noret testsub_plugin_add testsub_plugin_del)],
 	],
 	options => { trace => 0 },
 );
@@ -136,6 +148,12 @@
 sub testsub_test {
   my ($kernel,$sender,$answer) = @_[KERNEL,SENDER,ARG0];
   ok( $answer eq 'fubar', "event was cool" );
-  $kernel->post( $sender, 'shutdown' );
+  $kernel->post( $sender, 'noret' );
   return;
 }
+
+sub testsub_noret {
+  my ($kernel,$sender,$answer) = @_[KERNEL,SENDER,ARG0];
+  pass("testsub_noret");
+  $kernel->post( $sender, 'shutdown' );
+}




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