start page | rating of books | rating of authors | reviews | copyrights

Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: 8.163 UNIVERSAL Chapter 8
Standard Modules
Next: Reference: isa
 

can

$

sub

 = $

obj


->can(


method


)

Checks if object $obj has a method method . If so, returns a reference to the subroutine, otherwise returns undef . Can be called as either a static or object method call, or as a subroutine:

$ref = UNIVERSAL::can(
val
, 
method
)
Returns a reference to the subroutine if val is a blessed reference with a method method , and undef if val is not blessed or does not have method .


Previous: 8.163 UNIVERSAL Perl in a Nutshell Next: Reference: isa
8.163 UNIVERSAL Book Index Reference: isa

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.