The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
use strict;
use warnings;
use Test::More;
use Test::Fatal;

{
    package Foo;
    use Moose;
    use MooseX::Method::Signatures;

    method foo ($bar) { $bar }
}

my $o = Foo->new;
is(exception { $o->foo(42) }, undef);
like(exception { $o->foo(42, 23) }, qr/Validation failed/);

done_testing;