Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^4: can sub check context for lvalue vs rvalue context?

by perl-diddler (Chaplain)
on May 10, 2018 at 06:24 UTC ( [id://1214311]=note: print w/replies, xml ) Need Help??


in reply to Re^3: can sub check context for lvalue vs rvalue context?
in thread can sub check context for lvalue vs rvalue context?

I thought of that ... it was tempting, but being extra rigorous w/my stuff, I wanted the values inspected through direct inspection $p->{one} to be consistent with the ones done through the accessor $p->one.

FWIW, in my case, I don't need to check the value before the assignment, but immediately AFTER the assignment. For example -- wanted to be able to have a URL object where I break it down into proto,site[:port]/path, then, if I assign to $p->path, it would automatically be reflected in $p->url.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-18 20:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found