r45598 - in /trunk/libmoosex-method-signatures-perl: Changes MANIFEST META.yml debian/changelog inc/Module/Install/ExtraTests.pm lib/MooseX/Method/Signatures.pm lib/MooseX/Method/Signatures/Meta/Method.pm t/named_defaults.t

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Mon Oct 12 00:46:27 UTC 2009


Author: jawnsy-guest
Date: Mon Oct 12 00:46:22 2009
New Revision: 45598

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=45598
Log:
New upstream release

Added:
    trunk/libmoosex-method-signatures-perl/inc/Module/Install/ExtraTests.pm
      - copied unchanged from r45597, branches/upstream/libmoosex-method-signatures-perl/current/inc/Module/Install/ExtraTests.pm
    trunk/libmoosex-method-signatures-perl/t/named_defaults.t
      - copied unchanged from r45597, branches/upstream/libmoosex-method-signatures-perl/current/t/named_defaults.t
Modified:
    trunk/libmoosex-method-signatures-perl/Changes
    trunk/libmoosex-method-signatures-perl/MANIFEST
    trunk/libmoosex-method-signatures-perl/META.yml
    trunk/libmoosex-method-signatures-perl/debian/changelog
    trunk/libmoosex-method-signatures-perl/lib/MooseX/Method/Signatures.pm
    trunk/libmoosex-method-signatures-perl/lib/MooseX/Method/Signatures/Meta/Method.pm

Modified: trunk/libmoosex-method-signatures-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-method-signatures-perl/Changes?rev=45598&op=diff
==============================================================================
--- trunk/libmoosex-method-signatures-perl/Changes (original)
+++ trunk/libmoosex-method-signatures-perl/Changes Mon Oct 12 00:46:22 2009
@@ -1,4 +1,7 @@
 Version history for MooseX::Method::Signatures
+
+0.28  Fri, 09 Oct 2009 01:28:02 +0200
+  * Fix default values for named arguments.
 
 0.27  Tue, 22 Sep 2009 14:30:23 +0200
   * Depend on MooseX::LazyRequire 0.04 to avoid fail on version 0.03, which has

Modified: trunk/libmoosex-method-signatures-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-method-signatures-perl/MANIFEST?rev=45598&op=diff
==============================================================================
--- trunk/libmoosex-method-signatures-perl/MANIFEST (original)
+++ trunk/libmoosex-method-signatures-perl/MANIFEST Mon Oct 12 00:46:22 2009
@@ -2,6 +2,7 @@
 inc/Module/Install.pm
 inc/Module/Install/Base.pm
 inc/Module/Install/Can.pm
+inc/Module/Install/ExtraTests.pm
 inc/Module/Install/Fetch.pm
 inc/Module/Install/Makefile.pm
 inc/Module/Install/Metadata.pm
@@ -33,6 +34,7 @@
 t/lib/TestClassTrait.pm
 t/list.t
 t/meta.t
+t/named_defaults.t
 t/no_signature.t
 t/placeholders.t
 t/precedence.t

Modified: trunk/libmoosex-method-signatures-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-method-signatures-perl/META.yml?rev=45598&op=diff
==============================================================================
--- trunk/libmoosex-method-signatures-perl/META.yml (original)
+++ trunk/libmoosex-method-signatures-perl/META.yml Mon Oct 12 00:46:22 2009
@@ -41,4 +41,4 @@
   bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Method-Signatures
   license: http://dev.perl.org/licenses/
   repository: git://github.com/rafl/moosex-method-signatures.git
-version: 0.27
+version: 0.28

Modified: trunk/libmoosex-method-signatures-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-method-signatures-perl/debian/changelog?rev=45598&op=diff
==============================================================================
--- trunk/libmoosex-method-signatures-perl/debian/changelog (original)
+++ trunk/libmoosex-method-signatures-perl/debian/changelog Mon Oct 12 00:46:22 2009
@@ -1,3 +1,9 @@
+libmoosex-method-signatures-perl (0.28-1) UNRELEASED; urgency=low
+
+  * New upstream release
+
+ -- Jonathan Yu <jawnsy at cpan.org>  Sun, 11 Oct 2009 16:31:45 -0400
+
 libmoosex-method-signatures-perl (0.27-1) unstable; urgency=low
 
   [ Jonathan Yu ]

Modified: trunk/libmoosex-method-signatures-perl/lib/MooseX/Method/Signatures.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-method-signatures-perl/lib/MooseX/Method/Signatures.pm?rev=45598&op=diff
==============================================================================
--- trunk/libmoosex-method-signatures-perl/lib/MooseX/Method/Signatures.pm (original)
+++ trunk/libmoosex-method-signatures-perl/lib/MooseX/Method/Signatures.pm Mon Oct 12 00:46:22 2009
@@ -19,7 +19,7 @@
 
 use namespace::autoclean;
 
-our $VERSION = '0.27';
+our $VERSION = '0.28';
 
 has package => (
     is            => 'ro',

Modified: trunk/libmoosex-method-signatures-perl/lib/MooseX/Method/Signatures/Meta/Method.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-method-signatures-perl/lib/MooseX/Method/Signatures/Meta/Method.pm?rev=45598&op=diff
==============================================================================
--- trunk/libmoosex-method-signatures-perl/lib/MooseX/Method/Signatures/Meta/Method.pm (original)
+++ trunk/libmoosex-method-signatures-perl/lib/MooseX/Method/Signatures/Meta/Method.pm Mon Oct 12 00:46:22 2009
@@ -410,22 +410,20 @@
             if ($self->_has_slurpy_positional) {
                 push @positional_args, @{ $_ }[$i .. $#{ $_ }];
             }
-            else {
-                unless ($#{ $_ } < $i) {
-                    my %rest = @{ $_ }[$i .. $#{ $_ }];
-                    while (my ($key, $spec) = each %named) {
-                        if (exists $rest{$key}) {
-                            $named_args{$key} = $coerce_param->($spec, delete $rest{$key});
-                            next;
-                        }
-
-                        if (exists $spec->{default}) {
-                            $named_args{$key} = eval $spec->{default};
-                        }
+            elsif (%named) {
+                my %rest = @{ $_ }[$i .. $#{ $_ }];
+                while (my ($key, $spec) = each %named) {
+                    if (exists $rest{$key}) {
+                        $named_args{$key} = $coerce_param->($spec, delete $rest{$key});
+                        next;
                     }
 
-                    @named_args{keys %rest} = values %rest;
+                    if (exists $spec->{default}) {
+                        $named_args{$key} = eval $spec->{default};
+                    }
                 }
+
+                @named_args{keys %rest} = values %rest;
             }
 
             return [\@positional_args, \%named_args];




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