Stories
Slash Boxes
Comments
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.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • SAX uses both 2 and 3. It uses 2 for drivers and filters, and 3 for simple handlers.

    The reason this was so is totally deliberate: the most common case in SAX is a handler. With that approach, you only need to provide a (possibly fake) constructor and define those handlers you need. That could have been achieved using approach 2, but that might have gotten in the way of filter chains.

    As for other examples of the same pattern, many GUIs and MVC approaches use it. I've seen it on many an occasion. I've even seen people use it in EcmaScript...

    --

    -- Robin Berjon [berjon.com]