in reply to To Validate Data In Lvalue Subs

Am I being dense, or is this more or less what Juerd's Attribute::Property module does? You mention using these lvalue subs for OO but I see your example doesn't use method calls per se -- you seem to have your example lvalue subs fixed to a single tied object which seems impractical for everyday OO use. If your goal is to generalize this approach for lvalue method calls, is it different than Attribute::Property?

I'm really not trying to be difficult: I just want to make sure I'm not missing the point. ;) In any case, Juerd's and your goals seem to have a lot in common.

blokhead

Replies are listed 'Best First'.
Re: Re: To Validate Data In Lvalue Subs
by Zaxo (Archbishop) on Sep 03, 2003 at 05:47 UTC

    Thanks for the link, I had a look at Attribute::Property and it does indeed, deep down, also use a tied interface to validate data. The public interface is quite different, A::P being polished up to use attribute notation.

    My preferred direction for this is different. I like to keep the nuts and bolts within reach. I'd extend Constrained to a family of tied classes with different data structures and exception policies. Some sort of class factory to produce blessed coderefs with cloistered data from the body of the constructor seems likely.

    After Compline,
    Zaxo