Help for this page

Select Code to Download


  1. or download this
    my $method = "build_a_kite";
    if ($obj->can($method)) {
    ...
    else {
        print "We can't...";
    }
    
  2. or download this
    $obj->can( METHOD ), CLASS->can( METHOD ), can( VAL, METHOD )
    
    ...
    name which has a method called METHOD, can returns a reference to
    the subroutine. If VAL is not a blessed reference, or if it does
    not have a method METHOD, undef is returned.