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.
  • I think I'd only want the Lite/Simple ones to be modules that provide simplified interfaces. There are other uses for subclasses (e.g. Email::Thread [] [which, in an ironic twist, doesn't subclass a ::Simple, but subclasses another module to let that other module use Email::Simple).

    WWW::Mechanize is another great example of subclass, though I do, at times, wonder if it should in fact be delegating.
      ---ict / Spoon
  • I just wanted to add, that we shouldn't discriminate against different ways of code reuse. Perl's TMTOWTDI way of handling objects often makes delegation a much better way to "inherit" functionality, because you don't need to know about the innards of your super class (and you don't care if they change.)