my $Foo = Class::MOP::Class->initialize('Foo');
-ok(!$Foo->has_method('pie'), '... got the method stub pie');
-ok(!$Foo->has_method('cake'), '... got the constant method stub cake');
+ok($Foo->has_method('pie'), '... got the method stub pie');
+ok($Foo->has_method('cake'), '... got the constant method stub cake');
my $foo = sub { 'Foo::foo' };
is_deeply(
[ sort $Foo->get_method_list ],
- [ qw(FOO_CONSTANT alias_me baaz bang bar baz blah evaled_foo floob foo) ],
+ [ qw(FOO_CONSTANT alias_me baaz bang bar baz blah cake evaled_foo floob foo pie) ],
'... got the right method list for Foo');
is_deeply(
bar
baz
blah
+ cake
evaled_foo
floob
foo
+ pie
)
],
'... got the right list of applicable methods for Foo');
is_deeply(
[ sort $Foo->get_method_list ],
- [ qw(FOO_CONSTANT alias_me baaz bang bar baz blah evaled_foo floob) ],
+ [ qw(FOO_CONSTANT alias_me baaz bang bar baz blah cake evaled_foo floob pie) ],
'... got the right method list for Foo');
(map { $Foo->get_method($_) } qw(
baz
blah
+ cake
evaled_foo
floob
)),
$Bar->get_method('foo'),
$Bar->get_method('meta'),
+ $Foo->get_method('pie'),
],
'... got the right list of applicable methods for Bar');