3 use warnings FATAL => 'all';
9 use Function::Parameters qw(:strict);
11 method new($class:) { bless {}, $class }
14 method m2(:$bar = undef) { }
18 method m5( $bar = undef ) { }
24 is(exception { $foo->m1(bar => undef) }, undef, 'Explicitly pass undef to positional required arg');
25 is(exception { $foo->m2(bar => undef) }, undef, 'Explicitly pass undef to positional explicit optional arg');
26 is(exception { $foo->m3(bar => undef) }, undef, 'Explicitly pass undef to positional implicit optional arg');
28 is(exception { $foo->m4(undef) }, undef, 'Explicitly pass undef to required arg');
29 is(exception { $foo->m5(undef) }, undef, 'Explicitly pass undef to explicit required arg');
30 is(exception { $foo->m6(undef) }, undef, 'Explicitly pass undef to implicit required arg');