in reply to on the fly methods
The class's object method can call an instance's _codemethod:
Don't need no stinkin' Ruby ;-)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'}(@_); } # . . .
After Compline,
Zaxo
|
|---|