[Moose-commits] r7891 - in MooseX-ClassAttribute/trunk: .
lib/MooseX lib/MooseX/ClassAttribute/Meta/Method
lib/MooseX/ClassAttribute/Role/Meta t
autarch at code2.0beta.co.uk
autarch at code2.0beta.co.uk
Sun Apr 5 21:57:43 GMT 2009
Author: autarch
Date: 2009-04-05 14:57:43 -0700 (Sun, 05 Apr 2009)
New Revision: 7891
Modified:
MooseX-ClassAttribute/trunk/Build.PL
MooseX-ClassAttribute/trunk/Changes
MooseX-ClassAttribute/trunk/lib/MooseX/ClassAttribute.pm
MooseX-ClassAttribute/trunk/lib/MooseX/ClassAttribute/Meta/Method/Accessor.pm
MooseX-ClassAttribute/trunk/lib/MooseX/ClassAttribute/Role/Meta/Class.pm
MooseX-ClassAttribute/trunk/t/pod-coverage.t
Log:
Changes to work with (and require) Moose 0.73_01
Modified: MooseX-ClassAttribute/trunk/Build.PL
===================================================================
--- MooseX-ClassAttribute/trunk/Build.PL 2009-04-04 20:45:13 UTC (rev 7890)
+++ MooseX-ClassAttribute/trunk/Build.PL 2009-04-05 21:57:43 UTC (rev 7891)
@@ -6,7 +6,7 @@
my $builder = Module::Build->new
( module_name => 'MooseX::ClassAttribute',
license => 'perl',
- requires => { 'Moose' => '0.57',
+ requires => { 'Moose' => '0.73_01',
'MooseX::AttributeHelpers' => '0.13',
},
build_requires => { 'Scalar::Util' => '0',
Modified: MooseX-ClassAttribute/trunk/Changes
===================================================================
--- MooseX-ClassAttribute/trunk/Changes 2009-04-04 20:45:13 UTC (rev 7890)
+++ MooseX-ClassAttribute/trunk/Changes 2009-04-05 21:57:43 UTC (rev 7891)
@@ -1,3 +1,11 @@
+0.08
+
+- Make this work with Moose 0.73_01+.
+
+- Deprecated compute_all_applicable_class_attributes. Use
+ get_all_class_attributes instead.
+
+
0.07 2008-11-10
- Fixed a bug where class attributes did not honor the
Modified: MooseX-ClassAttribute/trunk/lib/MooseX/ClassAttribute/Meta/Method/Accessor.pm
===================================================================
--- MooseX-ClassAttribute/trunk/lib/MooseX/ClassAttribute/Meta/Method/Accessor.pm 2009-04-04 20:45:13 UTC (rev 7890)
+++ MooseX-ClassAttribute/trunk/lib/MooseX/ClassAttribute/Meta/Method/Accessor.pm 2009-04-05 21:57:43 UTC (rev 7891)
@@ -8,7 +8,7 @@
extends 'Moose::Meta::Method::Accessor';
-sub generate_predicate_method_inline
+sub _generate_predicate_method_inline
{
my $attr = (shift)->associated_attribute;
@@ -22,7 +22,7 @@
return $code;
}
-sub generate_clearer_method_inline
+sub _generate_clearer_method_inline
{
my $attr = (shift)->associated_attribute;
my $meta_instance = $attr->associated_class->instance_metaclass;
Modified: MooseX-ClassAttribute/trunk/lib/MooseX/ClassAttribute/Role/Meta/Class.pm
===================================================================
--- MooseX-ClassAttribute/trunk/lib/MooseX/ClassAttribute/Role/Meta/Class.pm 2009-04-04 20:45:13 UTC (rev 7890)
+++ MooseX-ClassAttribute/trunk/lib/MooseX/ClassAttribute/Role/Meta/Class.pm 2009-04-05 21:57:43 UTC (rev 7891)
@@ -141,11 +141,6 @@
sub get_all_class_attributes
{
- shift->compute_all_applicable_class_attributes(@_);
-}
-
-sub compute_all_applicable_class_attributes
-{
my $self = shift;
my %attrs =
@@ -159,6 +154,14 @@
return values %attrs;
}
+sub compute_all_applicable_class_attributes
+{
+ warn 'The compute_all_applicable_class_attributes method has been deprecated.'
+ . " Use get_all_class_attributes instead.\n";
+
+ shift->compute_all_applicable_class_attributes(@_);
+}
+
sub find_class_attribute_by_name
{
my $self = shift;
@@ -292,9 +295,7 @@
=head2 $meta->get_all_class_attributes()
-=head2 $meta->compute_all_applicable_class_attributes()
-
-These methods return a list of attribute objects for the class and all
+This method returns a list of attribute objects for the class and all
its parent classes.
=head2 $meta->find_class_attribute_by_name($name)
Modified: MooseX-ClassAttribute/trunk/lib/MooseX/ClassAttribute.pm
===================================================================
--- MooseX-ClassAttribute/trunk/lib/MooseX/ClassAttribute.pm 2009-04-04 20:45:13 UTC (rev 7890)
+++ MooseX-ClassAttribute/trunk/lib/MooseX/ClassAttribute.pm 2009-04-05 21:57:43 UTC (rev 7891)
@@ -6,7 +6,7 @@
our $VERSION = '0.07';
our $AUTHORITY = 'cpan:DROLSKY';
-use Moose ();
+use Moose 0.73_01 ();
use Moose::Exporter;
use MooseX::ClassAttribute::Role::Meta::Class;
Modified: MooseX-ClassAttribute/trunk/t/pod-coverage.t
===================================================================
--- MooseX-ClassAttribute/trunk/t/pod-coverage.t 2009-04-04 20:45:13 UTC (rev 7890)
+++ MooseX-ClassAttribute/trunk/t/pod-coverage.t 2009-04-05 21:57:43 UTC (rev 7891)
@@ -17,6 +17,7 @@
my %trustme =
( 'MooseX::ClassAttribute' => [ 'init_meta', 'class_has' ],
+ 'MooseX::ClassAttribute::Role::Meta::Class' => [ 'compute_all_applicable_class_attributes' ],
'MooseX::ClassAttribute::Meta::Method::Accessor' => [ '.+' ]
);
More information about the Moose-commits
mailing list