Hi,
I wonder if coercion works on method arguments when using MooseX::Declare?
I tried and could not make it work, maybe I expect too much.
use MooseX::Declare;
class Foo {
use Moose::Util::TypeConstraints;
subtype Target as 'Object' => where {
$_->can('update')
};
coerce Target => from 'Str' => via {
$_->new_with_options;
};
};
# How to specify coerce =>1 here ?
method add_target (Target $target! ) {
}
}
