my $cp = Class::Prototyped->new(); my $mirror = $cp->reflect(); $mirror->addSlots( field1 => 'foo', sub1 => sub { print "this is sub1 printing field1: '".$_[0]->field1."'\n"; }, ); $mirror->deleteSlot('sub1'); #### # Create an object of Some::Class my $obj = Some::Class->new(); $obj->foo(); # where foo() is a method of Some::Class # Create the new "class" by assigning @ISA and a method in the new namespace @Some::Class::Extended::ISA = qw/Some::Class/; *Some::Class::Extended::bar = sub { my $self = shift; print "Hello, Bar" }; # Rebless the object to the new class bless $obj, 'Some::Class::Extended'; $obj->foo; # From Some::Class $obj->bar; # From Some::Class::Extended