in reply to Best Method of Object-Oriented Behavior Addition?
BEGIN { package X; sub A {} sub B {} } BEGIN { package Y; @ISA=qw(X); sub B {} } BEGIN { package Z; @ISA=qw(Y); sub A {} } my $object = ($opt{specialcase} ? 'Z' : 'Y')->new(@newargs);
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Best Method of Object-Oriented Behavior Addition?
by jplindstrom (Monsignor) on Sep 30, 2000 at 18:25 UTC |