Showing posts with label OO. Show all posts
Showing posts with label OO. Show all posts

Wednesday, November 12, 2014

Perl - Inheritance

Here's how to do inheritance in Perl:























This uses the Moose object system which is should probably be used for all large Perl applications. Compare this against the Javascript version.

See this post on how to unit test the classes.

Javascript - Inheritance

Below is a diagram that summarizes how inheritance is implemented in Javascript:













This came from the Udacity course on OO Javascript by the way. Compare this against the Perl version of inheritance.

See this post on how to unit test the classes above.