in reply to Inherit only few methods from a parent class
Repeat for each method you don't want to inherit.package ChildClass; use ParentClass; our @ISA = qw[ChildClass]; sub risky_method1 {die "You're not allowed to call this"} sub risky_method2 {die "You're not allowed to call this either"}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Inherit only few methods from a parent class
by Anonymous Monk on Jul 13, 2009 at 15:37 UTC | |
by Arunbear (Prior) on Jul 13, 2009 at 16:01 UTC | |
by JavaFan (Canon) on Jul 13, 2009 at 15:47 UTC | |
by Anonymous Monk on Jul 13, 2009 at 15:50 UTC | |
|
Re^2: Inherit only few methods from a parent class
by afoken (Chancellor) on Jul 14, 2009 at 18:52 UTC | |
by JavaFan (Canon) on Jul 14, 2009 at 21:12 UTC | |
by afoken (Chancellor) on Jul 14, 2009 at 21:48 UTC |