This will however not show up inherited methods. Which can be the desired behaviour in certain cases of course.
use strict; use warnings; if (exists &FOOBAZ::bar) { print "bar exists in foo\n"; } if (FOOBAZ->can("bar")) { print "FOOBAZ can do bar\n"; } package FOO; sub bar { } package FOOBAZ; use base("FOO");
In reply to Re^2: How to tell methods exist in a package
by tirwhan
in thread How to tell methods exist in a package
by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |