in reply to Re^9: Introducing Class::InsideOut
in thread Introducing Class::InsideOut
If you want to inherit from a foreign class in this particular way (substituting the foreign object for the standard undefined scalar), reblessing must be expected.
Erm... it's perfectly possible to inherit from another class without reblessing. It's one of the major advantages of the inside-out approach. For example:
{ package MySubClass; use base qw( SomeHashBasedClass ); use Class::InsideOut qw(:std); sub new { my $class = shift; my $self = $class->SUPER::new( @_ ); return register( $self ); } };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: Introducing Class::InsideOut
by Anno (Deacon) on Feb 19, 2006 at 13:53 UTC | |
by adrianh (Chancellor) on Feb 19, 2006 at 14:51 UTC |