You can use defined:
perl -wMstrict -E 'sub blah{}; say defined &blah' 1 perl -wMstrict -E 'say defined &blah'
Or, in another package:
perl -wMstrict -E 'package X;{sub blah{}} say defined &X::blah' 1
In reply to Re: How to determine if a sub is defined in a package, without calling it?
by stevieb
in thread How to determine if a sub is defined in a package, without calling it?
by lamber45
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |