[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: Class::Fields, a base/fields.pm rewrite



On Wed, 29 Dec 1999 15:47:33 EST, Michael G Schwern wrote:
>I've been messing around with %FIELDS and pseudo-hashes alot lately,
>written a few classes using them pretty deeply (see Class::Accessor
>and Class::DBI), and I've found the existing fields.pm and base.pm to
>be somewhat inadequate to the task.
>
>I found myself having to do direct manipulation of %FIELDS and
>%fields::attr to get anything done.

Can you describe the inadequecies you ran into in more detail?
(I want to understand the issues better before we make any changes.)

>                                     It all got very incestuous, and I
>had to hard-code grave assumptions about the internals of Perl's
>fields mechanism.  Since the existing %FIELDS mechanism and
>pseudo-hashes is, umm, a less than perfect mechanism it seems sensible
>that it should be walled off and encapsulated to allow the internals
>to be rewired relatively easily when Perl's OO mechanisms eventually
>mature.  So I rewrote them and expanded their functionality.
>
>Class::Fields (available at a CPAN near you) is the result.

Did you know fields.pm was originally called Class/Fields.pm?
I find that rather funny. :-)


Sarathy
gsar@ActiveState.com


[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]