Problems? Is your data what you think it is? | |
PerlMonks |
Re^3: can sub check context for lvalue vs rvalue context?by BrowserUk (Patriarch) |
on May 09, 2018 at 11:23 UTC ( [id://1214271]=note: print w/replies, xml ) | Need Help?? |
Well, its easy to demonstrate there is only one call made. So what now? I think the easiest way to think of it, is that the function returns an lvalue to the calling context; and has no say or knowledge of how that lvalue is used there. And in reality, that is exactly what happens:
Think of a function returning a reference. It does not know and cannot influence whether that reference will be used to read the referent value, or assign a new value to it. This is analogous; thus even if you knew what the context was, it would not benefit you to know. (Also why :lvalue never made it off the 'experimental' list.) With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice.
Suck that fhit
In Section
Seekers of Perl Wisdom
|
|