Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

inheritance turns back and bites (for real this time)

by dada (Chaplain)
on Mar 02, 2004 at 15:53 UTC ( #333287=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    @_ > 2 && return $_[0]->SUPER::add(@_[1..$#_]);
    
  2. or download this
    sub add {
        # check if the Big Boss is calling us...
    ...
        die "not a number" unless $value =~ /^\d+$/;
        $$self += $value;
    }
    
  3. or download this
    add($duration)
    
  4. or download this
    add(duration => $duration)
    
  5. or download this
    return $self->SUPER::add(duration=>$duration);
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2016-02-11 06:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (361 votes), past polls