From: Florian Ragwitz Date: Wed, 8 Apr 2009 21:29:57 +0000 (+0200) Subject: Make the accessor meta method class compatible with recent Moose. X-Git-Tag: 0.00801~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6466899733a6bf4d306f31293d91fc475e64f218;p=gitmo%2FMooseX-Emulate-Class-Accessor-Fast.git Make the accessor meta method class compatible with recent Moose. --- diff --git a/lib/MooseX/Emulate/Class/Accessor/Fast/Meta/Accessor.pm b/lib/MooseX/Emulate/Class/Accessor/Fast/Meta/Accessor.pm index 6e478a3..aa9dd7b 100644 --- a/lib/MooseX/Emulate/Class/Accessor/Fast/Meta/Accessor.pm +++ b/lib/MooseX/Emulate/Class/Accessor/Fast/Meta/Accessor.pm @@ -4,7 +4,7 @@ use Moose; extends 'Moose::Meta::Method::Accessor'; -sub generate_accessor_method { +sub _generate_accessor_method { my $attr = (shift)->associated_attribute; return sub { my $self = shift; @@ -14,7 +14,7 @@ sub generate_accessor_method { }; } -sub generate_writer_method { +sub _generate_writer_method { my $attr = (shift)->associated_attribute; return sub { my $self = shift; @@ -24,7 +24,7 @@ sub generate_writer_method { } # FIXME - this is shite, but it does work... -sub generate_accessor_method_inline { +sub _generate_accessor_method_inline { my $attr = (shift)->associated_attribute; my $attr_name = $attr->name; my $meta_instance = $attr->associated_class->instance_metaclass; @@ -42,7 +42,7 @@ sub generate_accessor_method_inline { { my $meta = __PACKAGE__->meta; - $meta->add_method(generate_writer_method_inline => $meta->get_method('generate_accessor_method_inline')); + $meta->add_method(_generate_writer_method_inline => $meta->get_method('_generate_accessor_method_inline')); } no Moose;