X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F102_InsideOutClass_test.t;h=242d161252c0394e484f424650b2135fa1849cb5;hb=643f2f94ab780ca0c247cd36a88b13cc51d5c0fc;hp=b8c5d62372b5b0e5d7979836ba238de0d3f93fe6;hpb=88dd563c8b2edea359b8500535b8b46a8bbe6340;p=gitmo%2FClass-MOP.git diff --git a/t/102_InsideOutClass_test.t b/t/102_InsideOutClass_test.t index b8c5d62..242d161 100644 --- a/t/102_InsideOutClass_test.t +++ b/t/102_InsideOutClass_test.t @@ -1,15 +1,12 @@ -#!/usr/bin/perl - use strict; use warnings; -use Test::More tests => 89; +use Test::More tests => 88; use File::Spec; use Scalar::Util 'reftype'; -BEGIN { - use_ok('Class::MOP'); - require_ok(File::Spec->catdir('examples', 'InsideOutClass.pod')); +BEGIN {use Class::MOP; + require_ok(File::Spec->catfile('examples', 'InsideOutClass.pod')); } { @@ -19,8 +16,8 @@ BEGIN { use warnings; use metaclass ( - ':attribute_metaclass' => 'InsideOutClass::Attribute', - ':instance_metaclass' => 'InsideOutClass::Instance' + 'attribute_metaclass' => 'InsideOutClass::Attribute', + 'instance_metaclass' => 'InsideOutClass::Instance' ); Foo->meta->add_attribute('foo' => ( @@ -40,6 +37,10 @@ BEGIN { } package Bar; + use metaclass ( + 'attribute_metaclass' => 'InsideOutClass::Attribute', + 'instance_metaclass' => 'InsideOutClass::Instance' + ); use strict; use warnings; @@ -56,8 +57,8 @@ BEGIN { use strict; use warnings; use metaclass ( - ':attribute_metaclass' => 'InsideOutClass::Attribute', - ':instance_metaclass' => 'InsideOutClass::Instance' + 'attribute_metaclass' => 'InsideOutClass::Attribute', + 'instance_metaclass' => 'InsideOutClass::Instance' ); Baz->meta->add_attribute('bling' => ( @@ -66,6 +67,10 @@ BEGIN { )); package Bar::Baz; + use metaclass ( + 'attribute_metaclass' => 'InsideOutClass::Attribute', + 'instance_metaclass' => 'InsideOutClass::Instance' + ); use strict; use warnings; @@ -214,4 +219,4 @@ is($baz->bling(), 'Baz::bling', '... Bar::Baz::bling has been initialized'); is(scalar(keys(%{'Bar::Baz::bar'})), 0, '... got the right number of entries for Bar::Baz::bar'); is(scalar(keys(%{'Bar::Baz::baz'})), 0, '... got the right number of entries for Bar::Baz::baz'); is(scalar(keys(%{'Bar::Baz::bling'})), 0, '... got the right number of entries for Bar::Baz::bling'); -} \ No newline at end of file +}