[Pdx-pm] standard for copy constructors in Moose?

Paul Liebert paull at peak.org
Wed Apr 27 06:19:49 PDT 2011


On Tue, 2011-04-26 at 21:10 -0400, Hans Dieter Pearcey wrote:
> http://search.cpan.org/~nuffin/MooseX-Clone-0.05/lib/MooseX/Clone.pm

This is what I was looking for.  I knew I wanted it implemented as a
Role, but using traits to tag attributes is an elegance that I would not
have figured out on my own.

> Cloning is a tricky subject.  Your copy method assumes that running the
> constructor again is the right thing to do, but this isn't necessarily true;
> RAII is one obvious case where it may be wrong.

Thanks.  This was helpful as well.

-Paul




More information about the Pdx-pm-list mailing list