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

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sun Jul 26 20:16:48 UTC 2009


Author: jawnsy-guest
Date: Sun Jul 26 20:16:37 2009
New Revision: 40780

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

Added:
    branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/AutoLicense.pm
    branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/GithubMeta.pm
    branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/ReadmeFromPod.pm
Modified:
    branches/upstream/libpoe-component-pluggable-perl/current/Changes
    branches/upstream/libpoe-component-pluggable-perl/current/LICENSE
    branches/upstream/libpoe-component-pluggable-perl/current/MANIFEST
    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/README
    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/lib/POE/Component/Pluggable/Constants.pm
    branches/upstream/libpoe-component-pluggable-perl/current/lib/POE/Component/Pluggable/Pipeline.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=40780&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/Changes (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/Changes Sun Jul 26 20:16:37 2009
@@ -1,5 +1,9 @@
 POE::Component::Pluggable
 =========================
+
+1.22  Thu Jul 23 14:12:05 BST 2009
+    - Added constant 1.17 as a prereq. Versions prior to 1.03
+      did not support the use constant { }; construct.
 
 1.20  Wed Apr 29 09:27:08 BST 2009
     - Removed the crufty checks in Makefile.PL for 'weaken' support and

Modified: branches/upstream/libpoe-component-pluggable-perl/current/LICENSE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/LICENSE?rev=40780&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/LICENSE (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/LICENSE Sun Jul 26 20:16:37 2009
@@ -1,9 +1,9 @@
-This software is copyright (c) 2008 by Chris Williams, Apocalypse, Hinrik Örn Sigurðsson and Jeff Pinyan.
+This software is copyright (c) 2009 by Chris Williams.
 
 This is free software; you can redistribute it and/or modify it under
-the same terms as perl itself.
-
-Terms of Perl itself
+the same terms as the Perl 5 programming language system itself.
+
+Terms of the Perl programming language system itself
 
 a) the GNU General Public License as published by the Free
    Software Foundation; either version 1, or (at your option) any
@@ -12,7 +12,7 @@
 
 --- The GNU General Public License, Version 1, February 1989 ---
 
-This software is Copyright (c) 2008 by Chris Williams, Apocalypse, Hinrik Örn Sigurðsson and Jeff Pinyan.
+This software is Copyright (c) 2009 by Chris Williams.
 
 This is free software, licensed under:
 
@@ -270,7 +270,7 @@
 
 --- The Artistic License 1.0 ---
 
-This software is Copyright (c) 2008 by Chris Williams, Apocalypse, Hinrik Örn Sigurðsson and Jeff Pinyan.
+This software is Copyright (c) 2009 by Chris Williams.
 
 This is free software, licensed under:
 

Modified: branches/upstream/libpoe-component-pluggable-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/MANIFEST?rev=40780&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/MANIFEST (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/MANIFEST Sun Jul 26 20:16:37 2009
@@ -1,11 +1,14 @@
 Changes
 examples/synopsis.pl
 inc/Module/Install.pm
+inc/Module/Install/AutoLicense.pm
 inc/Module/Install/Base.pm
 inc/Module/Install/Can.pm
 inc/Module/Install/Fetch.pm
+inc/Module/Install/GithubMeta.pm
 inc/Module/Install/Makefile.pm
 inc/Module/Install/Metadata.pm
+inc/Module/Install/ReadmeFromPod.pm
 inc/Module/Install/Win32.pm
 inc/Module/Install/WriteAll.pm
 lib/POE/Component/Pluggable.pm

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=40780&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/META.yml (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/META.yml Sun Jul 26 20:16:37 2009
@@ -8,7 +8,7 @@
 configure_requires:
   ExtUtils::MakeMaker: 6.42
 distribution_type: module
-generated_by: 'Module::Install version 0.85'
+generated_by: 'Module::Install version 0.91'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -19,11 +19,23 @@
     - examples
     - inc
     - t
+provides:
+  POE::Component::Pluggable:
+    file: lib/POE/Component/Pluggable.pm
+    version: 1.22
+  POE::Component::Pluggable::Constants:
+    file: lib/POE/Component/Pluggable/Constants.pm
+    version: 1.22
+  POE::Component::Pluggable::Pipeline:
+    file: lib/POE/Component/Pluggable/Pipeline.pm
+    version: 1.22
 requires:
   POE: 1.004
   Task::Weaken: 0
+  constant: 1.17
   perl: 5.6.0
 resources:
+  homepage: http://github.com/bingos/poe-component-pluggable/tree
   license: http://dev.perl.org/licenses/
   repository: git://github.com/bingos/poe-component-pluggable.git
-version: 1.20
+version: 1.22

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=40780&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/Makefile.PL (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/Makefile.PL Sun Jul 26 20:16:37 2009
@@ -2,12 +2,16 @@
 use inc::Module::Install;
 name 'POE-Component-Pluggable';
 author 'Chris Williams <chris at bingosnet.co.uk>';
-license 'perl';
 version_from 'lib/POE/Component/Pluggable.pm';
 abstract_from 'lib/POE/Component/Pluggable.pm';
+readme_from 'lib/POE/Component/Pluggable.pm';
+license 'perl';
+auto_license holder => 'Chris Williams';
 perl_version '5.006';
 build_requires 'Test::More' => 0.47;
+requires 'constant' => 1.17;
 requires 'Task::Weaken' => 0;
 requires 'POE' => 1.004;
-eval "auto_set_repository";
+auto_provides;
+githubmeta;
 WriteAll();

Modified: branches/upstream/libpoe-component-pluggable-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/README?rev=40780&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/README (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/README Sun Jul 26 20:16:37 2009
@@ -1,5 +1,5 @@
 NAME
-    POE::Component::Pluggable - A base class for creating plugin enabled POE
+    POE::Component::Pluggable - A base class for creating plugin-enabled POE
     Components.
 
 SYNOPSIS
@@ -8,18 +8,18 @@
 
      {
          package SimplePoCo;
-     
-     use strict;
+  
+         use strict;
          use base qw(POE::Component::Pluggable);
          use POE;
          use POE::Component::Pluggable::Constants qw(:ALL);
-      
-     sub spawn {
+  
+         sub spawn {
              my ($package, %opts) = @_;
              $opts{lc $_} = delete $opts{$_} for keys %opts;
              my $self = bless \%opts, $package;
-             
-         $self->_pluggable_init(prefix => 'simplepoco_');
+         
+             $self->_pluggable_init(prefix => 'simplepoco_');
              POE::Session->create(
                  object_states => [
                      $self => { shutdown => '_shutdown' },
@@ -27,118 +27,118 @@
                  ],
                  heap => $self,
              );
-             
-         return $self;
-         }
-      
-     sub shutdown {
+         
+             return $self;
+         }
+  
+         sub shutdown {
              my ($self) = @_;
              $poe_kernel->post($self->{session_id}, 'shutdown');
          }
-      
-     sub _pluggable_event {
+  
+         sub _pluggable_event {
              my ($self) = @_;
              $poe_kernel->post($self->{session_id}, '__send_event', @_);
          }
-      
-     sub _start {
+  
+         sub _start {
              my ($kernel,$self) = @_[KERNEL,OBJECT];
              $self->{session_id} = $_[SESSION]->ID();
-             
-         if ($self->{alias}) {
+         
+             if ($self->{alias}) {
                  $kernel->alias_set($self->{alias});
              }
              else {
                  $kernel->refcount_increment($self->{session_id}, __PACKAGE__);
              }
-          
-         $kernel->delay(_send_ping => $self->{time} || 300);
-             return;
-         }
       
-     sub _shutdown {
+             $kernel->delay(_send_ping => $self->{time} || 300);
+             return;
+         }
+  
+         sub _shutdown {
               my ($kernel, $self) = @_[KERNEL, OBJECT];
               $self->_pluggable_destroy();
               $kernel->alarm_remove_all();
               $self->alias_remove($_) for $kernel->alias_list();
               $kernel->refcount_decrement($self->{session_id}, __PACKAGE__) if !$self->{alias};
               $kernel->refcount_decrement($_, __PACKAGE__) for keys %{ $self->{sessions} };
-             
-          return;
-         }
-      
-     sub register {
+         
+              return;
+         }
+  
+         sub register {
              my ($kernel, $sender, $self) = @_[KERNEL, SENDER, OBJECT];
              my $sender_id = $sender->ID();
              $self->{sessions}->{$sender_id}++;
-             
-         if ($self->{sessions}->{$sender_id} == 1) { 
+         
+             if ($self->{sessions}->{$sender_id} == 1) { 
                  $kernel->refcount_increment($sender_id, __PACKAGE__);
                  $kernel->yield(__send_event => $self->{_pluggable_prefix} . 'registered', $sender_id);
              }
-             
-         return;
-         }
-      
-     sub unregister {
+         
+             return;
+         }
+  
+         sub unregister {
              my ($kernel, $sender, $self) = @_[KERNEL, SENDER, OBJECT];
              my $sender_id = $sender->ID();
              my $record = delete $self->{sessions}->{$sender_id};
-             
-         if ($record) {
+         
+             if ($record) {
                  $kernel->refcount_decrement($sender_id, __PACKAGE__);
                  $kernel->yield(__send_event => $self->{_pluggable_prefix} . 'unregistered', $sender_id);
              }
-             
-         return;
-         }
-      
-     sub __send_event {
+         
+             return;
+         }
+  
+         sub __send_event {
              my ($kernel, $self, $event, @args) = @_[KERNEL, OBJECT, ARG0..$#_];
-      
-         return 1 if $self->_pluggable_process(PING => $event, \(@args)) == PLUGIN_EAT_ALL;
-      
-         $kernel->post($_, $event, @args) for keys %{ $self->{sessions} };
-         }
-      
-     sub _send_ping {
+  
+             return 1 if $self->_pluggable_process(PING => $event, \(@args)) == PLUGIN_EAT_ALL;
+  
+             $kernel->post($_, $event, @args) for keys %{ $self->{sessions} };
+         }
+  
+         sub _send_ping {
              my ($kernel, $self) = @_[KERNEL, OBJECT];
              my $event = $self->{_pluggable_prefix} . 'ping';
              my @args = ('Wake up sleepy');
              $kernel->yield(__send_event => $event, @args);
              $kernel->delay(_send_ping => $self->{time} || 300);
-             
-         return;
+         
+             return;
          }
      }       
-      
-     use POE;
-      
-     my $pluggable = SimplePoCo->spawn(
+  
+         use POE;
+  
+         my $pluggable = SimplePoCo->spawn(
              alias => 'pluggable',
              time => 30,
          );
-      
-     POE::Session->create(
+  
+         POE::Session->create(
              package_states => [
                  main => [qw(_start simplepoco_registered simplepoco_ping)],
              ],
          );
-      
-     $poe_kernel->run();
-      
-     sub _start {
+  
+         $poe_kernel->run();
+  
+         sub _start {
              my ($kernel, $heap) = @_[KERNEL, HEAP];
              $kernel->post(pluggable => 'register');
              return;
          }
-      
-     sub simplepoco_registered {
+  
+         sub simplepoco_registered {
              print "Yay, we registered\n";
              return;
          }
-      
-     sub simplepoco_ping {
+  
+         sub simplepoco_ping {
              my ($sender, $text) = @_[SENDER, ARG0];
              print "Got '$text' from ", $sender->ID, "\n";
              return;
@@ -197,8 +197,8 @@
 
      sub _dispatch {
          # stuff
-        
-     return 1 if $self->_pluggable_process($type, $event, \(@args)) == PLUGIN_EAT_ALL;
+    
+         return 1 if $self->_pluggable_process($type, $event, \(@args)) == PLUGIN_EAT_ALL;
 
          # dispatch event to interested sessions.
      }
@@ -357,8 +357,13 @@
          return PLUGIN_EAT_NONE;
      }
 
-    The constants used can be called anything. You can provide your own
-    even. Check POE::Component::Pluggable::Constants for details.
+    As shown in the example above, a plugin's "_default" subroutine (if
+    present) is called if the plugin receives an event for which it has no
+    handler.
+
+    The special exit code CONSTANTS are documented in
+    POE::Component::Pluggable::Constants. You could provide your own as long
+    as the values match up, though.
 
 TODO
     Better documentation >:]
@@ -367,7 +372,8 @@
     Chris 'BinGOs' Williams <chris at bingosnet.co.uk>
 
 LICENSE
-    Copyright "(c)" Chris Williams, Apocalypse and Jeff Pinyan
+    Copyright "(c)" Chris Williams, Apocalypse, Hinrik Örn Sigurðsson and
+    Jeff Pinyan
 
     This module may be used, modified, and distributed under the same terms
     as Perl itself. Please see the license that came with your Perl
@@ -382,6 +388,9 @@
     the years (yes, it has been years) refining and tweaking the plugin
     system.
 
+    The initial idea was heavily borrowed from X-Chat, BIG thanks go out to
+    the genius that came up with the EAT_* system :)
+
 SEE ALSO
     POE::Component::IRC
 

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=40780&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 Sun Jul 26 20:16:37 2009
@@ -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.85';
+	$VERSION = '0.91';
 
 	# Storage for the pseudo-singleton
 	$MAIN    = undef;
@@ -353,7 +353,7 @@
 	if ( $] >= 5.006 ) {
 		open( FH, '<', $_[0] ) or die "open($_[0]): $!";
 	} else {
-		open( FH, "< $_[0]"  ) or die "open($_[0]): $!";	
+		open( FH, "< $_[0]"  ) or die "open($_[0]): $!";
 	}
 	my $string = do { local $/; <FH> };
 	close FH or die "close($_[0]): $!";
@@ -384,7 +384,7 @@
 	if ( $] >= 5.006 ) {
 		open( FH, '>', $_[0] ) or die "open($_[0]): $!";
 	} else {
-		open( FH, "> $_[0]"  ) or die "open($_[0]): $!";	
+		open( FH, "> $_[0]"  ) or die "open($_[0]): $!";
 	}
 	foreach ( 1 .. $#_ ) {
 		print FH $_[$_] or die "print($_[0]): $!";

Added: branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/AutoLicense.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/AutoLicense.pm?rev=40780&op=file
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/AutoLicense.pm (added)
+++ branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/AutoLicense.pm Sun Jul 26 20:16:37 2009
@@ -1,0 +1,53 @@
+#line 1
+package Module::Install::AutoLicense;
+
+use strict;
+use warnings;
+use base qw(Module::Install::Base);
+use vars qw($VERSION);
+
+$VERSION = '0.02';
+
+my %licenses = (
+    perl         => 'Software::License::Perl_5',
+    apache       => 'Software::License::Apache_2_0',
+    artistic     => 'Software::License::Artistic_1_0',
+    artistic_2   => 'Software::License::Artistic_2_0',
+    lgpl2        => 'Software::License::LGPL_2_1',
+    lgpl3        => 'Software::License::LGPL_3_0',
+    bsd          => 'Software::License::BSD',
+    gpl          => 'Software::License::GPL_1',
+    gpl2         => 'Software::License::GPL_2',
+    gpl3         => 'Software::License::GPL_3',
+    mit          => 'Software::License::MIT',
+    mozilla      => 'Software::License::Mozilla_1_1',
+);
+
+sub auto_license {
+  my $self = shift;
+  return unless $Module::Install::AUTHOR;
+  my %opts = @_;
+  $opts{lc $_} = delete $opts{$_} for keys %opts;
+  my $holder = $opts{holder} || $self->author();
+  my $license = $self->license();
+  die "I don't know about that license\n" unless defined $licenses{ $license };
+  my $class = $licenses{ $license };
+  eval "require $class";
+  my $sl = $class->new( { holder => $holder } );
+  open LICENSE, '>LICENSE' or die "$!\n";
+  print LICENSE $sl->fulltext;
+  close LICENSE;
+  $self->postamble(<<"END");
+distclean :: license_clean
+
+license_clean:
+\t\$(RM_F) LICENSE
+END
+
+  return 1;
+}
+
+'Licensed to auto';
+__END__
+
+#line 115

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=40780&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 Sun Jul 26 20:16:37 2009
@@ -4,7 +4,7 @@
 use strict 'vars';
 use vars qw{$VERSION};
 BEGIN {
-	$VERSION = '0.85';
+	$VERSION = '0.91';
 }
 
 # Suspend handler for "redefined" warnings
@@ -13,42 +13,34 @@
 	$SIG{__WARN__} = sub { $w };
 }
 
-### This is the ONLY module that shouldn't have strict on
-# use strict;
-
-#line 45
+#line 42
 
 sub new {
-	my ($class, %args) = @_;
-
-	foreach my $method ( qw(call load) ) {
-		next if defined &{"$class\::$method"};
-		*{"$class\::$method"} = sub {
-			shift()->_top->$method(@_);
-		};
+	my $class = shift;
+	unless ( defined &{"${class}::call"} ) {
+		*{"${class}::call"} = sub { shift->_top->call(@_) };
 	}
-
-	bless( \%args, $class );
+	unless ( defined &{"${class}::load"} ) {
+		*{"${class}::load"} = sub { shift->_top->load(@_) };
+	}
+	bless { @_ }, $class;
 }
 
-#line 66
+#line 61
 
 sub AUTOLOAD {
-	my $self = shift;
 	local $@;
-	my $autoload = eval {
-		$self->_top->autoload
-	} or return;
-	goto &$autoload;
+	my $func = eval { shift->_top->autoload } or return;
+	goto &$func;
 }
 
-#line 83
+#line 75
 
 sub _top {
 	$_[0]->{_top};
 }
 
-#line 98
+#line 90
 
 sub admin {
 	$_[0]->_top->{admin}
@@ -56,7 +48,7 @@
 	Module::Install::Base::FakeAdmin->new;
 }
 
-#line 114
+#line 106
 
 sub is_admin {
 	$_[0]->admin->VERSION;
@@ -83,4 +75,4 @@
 
 1;
 
-#line 162
+#line 154

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=40780&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 Sun Jul 26 20:16:37 2009
@@ -2,16 +2,16 @@
 package Module::Install::Can;
 
 use strict;
-use Module::Install::Base;
-use Config              ();
-use File::Spec          ();
-use ExtUtils::MakeMaker ();
+use Config                ();
+use File::Spec            ();
+use ExtUtils::MakeMaker   ();
+use Module::Install::Base ();
 
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.85';
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
-	@ISA     = qw{Module::Install::Base};
 }
 
 # check if we can load some module

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=40780&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 Sun Jul 26 20:16:37 2009
@@ -2,13 +2,13 @@
 package Module::Install::Fetch;
 
 use strict;
-use Module::Install::Base;
+use Module::Install::Base ();
 
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.85';
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
-	@ISA     = qw{Module::Install::Base};
 }
 
 sub get_file {

Added: branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/GithubMeta.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/GithubMeta.pm?rev=40780&op=file
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/GithubMeta.pm (added)
+++ branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/GithubMeta.pm Sun Jul 26 20:16:37 2009
@@ -1,0 +1,50 @@
+#line 1
+package Module::Install::GithubMeta;
+
+use strict;
+use warnings;
+use Cwd;
+use base qw(Module::Install::Base);
+use vars qw($VERSION);
+
+$VERSION = '0.10';
+
+sub githubmeta {
+  my $self = shift;
+  return unless $Module::Install::AUTHOR;
+  return unless _under_git();
+  return unless $self->can_run('git');
+  return unless my ($git_url) = `git remote show -n origin` =~ /URL: (.*)$/m;
+  return unless $git_url =~ /github\.com/; # Not a Github repository
+  my $http_url = $git_url;
+  $git_url =~ s![\w\-]+\@([^:]+):!git://$1/!;
+  $http_url =~ s![\w\-]+\@([^:]+):!http://$1/!;
+  $http_url =~ s!\.git$!/tree!;
+  $self->repository( $git_url );
+  $self->homepage( $http_url ) unless $self->homepage();
+  return 1;
+}
+
+sub _under_git {
+  return 1 if -e '.git';
+  my $cwd = getcwd;
+  my $last = $cwd;
+  my $found = 0;
+  while (1) {
+    chdir '..' or last;
+    my $current = getcwd;
+    last if $last eq $current;
+    $last = $current;
+    if ( -e '.git' ) {
+       $found = 1;
+       last;
+    }
+  }
+  chdir $cwd;
+  return $found;
+}
+
+'Github';
+__END__
+
+#line 108

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=40780&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 Sun Jul 26 20:16:37 2009
@@ -2,14 +2,14 @@
 package Module::Install::Makefile;
 
 use strict 'vars';
-use Module::Install::Base;
-use ExtUtils::MakeMaker ();
-
-use vars qw{$VERSION $ISCORE @ISA};
+use ExtUtils::MakeMaker   ();
+use Module::Install::Base ();
+
+use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.85';
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
-	@ISA     = qw{Module::Install::Base};
 }
 
 sub Makefile { $_[0] }

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=40780&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 Sun Jul 26 20:16:37 2009
@@ -2,18 +2,17 @@
 package Module::Install::Metadata;
 
 use strict 'vars';
-use Module::Install::Base;
+use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.85';
-	@ISA     = qw{Module::Install::Base};
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
 
 my @boolean_keys = qw{
 	sign
-	mymeta
 };
 
 my @scalar_keys = qw{
@@ -440,21 +439,21 @@
 	/ixms ) {
 		my $license_text = $1;
 		my @phrases      = (
-			'under the same (?:terms|license) as perl itself' => 'perl',        1,
-			'GNU general public license'                      => 'gpl',         1,
-			'GNU public license'                              => 'gpl',         1,
-			'GNU lesser general public license'               => 'lgpl',        1,
-			'GNU lesser public license'                       => 'lgpl',        1,
-			'GNU library general public license'              => 'lgpl',        1,
-			'GNU library public license'                      => 'lgpl',        1,
-			'BSD license'                                     => 'bsd',         1,
-			'Artistic license'                                => 'artistic',    1,
-			'GPL'                                             => 'gpl',         1,
-			'LGPL'                                            => 'lgpl',        1,
-			'BSD'                                             => 'bsd',         1,
-			'Artistic'                                        => 'artistic',    1,
-			'MIT'                                             => 'mit',         1,
-			'proprietary'                                     => 'proprietary', 0,
+			'under the same (?:terms|license) as (?:perl|the perl programming language) itself' => 'perl', 1,
+			'GNU general public license'         => 'gpl',         1,
+			'GNU public license'                 => 'gpl',         1,
+			'GNU lesser general public license'  => 'lgpl',        1,
+			'GNU lesser public license'          => 'lgpl',        1,
+			'GNU library general public license' => 'lgpl',        1,
+			'GNU library public license'         => 'lgpl',        1,
+			'BSD license'                        => 'bsd',         1,
+			'Artistic license'                   => 'artistic',    1,
+			'GPL'                                => 'gpl',         1,
+			'LGPL'                               => 'lgpl',        1,
+			'BSD'                                => 'bsd',         1,
+			'Artistic'                           => 'artistic',    1,
+			'MIT'                                => 'mit',         1,
+			'proprietary'                        => 'proprietary', 0,
 		);
 		while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
 			$pattern =~ s{\s+}{\\s+}g;
@@ -506,17 +505,29 @@
 	}
 }
 
+sub test_requires_from {
+	my $self     = shift;
+	my $content  = Module::Install::_readperl($_[0]);
+	my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg;
+	while ( @requires ) {
+		my $module  = shift @requires;
+		my $version = shift @requires;
+		$self->test_requires( $module => $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)
 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?)$/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
+		# Numify
+		$v = $v + 0;
 	}
 	return $v;
 }
@@ -526,21 +537,56 @@
 
 
 ######################################################################
-# MYMETA.yml Support
+# MYMETA Support
 
 sub WriteMyMeta {
 	die "WriteMyMeta has been deprecated";
 }
 
-sub write_mymeta {
-	my $self = shift;
-	
-	# If there's no existing META.yml there is nothing we can do
-	return unless -f 'META.yml';
+sub write_mymeta_yaml {
+	my $self = shift;
 
 	# We need YAML::Tiny to write the MYMETA.yml file
 	unless ( eval { require YAML::Tiny; 1; } ) {
 		return 1;
+	}
+
+	# Generate the data
+	my $meta = $self->_write_mymeta_data or return 1;
+
+	# Save as the MYMETA.yml file
+	print "Writing MYMETA.yml\n";
+	YAML::Tiny::DumpFile('MYMETA.yml', $meta);
+}
+
+sub write_mymeta_json {
+	my $self = shift;
+
+	# We need JSON to write the MYMETA.json file
+	unless ( eval { require JSON; 1; } ) {
+		return 1;
+	}
+
+	# Generate the data
+	my $meta = $self->_write_mymeta_data or return 1;
+
+	# Save as the MYMETA.yml file
+	print "Writing MYMETA.json\n";
+	Module::Install::_write(
+		'MYMETA.json',
+		JSON->new->pretty(1)->canonical->encode($meta),
+	);
+}
+
+sub _write_mymeta_data {
+	my $self = shift;
+
+	# If there's no existing META.yml there is nothing we can do
+	return undef unless -f 'META.yml';
+
+	# We need Parse::CPAN::Meta to load the file
+	unless ( eval { require Parse::CPAN::Meta; 1; } ) {
+		return undef;
 	}
 
 	# Merge the perl version into the dependencies
@@ -558,7 +604,7 @@
 	}
 
 	# Load the advisory META.yml file
-	my @yaml = YAML::Tiny::LoadFile('META.yml');
+	my @yaml = Parse::CPAN::Meta::LoadFile('META.yml');
 	my $meta = $yaml[0];
 
 	# Overwrite the non-configure dependency hashs
@@ -572,9 +618,7 @@
 		$meta->{build_requires} = { map { @$_ } @{ $val->{build_requires} } };
 	}
 
-	# Save as the MYMETA.yml file
-	print "Writing MYMETA.yml\n";
-	YAML::Tiny::DumpFile('MYMETA.yml', $meta);	
+	return $meta;
 }
 
 1;

Added: branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/ReadmeFromPod.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/ReadmeFromPod.pm?rev=40780&op=file
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/ReadmeFromPod.pm (added)
+++ branches/upstream/libpoe-component-pluggable-perl/current/inc/Module/Install/ReadmeFromPod.pm Sun Jul 26 20:16:37 2009
@@ -1,0 +1,36 @@
+#line 1
+package Module::Install::ReadmeFromPod;
+
+use strict;
+use warnings;
+use base qw(Module::Install::Base);
+use vars qw($VERSION);
+
+$VERSION = '0.06';
+
+sub readme_from {
+  my $self = shift;
+  return unless $Module::Install::AUTHOR;
+  my $file = shift || return;
+  my $clean = shift;
+  require Pod::Text;
+  my $parser = Pod::Text->new();
+  open README, '> README' or die "$!\n";
+  $parser->output_fh( *README );
+  $parser->parse_file( $file );
+  return 1 unless $clean;
+  $self->postamble(<<"END");
+distclean :: license_clean
+
+license_clean:
+\t\$(RM_F) README
+END
+  return 1;
+}
+
+'Readme!';
+
+__END__
+
+#line 89
+

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=40780&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 Sun Jul 26 20:16:37 2009
@@ -2,12 +2,12 @@
 package Module::Install::Win32;
 
 use strict;
-use Module::Install::Base;
+use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.85';
-	@ISA     = qw{Module::Install::Base};
+	$VERSION = '0.91';
+	@ISA     = '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=40780&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 Sun Jul 26 20:16:37 2009
@@ -2,11 +2,11 @@
 package Module::Install::WriteAll;
 
 use strict;
-use Module::Install::Base;
+use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.85';
+	$VERSION = '0.91';;
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }
@@ -41,8 +41,18 @@
 
 	# The Makefile write process adds a couple of dependencies,
 	# so write the META.yml files after the Makefile.
-	$self->Meta->write        if $args{meta};
-	$self->Meta->write_mymeta if $self->mymeta;
+	if ( $args{meta} ) {
+		$self->Meta->write;
+	}
+
+	# Experimental support for MYMETA
+	if ( $ENV{X_MYMETA} ) {
+		if ( $ENV{X_MYMETA} eq 'JSON' ) {
+			$self->Meta->write_mymeta_json;
+		} else {
+			$self->Meta->write_mymeta_yaml;
+		}
+	}
 
 	return 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=40780&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 Sun Jul 26 20:16:37 2009
@@ -6,7 +6,7 @@
 use POE::Component::Pluggable::Pipeline;
 use POE::Component::Pluggable::Constants qw(:ALL);
 
-our $VERSION='1.20';
+our $VERSION='1.22';
 
 sub _pluggable_init {
     my ($self, %opts) = @_;

Modified: branches/upstream/libpoe-component-pluggable-perl/current/lib/POE/Component/Pluggable/Constants.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/lib/POE/Component/Pluggable/Constants.pm?rev=40780&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/lib/POE/Component/Pluggable/Constants.pm (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/lib/POE/Component/Pluggable/Constants.pm Sun Jul 26 20:16:37 2009
@@ -2,7 +2,7 @@
 
 use strict;
 use warnings;
-our $VERSION = '1.18';
+our $VERSION = '1.22';
 
 require Exporter;
 use base qw(Exporter);

Modified: branches/upstream/libpoe-component-pluggable-perl/current/lib/POE/Component/Pluggable/Pipeline.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpoe-component-pluggable-perl/current/lib/POE/Component/Pluggable/Pipeline.pm?rev=40780&op=diff
==============================================================================
--- branches/upstream/libpoe-component-pluggable-perl/current/lib/POE/Component/Pluggable/Pipeline.pm (original)
+++ branches/upstream/libpoe-component-pluggable-perl/current/lib/POE/Component/Pluggable/Pipeline.pm Sun Jul 26 20:16:37 2009
@@ -5,7 +5,7 @@
 use Carp;
 use Scalar::Util qw(weaken);
 
-our $VERSION = '1.18';
+our $VERSION = '1.22';
 
 sub new {
     my ($package, $pluggable) = @_;




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