Correction: any "non-coderef value is stringified" , even undef is stringified to an empty string. ( It's just tricky to create a sub for an empty symbol. :)
DB<199> $obj = bless {},"tmp" DB<200> $tmp::{''} = sub { say "empty" } DB<201> $meth = undef DB<202> $obj->$meth empty DB<203>
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re^8: How can I call a Perl sub with an object from a sub name stored in a var?
by LanX
in thread How can I call a Perl sub with an object from a sub name stored in a var?
by misterperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |