X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fsugar.t;h=a582e4b671e57fbe8c1d02bd99ddb7f3f3cbfea9;hb=bedac9ff8870c034dd2b63701dca091153b41391;hp=0f1b685f43c08e5444b3e6547a999f9113ba85ac;hpb=9673d7ca1ec235aab1cb6beea90e02166bb9b322;p=p5sagit%2FDevel-Declare.git diff --git a/t/sugar.t b/t/sugar.t index 0f1b685..a582e4b 100644 --- a/t/sugar.t +++ b/t/sugar.t @@ -58,6 +58,8 @@ my ($test_method1, $test_method2, @test_list); return join(', ', ref $self, $what); }; + method main () { return "main"; }; + #@test_list = method { 1 }, sub { 2 }, method () { 3 }, sub { 4 }; } @@ -72,6 +74,8 @@ is($o->{attr}, 'value', '@_ args ok'); 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');