use Function::Parameters qw(:strict);;
-
-ok eval q{ my $a = [ fun () {}, 1 ]; 1 }, 'anonymous function in list is okay'
+{
+ my $a;
+ ok eval q{ $a = [ fun () {}, 1 ]; 1 }, 'anonymous function in list is okay'
or diag "eval error: $@";
+ is ref $a->[0], "CODE";
+ is $a->[1], 1;
+}
-ok eval q{ my $a = [ method () {}, 1 ]; 1 }, 'anonymous method in list is okay'
+{
+ my $a;
+ ok eval q{ $a = [ method () {}, 1 ]; 1 }, 'anonymous method in list is okay'
or diag "eval error: $@";
-
+ is ref $a->[0], "CODE";
+ is $a->[1], 1;
+}
done_testing;