Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 learning in the Monastery: (2)
As of 2025-11-14 03:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (70 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.