Special Classes
The special class UNIVERSAL contains methods that are automatically inherited by all other classes:
- can method
Returns a reference to the method if its invocant has it, undef otherwise.
- DOES role
Checks if the object or class performs the given role.
- isa class
Returns true if its invocant is class, or any class inheriting from class.
- VERSION [ need ]
Returns the version of its invocant. Checks the version if need is supplied.
These methods can be used as normal functions as well, e.g., UNIVERSAL::isa($c,Math::Complex::).
The pseudopackage CORE provides access to all Perl built-in functions, even when they have been overridden.
The pseudopackage SUPER provides access to base class methods without having to specify which class defined that method. This is meaningful only when used inside a method.