Perl Monk, Perl Meditation | |
PerlMonks |
Inheritance- Sub class instance variablesby snra_perl (Acolyte) |
on Aug 27, 2009 at 15:32 UTC ( [id://791683]=perlquestion: print w/replies, xml ) | Need Help?? |
snra_perl has asked for the wisdom of the Perl Monks concerning the following question:
Hello PerlMonks, I have a quick question on inheritance. Here is the my super class. I have a sub class DeviceEventHandler which inherits the above EventHandler module. I create object using DeviceEventHandler ->new() which will call the super class method. Now my question is how do i add some sub class specific attributes say "DeviceReset" in DeviceEventHandler and instantiate it during object creation. For that purpose I need to define a "new" method in DeviceEventHandler module which will in turn call the "new" method of the super class. Please help me out on this.. Thanks.
Back to
Seekers of Perl Wisdom
|
|