in reply to coderef to an object method
You might also try just using method names instead of coderefs. To me, this is part of the beauty of object syntax.
%callback = ( data => 'gotdata', connect => 'connected', # ... ); $method = $callback{$whichone}; $object->$method;
Update: I realized this approach probably has no place with the module you're using.
|
|---|