Subject: | Bails with undef->name when user does the retard thing with traits=>[qw( Clone )] |
As described on #moose, http://scsys.co.uk:8001/34056
Can't call method "name" on an undefined value at
/usr/lib64/perl5/vendor_perl/5.10.1/MooseX/Clone/Meta/Attribute/Trait/Clone.pm
line 83.
Although this should be carping with a message telling me I'm stupid,
the code at this line is at follows:
} else {
croak "Cannot recursively clone a retarded object $value (" .
overload::StrVal($value) . ") in " . $args{attr}->name . ". Try
something better.";
}
However, %args is in fact empty in this case, so it resorts to
undef->name, and bails with a useless error instead of a less useless error.