in reply to on the fly methods

The class's object method can call an instance's _codemethod:

package Foo; sub makemethod { my $obj = shift; $obj->{'_codemethod'} = shift; # takes a real code reference # in this implementation, # not a string, so renamed } sub callmethod { my $obj = shift; $obj->{'_codemethod'}(@_); } # . . .
Don't need no stinkin' Ruby ;-)

After Compline,
Zaxo