Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^5: regex transforms of object attributes

by Roy Johnson (Monsignor)
on Jun 19, 2004 at 11:24 UTC ( [id://368151]=note: print w/replies, xml ) Need Help??


in reply to Re^4: regex transforms of object attributes
in thread regex transforms of object attributes

But honestly: if it's settable and gettable, what are the chances that it's not going to be a simple variable?

And a minute after posting that, I encountered this node, that answered my question one way: it's possible that a value needs to be encoded to be stored, and decoded to be retrieved. So there I have it. On the other hand, if you use a tied variable, you can do your encoding and decoding transparently and not break encapsulation...


We're not really tightening our belts, it just feels that way because we're getting fatter.
  • Comment on Re^5: regex transforms of object attributes

Replies are listed 'Best First'.
Re^6: regex transforms of object attributes
by herveus (Prior) on Jun 21, 2004 at 22:21 UTC
    Howdy!

    ...when it gets reimplemented as a value stored in a database somewhere, or stored remotely, such that you access it via SOAP or HTTP or carrier pigeon...or as a value in a hash or array somewhere. But you don't have a need to know...

    A procedural interface, whether a get and set pair, or a polymorphic accesser/mutator, provides a way to obtain and change the value while keeping your actions decoupled from the specific storage mechanism.

    yours,
    Michael
      It doesn't matter how it's stored. If the interface is set-a-scalar, get-a-scalar, you can do it with a tied scalar. See my meditation on the subject.

      We're not really tightening our belts, it just feels that way because we're getting fatter.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-24 13:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found