KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
What is the correct way to call the base constructor from the class constructor in Perl ? I have seen syntax like this: my $class = shift; my $a = shift; my $b = shift; my $self = $class->SUPER::new($a, $b); return $self; Is this correct ? What if we have several parent classes. For example a class like this: package Gamma; use base Alpha; use base Beta; sub new { # Call base constructors... } 1;
Tags (comma-separated)
Save Edits
Cancel