0

I have a Moose class named 'Child' which extends another class named 'Person'. Given a 'Person' instance I would like to create a Child instance.

How can I cast the existing 'Person' into a 'Child', without explicitly creating a new Child and passing each of the arguments from `Person'?

David B
  • 29,258
  • 50
  • 133
  • 186

1 Answers1

2

Class::MOP::Class::rebless_instance

daxim
  • 39,270
  • 4
  • 65
  • 132