return join(', ', ref $self, $what);
};
- @test_list = method { 1 }, sub { 2 }, method () { 3 }, sub { 4 };
+ method main () { return "main"; };
+
+ #@test_list = method { 1 }, sub { 2 }, method () { 3 }, sub { 4 };
}
is($o->foo('yay'), 'DeclareTest: Foo: yay', 'method with argument ok');
+is($o->main, 'main', 'declaration of package named method ok');
+
$o->upgrade;
isa_ok($o, 'DeclareTest2');