Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • What's really broken is that people think you need to inherit everything. In your example, it looks like you have a cart that should have things, not inherit things. I know this lame example shows up in a lot of Java books, but it's the wrong use for inheritance. They usually pull this stuff out to explain decorators, too, which is a pattern that is almost never needed for the example given.

    There's no reason that any of those things should have an Is-A relationship. You need a cart that contains other disti