r70211 - in /trunk/libmoosex-role-parameterized-perl: ./ debian/ lib/MooseX/Role/ lib/MooseX/Role/Parameterized/ lib/MooseX/Role/Parameterized/Meta/ lib/MooseX/Role/Parameterized/Meta/Role/ lib/MooseX/Role/Parameterized/Meta/Trait/ t/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Wed Mar 2 01:56:17 UTC 2011
Author: jawnsy-guest
Date: Wed Mar 2 01:56:09 2011
New Revision: 70211
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=70211
Log:
NOTE: Forward compatibility changes for the new Moose 2.0, not
needed until that version is in Debian
* New upstream release
Added:
trunk/libmoosex-role-parameterized-perl/t/020-metaclass-reinitialize.t
- copied unchanged from r70210, branches/upstream/libmoosex-role-parameterized-perl/current/t/020-metaclass-reinitialize.t
Modified:
trunk/libmoosex-role-parameterized-perl/Changes
trunk/libmoosex-role-parameterized-perl/MANIFEST
trunk/libmoosex-role-parameterized-perl/META.yml
trunk/libmoosex-role-parameterized-perl/debian/changelog
trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized.pm
trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Parameter.pm
trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm
trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Role/Parameterized.pm
trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Trait/Parameterized.pm
trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Parameters.pm
Modified: trunk/libmoosex-role-parameterized-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-role-parameterized-perl/Changes?rev=70211&op=diff
==============================================================================
--- trunk/libmoosex-role-parameterized-perl/Changes (original)
+++ trunk/libmoosex-role-parameterized-perl/Changes Wed Mar 2 01:56:09 2011
@@ -1,4 +1,8 @@
Changes for MooseX-Role-Parameterized
+
+0.24 March 1, 2011
+ * Moose 2.0 will make MXRP more extensible by allowing role
+ reinitialization, so register the hook to make that happen (doy)
0.23 December 25, 2010
* Merry Christmas!
@@ -7,7 +11,7 @@
0.22 November 26, 2010
* The test suite now uses Test::Fatal instead of Test::Exception (Karen
Etheridge).
- * Fix Test::More dependency (reported by Father Chrysostomos)
+ * Fix Test::More dependency (reported by Father Chrysostomos) [rt.cpan.org #63222]
0.21 November 15, 2010
* "package" arg can now tell generate_role to use a specific package (rjbs)
Modified: trunk/libmoosex-role-parameterized-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-role-parameterized-perl/MANIFEST?rev=70211&op=diff
==============================================================================
--- trunk/libmoosex-role-parameterized-perl/MANIFEST (original)
+++ trunk/libmoosex-role-parameterized-perl/MANIFEST Wed Mar 2 01:56:09 2011
@@ -38,6 +38,7 @@
t/017-current_metaclass.t
t/018-parameter-roles.t
t/019-custom-metaclass.t
+t/020-metaclass-reinitialize.t
t/100-erroneous-keywords.t
t/101-alias-excludes.t
t/102-nested.t
Modified: trunk/libmoosex-role-parameterized-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-role-parameterized-perl/META.yml?rev=70211&op=diff
==============================================================================
--- trunk/libmoosex-role-parameterized-perl/META.yml (original)
+++ trunk/libmoosex-role-parameterized-perl/META.yml Wed Mar 2 01:56:09 2011
@@ -27,4 +27,4 @@
homepage: http://github.com/sartak/MooseX-Role-Parameterized/tree
license: http://dev.perl.org/licenses/
repository: git://github.com/sartak/MooseX-Role-Parameterized.git
-version: 0.23
+version: 0.24
Modified: trunk/libmoosex-role-parameterized-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-role-parameterized-perl/debian/changelog?rev=70211&op=diff
==============================================================================
--- trunk/libmoosex-role-parameterized-perl/debian/changelog (original)
+++ trunk/libmoosex-role-parameterized-perl/debian/changelog Wed Mar 2 01:56:09 2011
@@ -1,3 +1,12 @@
+libmoosex-role-parameterized-perl (0.24-1) UNRELEASED; urgency=low
+
+ NOTE: Forward compatibility changes for the new Moose 2.0, not
+ needed until that version is in Debian
+
+ * New upstream release
+
+ -- Jonathan Yu <jawnsy at cpan.org> Tue, 01 Mar 2011 21:15:30 -0500
+
libmoosex-role-parameterized-perl (0.23-1) unstable; urgency=low
* New upstream release
Modified: trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized.pm?rev=70211&op=diff
==============================================================================
--- trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized.pm (original)
+++ trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized.pm Wed Mar 2 01:56:09 2011
@@ -7,7 +7,7 @@
use MooseX::Role::Parameterized::Meta::Role::Parameterizable;
-our $VERSION = '0.23';
+our $VERSION = '0.24';
our $CURRENT_METACLASS;
Moose::Exporter->setup_import_methods(
@@ -261,13 +261,21 @@
=head1 SEE ALSO
-L<http://sartak.blogspot.com/2009/05/parameterized-roles.html>
+L<http://sartak.org/2009/01/parametric-roles-in-perl-5.html>
+
+L<http://sartak.org/2009/05/the-design-of-parameterized-roles.html>
L<http://stevan-little.blogspot.com/2009/07/thoughts-on-parameterized-roles.html>
+L<http://perldition.org/articles/Parameterized%20Roles%20with%20MooseX::Declare.pod>
+
+L<http://www.modernperlbooks.com/mt/2011/01/the-parametric-role-of-my-mvc-plugin-system.html>
+
+L<http://jjnapiorkowski.typepad.com/modern-perl/2010/08/parameterized-roles-and-method-traits-redo.html>
+
L<http://sartak.org/talks/yapc-asia-2009/(parameterized)-roles/>
-L<http://perldition.org/articles/Parameterized%20Roles%20with%20MooseX::Declare.pod>
+L<https://github.com/SamuraiJack/JooseX-Role-Parameterized> - this extension ported to JavaScript's Joose
=head1 COPYRIGHT AND LICENSE
Modified: trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Parameter.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Parameter.pm?rev=70211&op=diff
==============================================================================
--- trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Parameter.pm (original)
+++ trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Parameter.pm Wed Mar 2 01:56:09 2011
@@ -2,7 +2,7 @@
use Moose;
extends 'Moose::Meta::Attribute';
-our $VERSION = '0.23';
+our $VERSION = '0.24';
# This doesn't actually do anything because _process_options does not consult
# the default value of "is". hrm.
Modified: trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm?rev=70211&op=diff
==============================================================================
--- trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm (original)
+++ trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm Wed Mar 2 01:56:09 2011
@@ -2,7 +2,7 @@
use Moose;
extends 'Moose::Meta::Role';
-our $VERSION = '0.23';
+our $VERSION = '0.24';
use MooseX::Role::Parameterized::Meta::Role::Parameterized;
use MooseX::Role::Parameterized::Meta::Parameter;
@@ -105,7 +105,9 @@
consumer => $args{consumer},
);
- return $role;
+ # don't just return $role here, because it might have been changed when
+ # metaroles are applied
+ return $MooseX::Role::Parameterized::CURRENT_METACLASS;
}
sub _role_for_combination {
Modified: trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Role/Parameterized.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Role/Parameterized.pm?rev=70211&op=diff
==============================================================================
--- trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Role/Parameterized.pm (original)
+++ trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Role/Parameterized.pm Wed Mar 2 01:56:09 2011
@@ -3,7 +3,29 @@
extends 'Moose::Meta::Role';
with 'MooseX::Role::Parameterized::Meta::Trait::Parameterized';
-our $VERSION = '0.23';
+our $VERSION = '0.24';
+
+around reinitialize => sub {
+ my $orig = shift;
+ my $class = shift;
+ my ($pkg) = @_;
+ my $meta = blessed($pkg) ? $pkg : Class::MOP::class_of($pkg);
+
+ # this bit is possibly subject to change. I've lodged complaints with the
+ # appropriate Moose developers :)
+ my $genitor = $meta->genitor;
+ my $parameters = $meta->parameters;
+
+ my $new = $class->$orig(
+ @_,
+ (defined($genitor) ? (genitor => $genitor) : ()),
+ (defined($parameters) ? (parameters => $parameters) : ()),
+ );
+
+ # in case the role metaclass was reinitialized
+ $MooseX::Role::Parameterized::CURRENT_METACLASS = $new;
+ return $new;
+};
__PACKAGE__->meta->make_immutable;
no Moose;
Modified: trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Trait/Parameterized.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Trait/Parameterized.pm?rev=70211&op=diff
==============================================================================
--- trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Trait/Parameterized.pm (original)
+++ trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Meta/Trait/Parameterized.pm Wed Mar 2 01:56:09 2011
@@ -1,7 +1,7 @@
package MooseX::Role::Parameterized::Meta::Trait::Parameterized;
use Moose::Role;
-our $VERSION = '0.23';
+our $VERSION = '0.24';
use MooseX::Role::Parameterized::Parameters;
Modified: trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Parameters.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Parameters.pm?rev=70211&op=diff
==============================================================================
--- trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Parameters.pm (original)
+++ trunk/libmoosex-role-parameterized-perl/lib/MooseX/Role/Parameterized/Parameters.pm Wed Mar 2 01:56:09 2011
@@ -1,7 +1,7 @@
package MooseX::Role::Parameterized::Parameters;
use Moose;
-our $VERSION = '0.23';
+our $VERSION = '0.24';
__PACKAGE__->meta->make_immutable;
no Moose;
More information about the Pkg-perl-cvs-commits
mailing list