+use strict;
+use warnings;
use Devel::Declare;
BEGIN {
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 };
}
-use Test::More 'no_plan';
+use Test::More 0.88;
my $o = DeclareTest->new(attr => "value");
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');
is($o->$test_method2('this'), 'DeclareTest2, this', 'anon method with proto ok');
#warn map { $_->() } @test_list;
+
+done_testing;