http://www.perlmonks.org?node_id=221237


in reply to Re: Re: Class::InsideOut - yet another riff on inside out objects.
in thread Class::InsideOut - yet another riff on inside out objects.

Well, the point is twofold:
  1. Most importantly, we need a way for a generic DESTROY to work.
  2. Ideally we wouldn't have to name the the field more than once and only once.
The attribute semantics seem to offer the most succint possible syntax to reach both of those goals - provided it can at all be made to work, of course.

Makeshifts last the longest.

  • Comment on Re^3: Class::InsideOut - yet another riff on inside out objects.

Replies are listed 'Best First'.
Re: Re^3: Class::InsideOut - yet another riff on inside out objects.
by John M. Dlugosz (Monsignor) on Dec 20, 2002 at 00:33 UTC
    The generic destroy would work fine, since the class would remember all the fields it generated using this syntax just as well as it could using any other syntax.

    I agree that this still names the field twice (public name optional, internal ref optional) when most of the time you'd be happy to use the same name in both places.