in reply to Re: Moose 'clone' Constructor
in thread Moose 'clone' Constructor
G'day Corion,
++ Thanks for that. MooseX::Clone looks interesting. Its abstract does say "Fine-grained cloning support", and it looks like there could be a fair bit of work setting this up. Perhaps useful in situations where specific custom cloning was wanted. I also note a TODO section: I tend to be a bit wary of those as it suggests incomplete functionality — might wait for that to become TODONE. :-)
With a bit of link-hopping from there, I came across "Class::MOP::Class - Object instance construction and cloning". The clone_object() method appears less fine-grained (than MooseX::Clone) and perhaps more useful as a general solution.
Both of those have example code for setting up a clone() method in your own class.
As I said in the OP, not an immediate requirement but I'll keep both of those in mind. Thanks again.
— Ken
|
|---|