in reply to inside-out class and "our @ISA"
The important difference here between using base and manipulating @INC directly is that base attempts to load the named module. If you don't already use Person; elsewhere in your code, you have to do so within the Employee package if you manipulate @INC yourself. That's one reason I prefer to use base myself.
You do have to make a SUPER call within your destructor; Perl's default behavior for method overriding is override only, not override and redispatch.
(One nit is that your use of ref allows non-blessed references. To be stricter, you can use blessed() from Scalar::Util.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: inside-out class and "our @ISA"
by j1n3l0 (Friar) on Aug 02, 2007 at 17:17 UTC |