-
Call-stack information. Use
caller()
to find out who's calling this subroutine:
($package, $file, $line) = caller();
-
List of a package's global variables. For a package
Foo
,
%Foo::
contains the symbol table, whose keys are names of global identifiers in that package and whose values are typeglobs.
-
Find out what a reference contains.
ref($r)
returns
undef
if
$r
is an ordinary scalar, "SCALAR" if it is a reference to a scalar (similarly "ARRAY," "HASH," "CODE," and "REF") or the name of a package, if
$r
is a blessed object reference.
-
Object information:
$obj->isa("Foo"); # returns true if $obj inherits from Foo
$obj->can("bar"); # returns true if it supports method "foo"
|
|