[Melbourne-pm] Invalid use of Exporter as a parent of a class

Bradley Dean bjdean at bjdean.id.au
Fri Nov 30 23:11:06 PST 2012

On Thu, Nov 29, 2012 at 03:58:03PM +1100, Mathew Robertson wrote:
>    On 29 November 2012 14:07, Scott Penrose <[1]scottp at dd.com.au> wrote:
>    > Not sure who the "we" is who often create modules like CGI.
>    Personally I think that CGI is in error, and that modules that should
>    blur the lines between OO and imperative use are few and far between.
>    But otherwise this is a workable alternative.
>      s/we/I/g - sorry
>      I just mean if you have a simple module like 'use JSON' it is valid
>      to have it be both. Alternatives would be to have a base module,
>      then one with exporter and one with OO, seems overkill.
>      Scott

So I find myself remembering about all those useful modules that do work in
both modes - so in retrospect I find myself not so against the idea in
cases where there is a clear benefit.

On the other hand - this conversation I was having was based on a class
being written as a common ancestor class (ie across all classes in a
system) which both inherited from Exporter and defined an AUTOLOAD which is
very much not ok in my book. :)



Bradley Dean
Email: bjdean at bjdean.id.au Skype: skype at bjdean.id.au
Mobile(Aus): +61-413014395 WWW: http://bjdean.id.au/

More information about the Melbourne-pm mailing list