develooper Front page | perl.module-authors | Postings from October 2003

Class::FakeAttributes -- Opinions Wanted

Thread Next
From:
Smylers
Date:
October 31, 2003 01:54
Subject:
Class::FakeAttributes -- Opinions Wanted
Message ID:
slrnbq39eq.onv.Smylers@stripey.com
Yesterday I was subclassing Wx::StaticBoxSizer (for reasons that don't
matter here) and found that, because it's based on a scalar ref rather
than the more-usual hash ref, I couldn't store more data inside the
objects.  So I wrote Class::FakeAttributes to work round this and
pretend to myself that I'm storing data in each object.

I've uploaded it to Cpan as somewhere to put it for discussion:

  http://search.cpan.org/perldoc?Class::FakeAttributes

In particular: is this useful enough to merit a module?  Is the concept
stupid?  Is this behaviour already available in another module that I
didn't spot?  Are there any obvious problems or memory leaks?

And, of course, the name: is it appropriate?  Can you think of anything
that better encapsulates that 'oh I want to inherit from one of _those_
but it isn't hash-based' feeling?

Thanks for your thoughts on this.

Smylers


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About