Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^5: ref == "REF"

by Ven'Tatsu (Deacon)
on Oct 19, 2004 at 15:46 UTC ( [id://400566]=note: print w/replies, xml ) Need Help??


in reply to Re^4: ref == "REF"
in thread ref == "REF"

LVALUE is used internally for the 'magic' used with substr, vec, pos, keys, etc. when you use them as lvalues in an assignment. It holds (in addition to typical scalar data) a pointer to the Sv* that it can modify and what part to modify.
PerlGuts Illustrated has a lot of information on how Sv*'s are layed out. In reguards to your original question is shows that SvRV (a struture that holds only a reference to another Sv*) is smaller than SvPV, SvPVIV, and SvPVNV, which are the 3 that I'm guessing are considered 'SCALAR' by ref. So 'REF' might indicate that the underlying structure is to small to hold a full scalar value, and would need to be upgraded to a SvPV of better to hold a non reference value. I don't know that any of that information would be of any use to Perl code, and perl handles all that on the C level so 'REF' may be only informative, or entirely redundant, depending on your viewpoint. (but as others have noted ref is less than totaly useful it self as it stands now)
Disclaimer: I've only recently started looking at the internals of perl, I could be totaly off mark on any of this.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-03-19 04:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found