in reply to Re^3: How to tell methods exist in a package
in thread How to tell methods exist in a package
No, but this does:
$val="FOO"; $method="${val}::mySub"; if (exists &$method) {...}
Also,
if ($val->can("mySub")) { ... }
works (with the aforementiond behavioural differences of course).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to tell methods exist in a package
by jeanluca (Deacon) on Nov 21, 2005 at 19:35 UTC |