diff -Nru libmoosex-traits-pluggable-perl-0.11/Changes libmoosex-traits-pluggable-perl-0.12/Changes --- libmoosex-traits-pluggable-perl-0.11/Changes 2014-01-07 21:04:58.000000000 +0000 +++ libmoosex-traits-pluggable-perl-0.12/Changes 2014-01-11 20:52:57.000000000 +0000 @@ -1,5 +1,8 @@ Revision history for MooseX::Traits::Pluggable +0.12 2014-01-11 15:52:52 + - fix bogus prereqs, PR from felliott (Fitz Elliott) + 0.11 2014-01-07 16:04:55 - add +_traits_behave_like_roles config attribute which prevents roles from overriding class methods, matching the behavior of regular Moose roles diff -Nru libmoosex-traits-pluggable-perl-0.11/META.json libmoosex-traits-pluggable-perl-0.12/META.json --- libmoosex-traits-pluggable-perl-0.11/META.json 2014-01-07 21:04:58.000000000 +0000 +++ libmoosex-traits-pluggable-perl-0.12/META.json 2014-01-11 20:52:57.000000000 +0000 @@ -43,12 +43,9 @@ "test" : { "requires" : { "File::Spec" : "0", - "Foo" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Moose" : "0", - "NS1" : "0", - "Parent" : "0", "Test::Exception" : "0", "Test::More" : "0", "base" : "0", @@ -74,7 +71,7 @@ "web" : "http://github.com/rkitover/moosex-traits-pluggable" } }, - "version" : "0.11", + "version" : "0.12", "x_authority" : "cpan:RKITOVER" } diff -Nru libmoosex-traits-pluggable-perl-0.11/META.yml libmoosex-traits-pluggable-perl-0.12/META.yml --- libmoosex-traits-pluggable-perl-0.11/META.yml 2014-01-07 21:04:58.000000000 +0000 +++ libmoosex-traits-pluggable-perl-0.12/META.yml 2014-01-11 20:52:57.000000000 +0000 @@ -4,12 +4,9 @@ - 'Rafael Kitover ' build_requires: File::Spec: 0 - Foo: 0 IO::Handle: 0 IPC::Open3: 0 Moose: 0 - NS1: 0 - Parent: 0 Test::Exception: 0 Test::More: 0 base: 0 @@ -41,5 +38,5 @@ homepage: http://metacpan.org/release/MooseX-Traits-Pluggable license: http://dev.perl.org/licenses/ repository: git://github.com/rkitover/moosex-traits-pluggable.git -version: 0.11 +version: 0.12 x_authority: cpan:RKITOVER diff -Nru libmoosex-traits-pluggable-perl-0.11/Makefile.PL libmoosex-traits-pluggable-perl-0.12/Makefile.PL --- libmoosex-traits-pluggable-perl-0.11/Makefile.PL 2014-01-07 21:04:58.000000000 +0000 +++ libmoosex-traits-pluggable-perl-0.12/Makefile.PL 2014-01-11 20:52:57.000000000 +0000 @@ -31,19 +31,16 @@ }, "TEST_REQUIRES" => { "File::Spec" => 0, - "Foo" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Moose" => 0, - "NS1" => 0, - "Parent" => 0, "Test::Exception" => 0, "Test::More" => 0, "base" => 0, "strict" => 0, "warnings" => 0 }, - "VERSION" => "0.11", + "VERSION" => "0.12", "test" => { "TESTS" => "t/*.t" } @@ -54,15 +51,12 @@ "Carp" => 0, "Class::Load" => 0, "File::Spec" => 0, - "Foo" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "List::MoreUtils" => 0, "Moose" => 0, "Moose::Role" => 0, "Moose::Util" => 0, - "NS1" => 0, - "Parent" => 0, "Scalar::Util" => 0, "Test::Exception" => 0, "Test::More" => 0, diff -Nru libmoosex-traits-pluggable-perl-0.11/README libmoosex-traits-pluggable-perl-0.12/README --- libmoosex-traits-pluggable-perl-0.11/README 2014-01-07 21:04:58.000000000 +0000 +++ libmoosex-traits-pluggable-perl-0.12/README 2014-01-11 20:52:57.000000000 +0000 @@ -103,7 +103,10 @@ Rafael Kitover "" CONTRIBUTORS - Tomas Doran, "" + Tomas Doran, "" Fitz Elliott, + "" Andreas Marienborg, + "" Alexander Hartmaier, + "" COPYRIGHT & LICENSE Copyright (c) 2014 by the aforementioned "AUTHOR" and "CONTRIBUTORS". diff -Nru libmoosex-traits-pluggable-perl-0.11/debian/changelog libmoosex-traits-pluggable-perl-0.12/debian/changelog --- libmoosex-traits-pluggable-perl-0.11/debian/changelog 2014-01-11 21:09:11.000000000 +0000 +++ libmoosex-traits-pluggable-perl-0.12/debian/changelog 2014-01-15 16:26:20.000000000 +0000 @@ -1,3 +1,10 @@ +libmoosex-traits-pluggable-perl (0.12-1) unstable; urgency=medium + + * New upstream release. + * Add new upstream copyright holders. + + -- gregor herrmann Wed, 15 Jan 2014 17:26:11 +0100 + libmoosex-traits-pluggable-perl (0.11-1) unstable; urgency=low [ Ansgar Burchardt ] diff -Nru libmoosex-traits-pluggable-perl-0.11/debian/copyright libmoosex-traits-pluggable-perl-0.12/debian/copyright --- libmoosex-traits-pluggable-perl-0.11/debian/copyright 2014-01-11 21:09:11.000000000 +0000 +++ libmoosex-traits-pluggable-perl-0.12/debian/copyright 2014-01-15 16:26:20.000000000 +0000 @@ -7,6 +7,9 @@ Copyright: 2014, Rafael Kitover 2014, Tomas Doran + 2014, Fitz Elliott + 2014, Andreas Marienborg + 2014, Alexander Hartmaier License: Artistic or GPL-1+ Files: debian/* diff -Nru libmoosex-traits-pluggable-perl-0.11/dist.ini libmoosex-traits-pluggable-perl-0.12/dist.ini --- libmoosex-traits-pluggable-perl-0.11/dist.ini 2014-01-07 21:04:58.000000000 +0000 +++ libmoosex-traits-pluggable-perl-0.12/dist.ini 2014-01-11 20:52:57.000000000 +0000 @@ -10,3 +10,7 @@ authority = cpan:RKITOVER github_user = rkitover install_command = cpanm . +no_AutoPrereq = 1 + +[AutoPrereqs] +skip = ^t:: diff -Nru libmoosex-traits-pluggable-perl-0.11/lib/MooseX/Traits/Pluggable.pm libmoosex-traits-pluggable-perl-0.12/lib/MooseX/Traits/Pluggable.pm --- libmoosex-traits-pluggable-perl-0.11/lib/MooseX/Traits/Pluggable.pm 2014-01-07 21:04:58.000000000 +0000 +++ libmoosex-traits-pluggable-perl-0.12/lib/MooseX/Traits/Pluggable.pm 2014-01-11 20:52:57.000000000 +0000 @@ -1,6 +1,6 @@ package MooseX::Traits::Pluggable; { - $MooseX::Traits::Pluggable::VERSION = '0.11'; + $MooseX::Traits::Pluggable::VERSION = '0.12'; } use namespace::autoclean; @@ -335,6 +335,9 @@ =head1 CONTRIBUTORS Tomas Doran, C<< >> +Fitz Elliott, C<< >> +Andreas Marienborg, C<< >> +Alexander Hartmaier, C<< >> =head1 COPYRIGHT & LICENSE diff -Nru libmoosex-traits-pluggable-perl-0.11/t/basic.t libmoosex-traits-pluggable-perl-0.12/t/basic.t --- libmoosex-traits-pluggable-perl-0.11/t/basic.t 2014-01-07 21:04:58.000000000 +0000 +++ libmoosex-traits-pluggable-perl-0.12/t/basic.t 2014-01-11 20:52:57.000000000 +0000 @@ -3,7 +3,7 @@ use Test::More tests => 43*2; use Test::Exception; -{ package Trait; +{ package t::Trait; use Moose::Role; has 'foo' => ( is => 'ro', @@ -11,19 +11,19 @@ required => 1, ); sub test_method { - return 'Trait::test_method'; + return 't::Trait::test_method'; } - package Class; + package t::Class; use Moose; with 'MooseX::Traits::Pluggable'; has '+_traits_behave_like_roles' => (default => 1); sub test_method { - return 'Class::test_method'; + return 't::Class::test_method'; } - package Another::Trait; + package t::Another::t::Trait; use Moose::Role; has 'bar' => ( is => 'ro', @@ -31,31 +31,31 @@ required => 1, ); - package Another::Class; + package t::Another::Class; use Moose; with 'MooseX::Traits::Pluggable'; - has '+_trait_namespace' => ( default => 'Another' ); + has '+_trait_namespace' => ( default => 't::Another' ); - package NS1; + package t::NS1; use Moose; - package NS1::Trait::Foo; + package t::NS1::Trait::t::Foo; use Moose::Role; has 'bar' => (is => 'ro', required => 1); - package NS2; + package t::NS2; use Moose; - use base 'NS1'; + use base 't::NS1'; with 'MooseX::Traits::Pluggable'; has '+_trait_namespace' => ( - default => sub { [qw/+Trait ExtraNS::Trait/] } + default => sub { [qw/+Trait t::ExtraNS::Trait/] } ); - package NS2::Trait::Bar; + package t::NS2::Trait::t::Bar; use Moose::Role; has 'baz' => (is => 'ro', required => 1); - package ExtraNS::Trait::Extra; + package t::ExtraNS::Trait::t::Extra; use Moose::Role; has 'extra' => (is => 'ro', required => 1); } @@ -77,15 +77,15 @@ for my $new_with_traits (@method) { { - my $instance = Class->$new_with_traits( traits => ['Trait'], foo => 'hello' ); - isa_ok $instance, 'Class'; + my $instance = t::Class->$new_with_traits( traits => ['t::Trait'], foo => 'hello' ); + isa_ok $instance, 't::Class'; can_ok $instance, 'foo'; is $instance->foo, 'hello'; - isnt ref($instance), 'Class'; - is $instance->_original_class_name, 'Class'; - is_deeply $instance->_traits, ['Trait']; - is_deeply $instance->_resolved_traits, ['Trait']; - is $instance->test_method, 'Class::test_method', + isnt ref($instance), 't::Class'; + is $instance->_original_class_name, 't::Class'; + is_deeply $instance->_traits, ['t::Trait']; + is_deeply $instance->_resolved_traits, ['t::Trait']; + is $instance->test_method, 't::Class::test_method', "sub in consuming class doesn't get overriden by sub from role"; } @@ -95,47 +95,47 @@ local *Carp::caller_info = sub {}; throws_ok { - Class->$new_with_traits( traits => ['Trait'] ); + t::Class->$new_with_traits( traits => ['t::Trait'] ); } qr/required/, 'foo is required'; } { - my $instance = Class->$new_with_traits; - isa_ok $instance, 'Class'; + my $instance = t::Class->$new_with_traits; + isa_ok $instance, 't::Class'; ok !$instance->can('foo'), 'this one cannot foo'; } { - my $instance = Class->$new_with_traits( traits => [] ); - isa_ok $instance, 'Class'; + my $instance = t::Class->$new_with_traits( traits => [] ); + isa_ok $instance, 't::Class'; ok !$instance->can('foo'), 'this one cannot foo either'; } { - my $instance = Another::Class->$new_with_traits( traits => ['Trait'], bar => 'bar' ); - isa_ok $instance, 'Another::Class'; + my $instance = t::Another::Class->$new_with_traits( traits => ['t::Trait'], bar => 'bar' ); + isa_ok $instance, 't::Another::Class'; can_ok $instance, 'bar'; is $instance->bar, 'bar'; } # try hashref form { - my $instance = Another::Class->$new_with_traits({ traits => ['Trait'], bar => 'bar' }); - isa_ok $instance, 'Another::Class'; + my $instance = t::Another::Class->$new_with_traits({ traits => ['t::Trait'], bar => 'bar' }); + isa_ok $instance, 't::Another::Class'; can_ok $instance, 'bar'; is $instance->bar, 'bar'; } { - my $instance = Another::Class->$new_with_traits( - traits => ['Trait', '+Trait'], + my $instance = t::Another::Class->$new_with_traits( + traits => ['t::Trait', '+t::Trait'], foo => 'foo', bar => 'bar', ); - isa_ok $instance, 'Another::Class'; + isa_ok $instance, 't::Another::Class'; can_ok $instance, 'foo'; can_ok $instance, 'bar'; is $instance->foo, 'foo'; is $instance->bar, 'bar'; - is_deeply $instance->_traits, ['Trait', '+Trait']; - is_deeply $instance->_resolved_traits, ['Another::Trait', 'Trait']; + is_deeply $instance->_traits, ['t::Trait', '+t::Trait']; + is_deeply $instance->_resolved_traits, ['t::Another::t::Trait', 't::Trait']; } { # Carp chokes here too @@ -143,23 +143,23 @@ local *Carp::caller_info = sub {}; throws_ok { - NS2->$new_with_traits(traits => ['NonExistant']); + t::NS2->$new_with_traits(traits => ['NonExistant']); } qr/Could not find a class/, 'unfindable trait throws exception'; } { - my $instance = NS2->$new_with_traits( - traits => ['+Trait', 'Foo', 'Bar', 'Extra'], + my $instance = t::NS2->$new_with_traits( + traits => ['+t::Trait', 't::Foo', 't::Bar', 't::Extra'], foo => 'foo', bar => 'bar', baz => 'baz', extra => 'extra', ); - isa_ok $instance, 'NS2'; - isa_ok $instance, 'NS1'; - ok $instance->meta->does_role('Trait'); - ok $instance->meta->does_role('NS1::Trait::Foo'); - ok $instance->meta->does_role('NS2::Trait::Bar'); - ok $instance->meta->does_role('ExtraNS::Trait::Extra'); + isa_ok $instance, 't::NS2'; + isa_ok $instance, 't::NS1'; + ok $instance->meta->does_role('t::Trait'); + ok $instance->meta->does_role('t::NS1::Trait::t::Foo'); + ok $instance->meta->does_role('t::NS2::Trait::t::Bar'); + ok $instance->meta->does_role('t::ExtraNS::Trait::t::Extra'); can_ok $instance, 'foo'; can_ok $instance, 'bar'; can_ok $instance, 'baz'; @@ -168,8 +168,8 @@ is $instance->bar, 'bar'; is $instance->baz, 'baz'; is $instance->extra, 'extra'; - is_deeply $instance->_traits, ['+Trait', 'Foo', 'Bar', 'Extra']; + is_deeply $instance->_traits, ['+t::Trait', 't::Foo', 't::Bar', 't::Extra']; is_deeply $instance->_resolved_traits, - ['Trait', 'NS1::Trait::Foo', 'NS2::Trait::Bar', 'ExtraNS::Trait::Extra']; + ['t::Trait', 't::NS1::Trait::t::Foo', 't::NS2::Trait::t::Bar', 't::ExtraNS::Trait::t::Extra']; } } diff -Nru libmoosex-traits-pluggable-perl-0.11/t/positional_args_and_hr.t libmoosex-traits-pluggable-perl-0.12/t/positional_args_and_hr.t --- libmoosex-traits-pluggable-perl-0.11/t/positional_args_and_hr.t 2014-01-07 21:04:58.000000000 +0000 +++ libmoosex-traits-pluggable-perl-0.12/t/positional_args_and_hr.t 2014-01-11 20:52:57.000000000 +0000 @@ -3,7 +3,7 @@ use Test::More tests => 2; { - package Trait; + package t::Trait; use Moose::Role; has 'foo' => ( is => 'ro', @@ -11,17 +11,17 @@ required => 1, ); - package Parent; + package t::Parent; use Moose; sub BUILDARGS { pop(@_); } - package Class; + package t::Class; use Moose; use Test::More; - extends 'Parent'; + extends 't::Parent'; with 'MooseX::Traits::Pluggable'; override BUILDARGS => sub { my ($self, $param1) = @_; @@ -30,8 +30,8 @@ }; } -my $i = Class->new_with_traits('Positional value', - { foo => 'bar', traits => 'Trait' } +my $i = t::Class->new_with_traits('Positional value', + { foo => 'bar', traits => 't::Trait' } ); is $i->foo, 'bar', 'Normal args work'; diff -Nru libmoosex-traits-pluggable-perl-0.11/t/subclass.t libmoosex-traits-pluggable-perl-0.12/t/subclass.t --- libmoosex-traits-pluggable-perl-0.11/t/subclass.t 2014-01-07 21:04:58.000000000 +0000 +++ libmoosex-traits-pluggable-perl-0.12/t/subclass.t 2014-01-11 20:52:57.000000000 +0000 @@ -3,15 +3,15 @@ use Test::More tests => 3; use Test::Exception; -{ package Foo; +{ package t::Foo; use Moose; with 'MooseX::Traits::Pluggable'; - package Bar; + package t::Bar; use Moose; - extends 'Foo'; + extends 't::Foo'; - package Trait; + package t::Trait; use Moose::Role; sub foo { return 42 }; @@ -19,8 +19,8 @@ my $instance; lives_ok { - $instance = Bar->new_with_traits( traits => ['Trait'] ); + $instance = t::Bar->new_with_traits( traits => ['t::Trait'] ); } 'creating instance works ok'; -ok $instance->does('Trait'), 'instance does trait'; +ok $instance->does('t::Trait'), 'instance does trait'; is $instance->foo, 42, 'trait works';