From: Dave Rolsky Date: Thu, 20 Sep 2007 23:15:40 +0000 (+0000) Subject: This is a trivial change to make this class more easily X-Git-Tag: 0_26~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=51308c236d778e93c8e2074ec344eed89acab9ac;p=gitmo%2FMoose.git This is a trivial change to make this class more easily subclassable. The aliasing means that subclasses need to reimplement the methods created by the alias, because they end up referring to the code reference of the method in this class, as opposed to calling it by name. --- diff --git a/lib/Moose/Meta/Method/Accessor.pm b/lib/Moose/Meta/Method/Accessor.pm index 7e05ba5..a6547de 100644 --- a/lib/Moose/Meta/Method/Accessor.pm +++ b/lib/Moose/Meta/Method/Accessor.pm @@ -102,9 +102,9 @@ sub generate_reader_method_inline { return $sub; } -*generate_reader_method = \&generate_reader_method_inline; -*generate_writer_method = \&generate_writer_method_inline; -*generate_accessor_method = \&generate_accessor_method_inline; +sub generate_reader_method { shift->generate_reader_method_inline(@_) } +sub generate_writer_method { shift->generate_writer_method_inline(@_) } +sub generate_accessor_method { shift->generate_accessor_method_inline(@_) } sub _inline_pre_body { '' } sub _inline_post_body { '' } @@ -288,4 +288,4 @@ L This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. -=cut \ No newline at end of file +=cut