Perl Monk, Perl Meditation | |
PerlMonks |
Re: Re: Class::InsideOut - yet another riff on inside out objects.by John M. Dlugosz (Monsignor) |
on Dec 19, 2002 at 19:52 UTC ( [id://221227]=note: print w/replies, xml ) | Need Help?? |
Hmm, I think we are getting away from the real issue. Finding a way to hook up lexicals with attributes is not the real point, though interesting in itself. The real point is to make a succinct way to declare instance data. So, don't use an attributed declaration. Instead, use a syntax like: field ('name', options); that will create the underlying hash itself, rather than the caller making one. The underlying hash can either be "hands off", or there can be a way to get to it (return value from that call?) if you really want to support it.
Being private, no access method is autogenerated, and the returned ref is the only way to get to it. —John
In Section
Meditations
|
|