r31461 - in /branches/upstream/libpoe-component-pluggable-perl/current: ./ inc/Module/ inc/Module/Install/ lib/POE/Component/
ryan52-guest at users.alioth.debian.org
ryan52-guest at users.alioth.debian.org
Thu Mar 5 15:34:19 UTC 2009
Author: ryan52-guest
Date: Thu Mar 5 15:34:16 2009
New Revision: 31461
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=31461
Log:
[svn-upgrade] Integrating new upstream version, libpoe-component-pluggable-perl (1.16)
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/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
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=31461&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/Changes (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/Changes Thu Mar 5 15:34:16 2009
@@ -1,5 +1,10 @@
POE::Component::Pluggable
=========================
+
+1.16 Wed Mar 4 23:07:47 GMT 2009
+ - Remove extraneous newline from some debug messages (Hinrik)
+ - Give a helpful warning when a plugin handler does not return
+ a valid EAT constant (Hinrik)
1.14 Mon Jan 26 12:25:26 GMT 2009
- We were not processing '_default' in $self. Fixed.
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=31461&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/META.yml (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/META.yml Thu Mar 5 15:34:16 2009
@@ -5,7 +5,7 @@
build_requires:
Test::More: 0.47
distribution_type: module
-generated_by: 'Module::Install version 0.78'
+generated_by: 'Module::Install version 0.79'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -21,4 +21,4 @@
perl: 5.6.0
resources:
license: http://dev.perl.org/licenses/
-version: 1.14
+version: 1.16
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=31461&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 Thu Mar 5 15:34:16 2009
@@ -30,7 +30,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.78';
+ $VERSION = '0.79';
*inc::Module::Install::VERSION = *VERSION;
@inc::Module::Install::ISA = __PACKAGE__;
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=31461&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 Thu Mar 5 15:34:16 2009
@@ -1,7 +1,7 @@
#line 1
package Module::Install::Base;
-$VERSION = '0.78';
+$VERSION = '0.79';
# Suspend handler for "redefined" warnings
BEGIN {
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=31461&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 Thu Mar 5 15:34:16 2009
@@ -11,7 +11,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.78';
+ $VERSION = '0.79';
$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=31461&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 Thu Mar 5 15:34:16 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.78';
+ $VERSION = '0.79';
$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=31461&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 Thu Mar 5 15:34:16 2009
@@ -7,7 +7,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.78';
+ $VERSION = '0.79';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
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=31461&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 Thu Mar 5 15:34:16 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.78';
+ $VERSION = '0.79';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
@@ -176,19 +176,15 @@
"Did not provide a value to perl_version()"
);
- # Convert triple-part versions (eg, 5.6.1 or 5.8.9) to
- # numbers (eg, 5.006001 or 5.008009).
- # Also, convert double-part versions (eg, 5.8)
-
- $version =~ s/^(\d+)\.(\d+)(?:\.(\d+))?$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e;
-
- $version =~ s/_.+$//;
- $version = $version + 0; # Numify
+ # Normalize the version
+ $version = $self->_perl_version($version);
+
+ # We don't support the reall old versions
unless ( $version >= 5.005 ) {
die "Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker)\n";
}
+
$self->{values}{perl_version} = $version;
- return 1;
}
sub license {
@@ -480,4 +476,70 @@
return 1;
}
+# Convert triple-part versions (eg, 5.6.1 or 5.8.9) to
+# numbers (eg, 5.006001 or 5.008009).
+# Also, convert double-part versions (eg, 5.8)
+sub _perl_version {
+ my $v = $_[-1];
+ $v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e;
+ $v =~ s/^([1-9])\.([1-9]\d?\d?)\.(0|[1-9]\d?\d?)$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e;
+ $v =~ s/(\.\d\d\d)000$/$1/;
+ $v =~ s/_.+$//;
+ if ( ref($v) ) {
+ $v = $v + 0; # Numify
+ }
+ return $v;
+}
+
+
+
+
+
+######################################################################
+# MYMETA.yml Support
+
+sub WriteMyMeta {
+ $_[0]->write_mymeta;
+}
+
+sub write_mymeta {
+ my $self = shift;
+
+ # If there's no existing META.yml there is nothing we can do
+ return unless -f 'META.yml';
+
+ # Merge the perl version into the dependencies
+ my $val = $self->Meta->{values};
+ my $perl = delete $val->{perl_version};
+ if ( $perl ) {
+ $val->{requires} ||= [];
+ my $requires = $val->{requires};
+
+ # Canonize to three-dot version after Perl 5.6
+ if ( $perl >= 5.006 ) {
+ $perl =~ s{^(\d+)\.(\d\d\d)(\d*)}{join('.', $1, int($2||0), int($3||0))}e
+ }
+ unshift @$requires, [ perl => $perl ];
+ }
+
+ # Load the advisory META.yml file
+ require YAML::Tiny;
+ my @yaml = YAML::Tiny::LoadFile('META.yml');
+ my $meta = $yaml[0];
+
+ # Overwrite the non-configure dependency hashs
+ delete $meta->{requires};
+ delete $meta->{build_requires};
+ delete $meta->{recommends};
+ if ( exists $val->{requires} ) {
+ $meta->{requires} = { map { @$_ } @{ $val->{requires} } };
+ }
+ if ( exists $val->{build_requires} ) {
+ $meta->{build_requires} = { map { @$_ } @{ $val->{build_requires} } };
+ }
+
+ # Save as the MYMETA.yml file
+ YAML::Tiny::DumpFile('MYMETA.yml', $meta);
+}
+
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=31461&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 Thu Mar 5 15:34:16 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.78';
+ $VERSION = '0.79';
@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=31461&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 Thu Mar 5 15:34:16 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.78';
+ $VERSION = '0.79';
@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=31461&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 Thu Mar 5 15:34:16 2009
@@ -7,7 +7,7 @@
use POE::Component::Pluggable::Constants qw(:ALL);
use vars qw($VERSION);
-$VERSION='1.14';
+$VERSION='1.16';
sub _pluggable_init {
my ($self, %opts) = @_;
@@ -53,11 +53,11 @@
if ( $self->can($sub) ) {
eval { $self_ret = $self->$sub( $self, @args ) };
- warn "$@" if $@;
+ $self->_handle_error($sub, $self_ret);
}
elsif ( $self->can('_default') ) {
eval { $self_ret = $self->_default( $self, $sub, @args ) };
- warn "$@" if $@;
+ $self->_handle_error('_default', $self_ret);
}
return $return if $self_ret == PLUGIN_EAT_PLUGIN;
@@ -75,12 +75,10 @@
my $alias = ($pipeline->get($plugin))[1];
if ( $plugin->can($sub) ) {
eval { $ret = $plugin->$sub($self, at args) };
- chomp $@;
- warn "$sub call on plugin '$alias' failed: $@\n" if $@ and $self->{_pluggable_debug};
+ $self->_handle_error($sub, $ret, $alias);
} elsif ( $plugin->can('_default') ) {
eval { $ret = $plugin->_default($self,$sub, at args) };
- chomp $@;
- warn "_default call on plugin '$alias' failed: $@\n" if $@ and $self->{_pluggable_debug};
+ $self->_handle_error('_default', $ret, $alias);
}
return $return if $ret == PLUGIN_EAT_PLUGIN;
@@ -89,6 +87,22 @@
}
return $return;
+}
+
+sub _handle_error {
+ my ($self, $sub, $return, $source) = @_;
+ $source = defined $source ? "plugin '$source'" : 'self';
+
+ if ($@) {
+ chomp $@;
+ warn "$sub call on $source failed: $@\n" if $self->{_pluggable_debug};
+ }
+ elsif ($return != PLUGIN_EAT_NONE
+ && $return != PLUGIN_EAT_PLUGIN
+ && $return != PLUGIN_EAT_CLIENT
+ && $return != PLUGIN_EAT_ALL) {
+ warn "$sub call on $source did not return a valid EAT constant\n";
+ }
}
# accesses the plugin pipeline
More information about the Pkg-perl-cvs-commits
mailing list