my $subobj = $obj->clone_into('Class::SubClass'); # ... sub clone_into { my ($self, $subclass) = @_; return $subclass->new(%$self); }