Or, am I missing something?package myParent; our @ISA; sub new { my $class = shift; bless $self,$class; $self->_init(@_); return $self; } sub _init { my $self = shift; print "_initParent (@_)\n"; } #---------------------------------- package myChild; our @ISA; use base qw(myParent); # This function is completely unnecessary #sub new { # my $class = shift; # my $self = $class->SUPER::new; # $self->_init(@_); # return $self; #} sub _init { my $self = shift; print "_initChild (@_)\n"; }
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
In reply to Re: maintaining constructor inheritance cascade
by dragonchild
in thread maintaining constructor inheritance cascade
by jaa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |