good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^3: Function name in a variable, can't recall the concept (introspection with ->can )by LanX (Saint) |
on Apr 15, 2019 at 11:07 UTC ( [id://1232572]=note: print w/replies, xml ) | Need Help?? |
> No, you shouldn't. can performs a method lookup, not a sub lookup. ->can does a sub lookup if @ISA is empty, and the content of @ISA is introspectable too. And using a package for a module and a class is a pretty dubious concept.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|