Re: coercing method arguments in MooseX::Declare
[email protected] (Buddy Burden)
| Newsgroups | perl.moose |
|---|---|
| Message-ID | <CAL0mxoQGqZy-u94sXtULh4_c9i7oCP0Pn8sEW2Pk86cTovAhVg@mail.gmail.com> |
shtil,
Sorry; I just noticed that you hadn't gotten a response to this yet:
> # How to specify coerce =>1 here ?
> method add_target (Target $target! ) {
>
>
> }
Try:
method add_target (Target $target does coerce) {
}
The default signature processing for MXD is
MooseX::Method::Signatures, so that's where you need to look for the
answer to this question in the POD.
(As the author of Method::Signatures::Modifiers, I feel compelled to
point out this is one place where MXMS has us beat, although we are
planning to add this feature in the future.)
-- Buddy