Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: To Validate Data In Lvalue Subs

by blokhead (Monsignor)
on Sep 03, 2003 at 01:06 UTC ( #288514=note: print w/replies, xml ) Need Help??

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.


Replies are listed 'Best First'.
Re: Re: To Validate Data In Lvalue Subs
by Zaxo (Archbishop) on Sep 03, 2003 at 01: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,

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://288514]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2019-11-12 13:28 GMT
Find Nodes?
    Voting Booth?
    Strict and warnings: which comes first?

    Results (66 votes). Check out past polls.