Ovid publiustemp-londonpm at
Thu Jan 18 15:50:26 GMT 2007

--- David Cantrell <david at> wrote:

> On Thu, Jan 18, 2007 at 05:56:42AM -0800, chromatic wrote:
> > From 1994 to 2004, the object orientation documentation (especially
> of the 
> > UNIVERSAL base class) had, at best, a passing familiarity with OO
> concepts 
> > such as Liskov substitutability
> What dat in plain English?

A derived class should not change the parent's class interface.  That
doesn't mean it can't change the behavior, but if you expect
$parent->foo to return an arrayref of integers, $child->foo better do
it, too.

In other words, you should be able to replace an class or instance with
a more specific version and have things *just work*.



Buy the book --
Perl and CGI --

More information about the mailing list