r54516 - in /branches/upstream/libmoosex-params-validate-perl/current: ChangeLog MANIFEST META.yml README lib/MooseX/Params/Validate.pm t/010.overloaded.t t/pod.t t/pod_coverage.t xt/ xt/kwalitee.t xt/pod-coverage.t xt/pod-spell.t xt/pod.t
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Fri Mar 19 01:13:34 UTC 2010
Author: jawnsy-guest
Date: Fri Mar 19 01:13:00 2010
New Revision: 54516
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=54516
Log:
[svn-upgrade] Integrating new upstream version, libmoosex-params-validate-perl (0.14)
Added:
branches/upstream/libmoosex-params-validate-perl/current/t/010.overloaded.t
branches/upstream/libmoosex-params-validate-perl/current/xt/
branches/upstream/libmoosex-params-validate-perl/current/xt/kwalitee.t
branches/upstream/libmoosex-params-validate-perl/current/xt/pod-coverage.t
branches/upstream/libmoosex-params-validate-perl/current/xt/pod-spell.t
branches/upstream/libmoosex-params-validate-perl/current/xt/pod.t
Removed:
branches/upstream/libmoosex-params-validate-perl/current/t/pod.t
branches/upstream/libmoosex-params-validate-perl/current/t/pod_coverage.t
Modified:
branches/upstream/libmoosex-params-validate-perl/current/ChangeLog
branches/upstream/libmoosex-params-validate-perl/current/MANIFEST
branches/upstream/libmoosex-params-validate-perl/current/META.yml
branches/upstream/libmoosex-params-validate-perl/current/README
branches/upstream/libmoosex-params-validate-perl/current/lib/MooseX/Params/Validate.pm
Modified: branches/upstream/libmoosex-params-validate-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-params-validate-perl/current/ChangeLog?rev=54516&op=diff
==============================================================================
--- branches/upstream/libmoosex-params-validate-perl/current/ChangeLog (original)
+++ branches/upstream/libmoosex-params-validate-perl/current/ChangeLog Fri Mar 19 01:13:00 2010
@@ -1,6 +1,11 @@
Revision history for Perl extension MooseX-Params-Validate
-0.13 Sun., Nov. 29, 2009
+0.14 Sun. Mar. 18, 2010
+ - The validated_hash method failed when called on in an overloaded
+ stringify method. Patch by Ian Sillitoe. RT #52565.
+
+
+0.13 Sun. Nov. 29, 2009
- Fix so that validated_hash does not try to coerce optional
parameters which are not present. Patch by Ian Sillitoe.
Modified: branches/upstream/libmoosex-params-validate-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-params-validate-perl/current/MANIFEST?rev=54516&op=diff
==============================================================================
--- branches/upstream/libmoosex-params-validate-perl/current/MANIFEST (original)
+++ branches/upstream/libmoosex-params-validate-perl/current/MANIFEST Fri Mar 19 01:13:00 2010
@@ -22,5 +22,8 @@
t/007_deprecated.t
t/008_positional.t
t/009_wrapped.t
-t/pod.t
-t/pod_coverage.t
+t/010.overloaded.t
+xt/kwalitee.t
+xt/pod-coverage.t
+xt/pod-spell.t
+xt/pod.t
Modified: branches/upstream/libmoosex-params-validate-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-params-validate-perl/current/META.yml?rev=54516&op=diff
==============================================================================
--- branches/upstream/libmoosex-params-validate-perl/current/META.yml (original)
+++ branches/upstream/libmoosex-params-validate-perl/current/META.yml Fri Mar 19 01:13:00 2010
@@ -19,6 +19,7 @@
directory:
- inc
- t
+ - xt
requires:
Carp: 0
Devel::Caller: 0
@@ -29,4 +30,4 @@
resources:
license: http://dev.perl.org/licenses/
repository: http://code2.0beta.co.uk/moose/svn/MooseX-Params-Validate
-version: 0.13
+version: 0.14
Modified: branches/upstream/libmoosex-params-validate-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-params-validate-perl/current/README?rev=54516&op=diff
==============================================================================
--- branches/upstream/libmoosex-params-validate-perl/current/README (original)
+++ branches/upstream/libmoosex-params-validate-perl/current/README Fri Mar 19 01:13:00 2010
@@ -1,4 +1,4 @@
-MooseX::Params::Validate version 0.12
+MooseX::Params::Validate version 0.13
===========================
See the individual module documentation for more information
Modified: branches/upstream/libmoosex-params-validate-perl/current/lib/MooseX/Params/Validate.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-params-validate-perl/current/lib/MooseX/Params/Validate.pm?rev=54516&op=diff
==============================================================================
--- branches/upstream/libmoosex-params-validate-perl/current/lib/MooseX/Params/Validate.pm (original)
+++ branches/upstream/libmoosex-params-validate-perl/current/lib/MooseX/Params/Validate.pm Fri Mar 19 01:13:00 2010
@@ -19,7 +19,7 @@
},
};
-our $VERSION = '0.13';
+our $VERSION = '0.14';
our $AUTHORITY = 'cpan:STEVAN';
my %CACHED_SPECS;
@@ -60,7 +60,7 @@
called => _caller_name(),
);
- return ( ( $instance ? $instance : () ), %args );
+ return ( ( defined $instance ? $instance : () ), %args );
}
*validate = \&validated_hash;
@@ -108,7 +108,7 @@
);
return (
- ( $instance ? $instance : () ),
+ ( defined $instance ? $instance : () ),
@args{@ordered_spec}
);
}
Added: branches/upstream/libmoosex-params-validate-perl/current/t/010.overloaded.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-params-validate-perl/current/t/010.overloaded.t?rev=54516&op=file
==============================================================================
--- branches/upstream/libmoosex-params-validate-perl/current/t/010.overloaded.t (added)
+++ branches/upstream/libmoosex-params-validate-perl/current/t/010.overloaded.t Fri Mar 19 01:13:00 2010
@@ -1,0 +1,51 @@
+use Test::More tests => 4;
+use strict;
+use warnings;
+
+{
+ package Foo;
+
+ use Moose;
+ use MooseX::Params::Validate;
+ use overload (
+ qw{""} => 'to_string',
+ );
+
+ has 'id' => (
+ is => 'ro',
+ isa => 'Str',
+ default => '1.10.100',
+ );
+
+ sub to_string {
+ my ( $self, %args ) = validated_hash(
+ \@_,
+ padded => {
+ isa => 'Bool',
+ optional => 1,
+ default => 0,
+ },
+ );
+
+ # 1.10.100 => 0001.0010.0100
+ my $id
+ = $args{padded}
+ ? join( '.',
+ map { sprintf( "%04d", $_ ) } split( /\./, $self->id ) )
+ : $self->id;
+
+ return $id;
+ }
+}
+
+isa_ok( my $foo = Foo->new(), 'Foo', 'new' );
+
+is( $foo->id, '1.10.100', 'id' );
+
+is( $foo->to_string, '1.10.100', 'to_string' );
+
+is(
+ $foo->to_string( padded => 1 ), '0001.0010.0100',
+ 'to_string( padded => 1 )'
+);
+
Added: branches/upstream/libmoosex-params-validate-perl/current/xt/kwalitee.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-params-validate-perl/current/xt/kwalitee.t?rev=54516&op=file
==============================================================================
--- branches/upstream/libmoosex-params-validate-perl/current/xt/kwalitee.t (added)
+++ branches/upstream/libmoosex-params-validate-perl/current/xt/kwalitee.t Fri Mar 19 01:13:00 2010
@@ -1,0 +1,8 @@
+use strict;
+use warnings;
+
+use Test::More;
+
+eval { require Test::Kwalitee; Test::Kwalitee->import() };
+plan skip_all => "Test::Kwalitee needed for testing kwalitee"
+ if $@;
Added: branches/upstream/libmoosex-params-validate-perl/current/xt/pod-coverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-params-validate-perl/current/xt/pod-coverage.t?rev=54516&op=file
==============================================================================
--- branches/upstream/libmoosex-params-validate-perl/current/xt/pod-coverage.t (added)
+++ branches/upstream/libmoosex-params-validate-perl/current/xt/pod-coverage.t Fri Mar 19 01:13:00 2010
@@ -1,0 +1,11 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
+
+all_pod_coverage_ok( { trustme => [ qr/^(?:validatep?|import)$/ ] } );
Added: branches/upstream/libmoosex-params-validate-perl/current/xt/pod-spell.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-params-validate-perl/current/xt/pod-spell.t?rev=54516&op=file
==============================================================================
--- branches/upstream/libmoosex-params-validate-perl/current/xt/pod-spell.t (added)
+++ branches/upstream/libmoosex-params-validate-perl/current/xt/pod-spell.t Fri Mar 19 01:13:00 2010
@@ -1,0 +1,30 @@
+use strict;
+use warnings;
+
+use Test::More;
+
+eval "use Test::Spelling";
+plan skip_all => "Test::Spelling required for testing POD coverage"
+ if $@;
+
+my @stopwords;
+for (<DATA>) {
+ chomp;
+ push @stopwords, $_
+ unless /\A (?: \# | \s* \z)/msx; # skip comments, whitespace
+}
+
+add_stopwords(@stopwords);
+set_spell_cmd('aspell list -l en');
+
+# This prevents a weird segfault from the aspell command - see
+# https://bugs.launchpad.net/ubuntu/+source/aspell/+bug/71322
+local $ENV{LC_ALL} = 'C';
+all_pod_files_spelling_ok();
+
+__DATA__
+Stevan
+cpan
+isa
+param
+subname
Added: branches/upstream/libmoosex-params-validate-perl/current/xt/pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-params-validate-perl/current/xt/pod.t?rev=54516&op=file
==============================================================================
--- branches/upstream/libmoosex-params-validate-perl/current/xt/pod.t (added)
+++ branches/upstream/libmoosex-params-validate-perl/current/xt/pod.t Fri Mar 19 01:13:00 2010
@@ -1,0 +1,9 @@
+use strict;
+use warnings;
+
+use Test::More;
+
+eval "use Test::Pod 1.14";
+plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
+
+all_pod_files_ok();
More information about the Pkg-perl-cvs-commits
mailing list