in reply to Recreating an object from its own method
For this reason, and as a matter of clarity, I think I would actually prefer my $agent = $agent->previous if you really need to create a new object.
I do however wonder if in this case it would not be more efficient and clearer if you could just update the state of the object without creating a new one...
-- Joost downtime n. The period during which a system is error-free and immune from user input.
|
|---|