On Fri, Oct 14, 2011 at 1:23 PM, Peter Gordon <[email protected]>wrote:

> In Moose terms, can it be coerced.
>

Ah...

The best way IMHO would be to have a class that consumes a role, and to
coerce from an object if it consumes that role.

{
    package Role::Promotable;
    use Moose::Role;
}

Then coerce if ClassX's object is "->does('Role::Promotable')"
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to