in reply to Inheritance - calling parent constructor
base does not prevent you from overriding the parent's constructor. Nor does it prevent you from doing something silly like blessing the object twice. Fix:or does the use base take care of this?
package Child; ... sub new { my ($class, $arg1, $arg2, $arg3) = @_; my $self = $class->SUPER::new($arg1, $arg2); $self->{arg3} => $arg3; return $self; } ...
Also - is there a difference between
Yes:
|
|---|