Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Inheritance- Sub class instance variables

by creamygoodness (Curate)
on Aug 27, 2009 at 15:36 UTC ( #791686=note: print w/ replies, xml ) Need Help??

in reply to Inheritance- Sub class instance variables

package DeviceEventHandler; use base qw( EventHandler ); sub new { my $self = shift->SUPER::new(@_); $self->{DeviceReset} = undef; return $self; }

You have to worry about parent and child classes stomping on each other's instance vars, but that's the basic idiom for hash-based objects.

Comment on Re: Inheritance- Sub class instance variables
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2015-11-25 23:33 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (693 votes), past polls