Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (17 sloc) 426 Bytes
use strict;
use warnings;
use Test::More;
use Test::Exception;
{
package Foo;
use Moose;
use MooseX::MultiMethods;
use MooseX::Types::Moose 'Int';
multi method bar (Int $baz, Int $quux) { }
multi method bar (Int $baz, Int $quux?) { }
}
my $foo = Foo->new;
throws_ok(sub {
$foo->bar(42, 23);
}, qr/^Ambiguous match for multi method bar: \(Int \$baz, Int \$quux.* with value /);
done_testing;
Jump to Line
Something went wrong with that request. Please try again.