X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F022_attribute_duplication.t;h=b3246586a375a397fa147ff66c1c672e0030aca4;hb=e0e4674a7071c8b072752ac5d4e450f778cb8766;hp=f23d4a11b46be6e40ae9417ad8f5337236040b87;hpb=b1897d4d804dc11f86868052ecb6997a04821df3;p=gitmo%2FClass-MOP.git diff --git a/t/022_attribute_duplication.t b/t/022_attribute_duplication.t index f23d4a1..b324658 100644 --- a/t/022_attribute_duplication.t +++ b/t/022_attribute_duplication.t @@ -3,6 +3,8 @@ use strict; use warnings; +use Scalar::Util; + use Test::More tests => 17; BEGIN { @@ -34,7 +36,7 @@ one first. ::is($bar_attr->reader, 'get_bar', '... the bar attribute has the reader get_bar'); ::is($bar_attr->writer, 'set_bar', '... the bar attribute has the writer set_bar'); - ::is($bar_attr->associated_class, Foo->meta, '... and the bar attribute is associated with Foo->meta'); + ::is($bar_attr->associated_class, Foo->meta, '... and the bar attribute is associated with Foo->meta'); Foo->meta->add_attribute('bar' => reader => 'assign_bar' @@ -45,7 +47,7 @@ one first. ::can_ok('Foo', 'assign_bar'); ::ok(Foo->meta->has_attribute('bar'), '... Foo still has the attribute bar'); - my $bar_attr2 = Foo->meta->get_attribute('bar'); + my $bar_attr2 = Foo->meta->get_attribute('bar'); ::isnt($bar_attr, $bar_attr2, '... this is a new bar attribute'); ::isnt($bar_attr->associated_class, Foo->meta, '... and the old bar attribute is no longer associated with Foo->meta');