3 use warnings FATAL => 'all';
5 use Test::More 'no_plan';
13 use Function::Parameters qw(:strict);
19 is( Stuff->echo(42), 42 );
20 is_deeply( [attributes::get \&echo], ['method'] );
28 use Function::Parameters qw(:strict);
30 my $code = fun () : method {};
31 is_deeply( [attributes::get $code], ['method'] );
38 use Function::Parameters qw(:strict);
43 sub MODIFY_CODE_ATTRIBUTES {
44 my ($pkg, $code, @attrs) = @_;
50 method moo($foo, $bar) : Bar Baz(fubar) {
53 # Torture test for the attribute handling.
58 : Baz(fu{bar:): { return {} }
60 ::ok($cb_called, 'attribute handler got called');
61 ::is_deeply($attrs, [qw/Bar Moo(:Ko{oh) Baz(fu{bar:)/], '... with the right attributes');