AUTOLOAD
Ovid
publiustemp-londonpm at yahoo.com
Thu Jan 18 15:50:26 GMT 2007
--- David Cantrell <david at cantrell.org.uk> 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*.
Cheers,
Ovid
--
Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/
More information about the london.pm
mailing list