3 use Test::More tests => 10;
5 use warnings FATAL => 'all';
8 use Function::Parameters {
16 is eval('use Function::Parameters { fun => { attrs => "nope" } }; 1'), undef;
17 like $@, qr/nope.*attributes/;
19 is eval('use Function::Parameters { fun => { attrs => ": in valid {" } }; 1'), undef;
20 like $@, qr/in valid.*attributes/;
22 elrond hobbard($ref) { $$ref }
25 hobbard(\$x) = 'bling';
36 fun join($group, $peer) {
37 return "* $peer has joined $group";
40 ::is eval('join("left", "right")'), undef;
41 ::like $@, qr/Ambiguous.*CORE::/;
48 return "* $peer has joined $self->{name}";
51 ::is join('!', 'left', 'right'), 'left!right';
53 my $obj = bless {name => 'kittens'};
54 ::is $obj->join("twig"), "* twig has joined kittens";