From: Matt S Trout Date: Thu, 3 May 2012 19:28:51 +0000 (+0000) Subject: demonstrate MooX:: implementation X-Git-Tag: v0.091002~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=632a53e0ffbcbdee341fa997e24b76ed54de2534;p=gitmo%2FMoo.git demonstrate MooX:: implementation --- diff --git a/t/accessor-generator-extension.t b/t/accessor-generator-extension.t index 3164bf6..e0b5070 100644 --- a/t/accessor-generator-extension.t +++ b/t/accessor-generator-extension.t @@ -42,19 +42,21 @@ BEGIN { } sub default_construction_string { '[]' } + + sub MooX::ArrayRef::import { + Moo::Role->apply_roles_to_object( + Moo->_accessor_maker_for(scalar caller), + 'Method::Generate::Accessor::Role::ArrayRefInstance' + ); + } + $INC{"MooX/ArrayRef.pm"} = 1; } { package ArrayTest1; use Moo; - - BEGIN { - Moo::Role->apply_roles_to_object( - Moo->_accessor_maker_for(__PACKAGE__), - 'Method::Generate::Accessor::Role::ArrayRefInstance' - ) - } + use MooX::ArrayRef; has one => (is => 'ro'); has two => (is => 'ro');