2009-09-29

about exporter bug

finally exporter with multiple inheritance bug is explained: class::accessor::fast version 0.34 now does some import magic, and in that case export's import sub is not called. so it's neither perl, nor exporter related.

but still, using multiple inheritance cannot be avoided sometimes...

2 comments:

  1. These are /exactly/ the kind of hard to find bugs that lead people to recommend against multiple inheritance. Yet you state MI cannot be avoided. Can you provide a compelling example? I know I'd be interested, and I have a hunch Ovid would too.

    Oh, and to address your series of posts: two modules that both have interfaces requiring you to inherit from them is not exactly compelling, at least not to me. It seems more like a bad interaction between two bad APIs.

    ReplyDelete
  2. @garey: well, just pick any 2 cpan modules which api request you to inherit from them. in my case, that was class::accessor::fast and exporter.

    i know that some modules provide me with the same features (eg moose and sub::exporter), but that's missing the point: existing codebase cannot be migrated at once to the new shiny module, and i guess some modules requesting you to inherit don't have a sane replacement.

    ReplyDelete