8 if (eval { require MooseX::Method::Signatures }) {
11 plan skip_all => 'This test needs MooseX::Method::Signatures';
21 use MooseX::Method::Signatures;
22 use MooseX::AlwaysCoerce;
23 use Moose::Util::TypeConstraints;
26 subtype 'MyType', as 'Int';
27 coerce 'MyType', from 'Str', via { length $_ };
29 subtype 'Uncoerced', as 'Int';
32 method foo (MyType :$foo, Uncoerced :$bar) {
37 ok( (my $instance = MyClass->new), 'instance' );
40 local $TODO = 'need rafl to help with implementation';
43 is $instance->foo(foo => "text", bar => 42), '4 42';
44 } 'method called with coerced and uncoerced parameters';