|Think about Loose Coupling|
Re: purpose of Super keywordby pajout (Curate)
|on Feb 10, 2010 at 22:20 UTC||Need Help??|
Consider following example:
Running test.pl will return:
When parent method (Animal::new in the example) does something important (it sets 'need_oxygen' for all animals), you can call it WITHOUT explicit hardcoding of the parent class, as was already noticed.
For instance, in Animal::Dog::Husky->some_method body, you can call some inherited method and you do not care if that method is written in Animal or in Animal::Dog class.