in reply to A function to check if subroutine exists?

The documentation for defined describes a direct way to do this.

If you are in an OO environment though, you probably care more about the method having been overridden between the child and you than having it actually in the base class. In that case you can do it with the can method, see AbstractClass for a working example.

  • Comment on Re: A function to check if subroutine exists?