Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Using can With Inheritance

by btrott (Parson)
on Apr 18, 2000 at 22:07 UTC ( #7940=perltutorial: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        can(METHOD)
    
        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.
    
  2. or download this
        package A;
    
    ...
            my $self = shift;
            return $self->can("_write_file");
        }
    
  3. or download this
        package A::B;
        use A;
    ...
            my($path, $val, $start) = @_;
            # ...
        }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perltutorial [id://7940]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (12)
As of 2014-12-22 21:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (130 votes), past polls