UNIVERSAL(3p) Perl Programmers Reference Guide UNIVERSAL(3p)
UNIVERSAL(3p) Perl Programmers Reference Guide UNIVERSAL(3p) # UNIVERSAL(3p) Perl Programmers Reference Guide UNIVERSAL(3p) NNAAMMEE # UNIVERSAL - base class for ALL classes (blessed references) SSYYNNOOPPSSIISS # $is_io = $fd->isa("IO::Handle"); $is_io = Class->isa("IO::Handle"); $does_log = $obj->DOES("Logger"); $does_log = Class->DOES("Logger"); $sub = $obj->can("print"); $sub = Class->can("print"); $sub = eval { $ref->can("fandango") }; $ver = $obj->VERSION; # but never do this! $is_io = UNIVERSAL::isa($fd, "IO::Handle"); $sub = UNIVERSAL::can($obj, "print"); DDEESSCCRRIIPPTTIIOONN # "UNIVERSAL" is the base class from which all blessed references inherit. ...