SPUG: Choosing an object's method at runtime
Sanford Morton
smorton at pobox.com
Tue May 23 19:31:52 CDT 2000
I'm feeling particularly dense today. I want to choose an object's
method at run time:
$object = new Some_Class;
$method = 'stop';
But then
$object->$method;
gets a syntax error, whereas
$object->$method();
seems not to.
Does anyone know which man page covers this? I'm clueless. I need more
sleep. --Sandy
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
For Subscriptions, Email to majordomo at pm.org: ACTION spug-list EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address
More information about the spug-list
mailing list