r44257 - in /branches/upstream/libmoosex-declare-perl/current: ./ lib/MooseX/ lib/MooseX/Declare/Syntax/Keyword/ t/ t/lib/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Sat Sep 19 03:29:51 UTC 2009
Author: jawnsy-guest
Date: Sat Sep 19 03:29:46 2009
New Revision: 44257
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=44257
Log:
[svn-upgrade] Integrating new upstream version, libmoosex-declare-perl (0.31)
Modified:
branches/upstream/libmoosex-declare-perl/current/Changes
branches/upstream/libmoosex-declare-perl/current/META.yml
branches/upstream/libmoosex-declare-perl/current/Makefile.PL
branches/upstream/libmoosex-declare-perl/current/README
branches/upstream/libmoosex-declare-perl/current/TODO
branches/upstream/libmoosex-declare-perl/current/lib/MooseX/Declare.pm
branches/upstream/libmoosex-declare-perl/current/lib/MooseX/Declare/Syntax/Keyword/Role.pm
branches/upstream/libmoosex-declare-perl/current/t/lib/Foo.pm
branches/upstream/libmoosex-declare-perl/current/t/lib/ParameterizedRole.pm
branches/upstream/libmoosex-declare-perl/current/t/override_attribute_from_role.t
branches/upstream/libmoosex-declare-perl/current/t/role_parameterized.t
Modified: branches/upstream/libmoosex-declare-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-declare-perl/current/Changes?rev=44257&op=diff
==============================================================================
--- branches/upstream/libmoosex-declare-perl/current/Changes (original)
+++ branches/upstream/libmoosex-declare-perl/current/Changes Sat Sep 19 03:29:46 2009
@@ -1,3 +1,11 @@
+0.31 Thu, 17 Sep 2009 18:10:22 +0200
+ * Bump dependencies for no more warnings on new Moose versions.
+
+0.30 Sat, 05 Sep 2009 02:48:05 +0200
+ * Make the attr inheriting TODO test work.
+ * Make default values for role parameters work (nperez).
+ * Add tests for the above (nperez).
+
0.29 Mon, 31 Aug 2009 19:11:25 +0200
* Add failing test for applying modifiers to a method directly composed from
a role (nperez).
Modified: branches/upstream/libmoosex-declare-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-declare-perl/current/META.yml?rev=44257&op=diff
==============================================================================
--- branches/upstream/libmoosex-declare-perl/current/META.yml (original)
+++ branches/upstream/libmoosex-declare-perl/current/META.yml Sat Sep 19 03:29:46 2009
@@ -23,15 +23,15 @@
requires:
Devel::Declare: 0.005011
List::MoreUtils: 0
- Moose: 0.89
+ Moose: 0.90
MooseX::AttributeHelpers: 0
MooseX::Method::Signatures: 0.24
MooseX::Role::Parameterized: 0.12
MooseX::Types::Moose: 0
- namespace::autoclean: 0.05
+ namespace::autoclean: 0.09
namespace::clean: 0.11
resources:
bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Declare
license: http://dev.perl.org/licenses/
repository: git://github.com/rafl/moosex-declare.git
-version: 0.29
+version: 0.31
Modified: branches/upstream/libmoosex-declare-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-declare-perl/current/Makefile.PL?rev=44257&op=diff
==============================================================================
--- branches/upstream/libmoosex-declare-perl/current/Makefile.PL (original)
+++ branches/upstream/libmoosex-declare-perl/current/Makefile.PL Sat Sep 19 03:29:46 2009
@@ -7,8 +7,8 @@
requires 'Devel::Declare' => '0.005011';
requires 'namespace::clean' => '0.11';
-requires 'namespace::autoclean' => '0.05';
-requires 'Moose' => '0.89';
+requires 'namespace::autoclean' => '0.09';
+requires 'Moose' => '0.90';
requires 'MooseX::AttributeHelpers';
requires 'MooseX::Method::Signatures' => '0.24';
requires 'MooseX::Role::Parameterized' => '0.12';
Modified: branches/upstream/libmoosex-declare-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-declare-perl/current/README?rev=44257&op=diff
==============================================================================
--- branches/upstream/libmoosex-declare-perl/current/README (original)
+++ branches/upstream/libmoosex-declare-perl/current/README Sat Sep 19 03:29:46 2009
@@ -207,6 +207,8 @@
Nelo Onyiah <nelo.onyiah at gmail.com>
nperez <nperez at cpan.org>
Piers Cawley <pdcawley at bofh.org.uk>
+ Rafael Kitover <rkitover at io.com>
+ Robert âphaylonâ Sedlacek <rs at 474.at>
Stevan Little <stevan.little at iinteractive.com>
Tomas Doran <bobtfish at bobtfish.net>
Yanick Champoux <yanick at babyl.dyndns.org>
Modified: branches/upstream/libmoosex-declare-perl/current/TODO
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-declare-perl/current/TODO?rev=44257&op=diff
==============================================================================
--- branches/upstream/libmoosex-declare-perl/current/TODO (original)
+++ branches/upstream/libmoosex-declare-perl/current/TODO Sat Sep 19 03:29:46 2009
@@ -1,6 +1,4 @@
* Implement class Foo;
-* Only set up the matching declarators inside of class and role.
- (i.e. no augment in role)
* Implemet subclass { ... }, meaning class Foo extends OuterClass { ... } for
nested classes.
* Allow $class = extends Foo { ... }; and $class = with Role { ... }; for
Modified: branches/upstream/libmoosex-declare-perl/current/lib/MooseX/Declare.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-declare-perl/current/lib/MooseX/Declare.pm?rev=44257&op=diff
==============================================================================
--- branches/upstream/libmoosex-declare-perl/current/lib/MooseX/Declare.pm (original)
+++ branches/upstream/libmoosex-declare-perl/current/lib/MooseX/Declare.pm Sat Sep 19 03:29:46 2009
@@ -9,7 +9,7 @@
use namespace::clean;
-our $VERSION = '0.29';
+our $VERSION = '0.31';
sub import {
my ($class, %args) = @_;
@@ -272,6 +272,10 @@
=item Piers Cawley E<lt>pdcawley at bofh.org.ukE<gt>
+=item Rafael Kitover E<lt>rkitover at io.comE<gt>
+
+=item Robert âphaylonâ Sedlacek E<lt>rs at 474.atE<gt>
+
=item Stevan Little E<lt>stevan.little at iinteractive.comE<gt>
=item Tomas Doran E<lt>bobtfish at bobtfish.netE<gt>
Modified: branches/upstream/libmoosex-declare-perl/current/lib/MooseX/Declare/Syntax/Keyword/Role.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-declare-perl/current/lib/MooseX/Declare/Syntax/Keyword/Role.pm?rev=44257&op=diff
==============================================================================
--- branches/upstream/libmoosex-declare-perl/current/lib/MooseX/Declare/Syntax/Keyword/Role.pm (original)
+++ branches/upstream/libmoosex-declare-perl/current/lib/MooseX/Declare/Syntax/Keyword/Role.pm Sat Sep 19 03:29:46 2009
@@ -66,16 +66,30 @@
my @vars = map {
does_role($_, Placeholder)
? ()
- : [$_->variable_name, $_->label, $_->meta_type_constraint]
+ : {
+ var => $_->variable_name,
+ name => $_->label,
+ tc => $_->meta_type_constraint,
+ ($_->has_default_value
+ ? (default => $_->default_value)
+ : ()),
+ },
} $sig->named_params;
$ctx->add_preamble_code_parts(
sprintf 'my (%s) = map { $_[0]->$_ } qw(%s);',
- join(',', map { $_->[0] } @vars),
- join(' ', map { $_->[1] } @vars),
+ join(',', map { $_->{var} } @vars),
+ join(' ', map { $_->{name} } @vars),
);
- $ctx->add_parameter($_->[1] => { isa => $_->[2] }) for @vars;
+ for my $var (@vars) {
+ $ctx->add_parameter($var->{name} => {
+ isa => $var->{tc},
+ (exists $var->{default}
+ ? (default => sub { eval $var->{default} })
+ : ()),
+ });
+ }
}
after handle_post_parsing => sub {
Modified: branches/upstream/libmoosex-declare-perl/current/t/lib/Foo.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-declare-perl/current/t/lib/Foo.pm?rev=44257&op=diff
==============================================================================
--- branches/upstream/libmoosex-declare-perl/current/t/lib/Foo.pm (original)
+++ branches/upstream/libmoosex-declare-perl/current/t/lib/Foo.pm Sat Sep 19 03:29:46 2009
@@ -39,7 +39,7 @@
with 'Role';
}
-class Corge extends Foo::Bar with Role {
+class Corge extends Foo::Baz with Role {
method corge {}
method required_thing {}
}
Modified: branches/upstream/libmoosex-declare-perl/current/t/lib/ParameterizedRole.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-declare-perl/current/t/lib/ParameterizedRole.pm?rev=44257&op=diff
==============================================================================
--- branches/upstream/libmoosex-declare-perl/current/t/lib/ParameterizedRole.pm (original)
+++ branches/upstream/libmoosex-declare-perl/current/t/lib/ParameterizedRole.pm Sat Sep 19 03:29:46 2009
@@ -1,7 +1,7 @@
use MooseX::Declare;
-role Counter (Str :$name) {
- has $name => (is => 'rw', isa => 'Int', default => 0);
+role Counter (Str :$name, Int :$charges = 1) {
+ has $name => (is => 'rw', isa => 'Int', default => $charges);
method "increment_${name}" {
$self->$name($self->$name + 1);
@@ -13,11 +13,15 @@
}
class MyGame::Weapon {
- with Counter => { name => 'enchantment' };
+ with Counter => { name => 'enchantment', charges => 5 };
}
class MyGame::Wand {
- with Counter => { name => 'zapped' };
+ with Counter => { name => 'zapped', charges => 3 };
+}
+
+class MyGame::Scroll {
+ with Counter => { name => 'spelled' };
}
1;
Modified: branches/upstream/libmoosex-declare-perl/current/t/override_attribute_from_role.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-declare-perl/current/t/override_attribute_from_role.t?rev=44257&op=diff
==============================================================================
--- branches/upstream/libmoosex-declare-perl/current/t/override_attribute_from_role.t (original)
+++ branches/upstream/libmoosex-declare-perl/current/t/override_attribute_from_role.t Sat Sep 19 03:29:46 2009
@@ -7,11 +7,9 @@
has foo => ( is => 'ro' );
}
-TODO: {
- local $TODO = 'Fails';
- lives_ok {
- class Consumer with ProvidesFooAttribute {
- has '+foo' => ( isa => 'Int' );
- }
- } 'Delayed role application does not play nice with has +foo';
-}
+lives_ok {
+ class Consumer {
+ with 'ProvidesFooAttribute';
+ has '+foo' => ( isa => 'Int' );
+ }
+} 'Delayed role application does not play nice with has +foo';
Modified: branches/upstream/libmoosex-declare-perl/current/t/role_parameterized.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-declare-perl/current/t/role_parameterized.t?rev=44257&op=diff
==============================================================================
--- branches/upstream/libmoosex-declare-perl/current/t/role_parameterized.t (original)
+++ branches/upstream/libmoosex-declare-perl/current/t/role_parameterized.t Sat Sep 19 03:29:46 2009
@@ -9,8 +9,14 @@
can_ok('MyGame::Weapon', 'increment_enchantment');
can_ok('MyGame::Weapon', 'reset_enchantment');
+is(MyGame::Weapon->new->enchantment, 5, 'Provided default for enchantment');
can_ok('MyGame::Wand', 'increment_zapped');
can_ok('MyGame::Wand', 'reset_zapped');
+is(MyGame::Wand->new->zapped, 3, 'Provided default for zapped');
+
+can_ok('MyGame::Scroll', 'increment_spelled');
+can_ok('MyGame::Scroll', 'reset_spelled');
+is(MyGame::Scroll->new->spelled, 1, 'Provided default for spelled');
done_testing;
More information about the Pkg-perl-cvs-commits
mailing list