X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F106_LazyClass_test.t;h=866cbe1dcbe3c80003cde3209d565d2d2a13c4bf;hb=5caf45ce90def730e4c3743050c7354a78ed9800;hp=4b639649353ab49550a41bd65c1613e6dbd5332e;hpb=4300f56aa63b9e0201ce6d541ee03ac5b6d4ee75;p=gitmo%2FClass-MOP.git diff --git a/t/106_LazyClass_test.t b/t/106_LazyClass_test.t index 4b63964..866cbe1 100644 --- a/t/106_LazyClass_test.t +++ b/t/106_LazyClass_test.t @@ -3,26 +3,25 @@ use strict; use warnings; -use Test::More no_plan => 29; +use Test::More tests => 26; use File::Spec; BEGIN { use_ok('Class::MOP'); - require_ok(File::Spec->catdir('examples', 'LazyClass.pod')); + require_ok(File::Spec->catfile('examples', 'LazyClass.pod')); } { package BinaryTree; - sub meta { - LazyClass->initialize($_[0] => ( - ':attribute_metaclass' => 'LazyClass::Attribute' - )); - } + use metaclass ( + 'attribute_metaclass' => 'LazyClass::Attribute', + 'instance_metaclass' => 'LazyClass::Instance', + ); BinaryTree->meta->add_attribute('$:node' => ( accessor => 'node', - init_arg => ':node' + init_arg => 'node' )); BinaryTree->meta->add_attribute('$:left' => ( @@ -41,7 +40,7 @@ BEGIN { } } -my $root = BinaryTree->new(':node' => 0); +my $root = BinaryTree->new('node' => 0); isa_ok($root, 'BinaryTree'); ok(exists($root->{'$:node'}), '... node attribute has been initialized yet');