Tag Archives: inheritance

Perl: Inheritance Seems Broken (Because It Requires an Instance)

I want to demonstrate how in Perl, when one class inherits from another, methods from the parent class are inherited as long as the derived class is being called in an object oriented manner. So here is some code for the parent class: package Animal; use warnings; use strict; sub new { my ($class) =@_; [...]
Posted in Software Development | Also tagged , | Leave a comment