[Bps-public-commit] r16720 - in Prophet/branches/init-and-clone: .

sartak at bestpractical.com sartak at bestpractical.com
Thu Nov 6 12:38:39 EST 2008


Author: sartak
Date: Thu Nov  6 12:38:39 2008
New Revision: 16720

Modified:
   Prophet/branches/init-and-clone/   (props changed)
   Prophet/branches/init-and-clone/Makefile.PL
   Prophet/branches/init-and-clone/lib/Prophet/Record.pm

Log:
 r75132 at onn:  sartak | 2008-11-06 12:38:32 -0500
 Use the more modern API for all methods in a class


Modified: Prophet/branches/init-and-clone/Makefile.PL
==============================================================================
--- Prophet/branches/init-and-clone/Makefile.PL	(original)
+++ Prophet/branches/init-and-clone/Makefile.PL	Thu Nov  6 12:38:39 2008
@@ -20,7 +20,7 @@
 requires('File::Find::Rule');
 requires('Proc::InvokeEditor');
 requires('Scalar::Defer' => '0.18');
-requires('Moose' => '0.54'); # Moose::Util::TypeConstraints Moose::Role
+requires('Moose' => '0.56'); # Moose::Util::TypeConstraints Moose::Role
 requires('MooseX::AttributeHelpers' => '0.12');
 requires('MooseX::ClassAttribute' => '0.04');
 requires('XML::Atom::SimpleFeed');

Modified: Prophet/branches/init-and-clone/lib/Prophet/Record.pm
==============================================================================
--- Prophet/branches/init-and-clone/lib/Prophet/Record.pm	(original)
+++ Prophet/branches/init-and-clone/lib/Prophet/Record.pm	Thu Nov  6 12:38:39 2008
@@ -504,13 +504,12 @@
     my $self   = shift;
     my $props  = shift;
 
-    my @methods = grep { $_->{name} =~ /^default_prop_/ } $self->meta->compute_all_applicable_methods;
+    my @methods = grep { $_->name =~ /^default_prop_/ } $self->meta->get_all_methods;
 
-    for my $method_data (@methods) {
-        my ($key) = $method_data->{name} =~ /^default_prop_(.+)$/;
-        my $sub   = $method_data->{code};
+    for my $method (@methods) {
+        my ($key) = $method->name =~ /^default_prop_(.+)$/;
 
-        $props->{$key} = $sub->( $self, props => $props)
+        $props->{$key} = $method->( $self, props => $props)
             if !defined($props->{$key});
     }
 



More information about the Bps-public-commit mailing list