- publishing free software manuals
Perl Language Reference Manual
by Larry Wall and others
Paperback (6"x9"), 724 pages
ISBN 9781906966027
RRP £29.95 ($39.95)

Sales of this book support The Perl Foundation! Get a printed copy>>>

16.6 Default UNIVERSAL methods

The UNIVERSAL package automatically contains the following methods that are inherited by all other classes:

isa returns true if its object is blessed into a subclass of CLASS
DOES returns true if its object claims to perform the role ROLE. By default, this is equivalent to isa.
can checks to see if its object has a method called METHOD, if it does then a reference to the sub is returned, if it does not then undef is returned.
VERSION returns the version number of the class (package). If the NEED argument is given then it will check that the current version (as defined by the $VERSION variable in the given package) not less than NEED; it will die if this is not the case. This method is called automatically by the VERSION form of use.
use Package 1.2 qw(some imported subs);
# implies:
ISBN 9781906966027Perl Language Reference ManualSee the print edition