Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^4: prevent stringification for hash-keys

by 1nickt (Canon)
on Feb 17, 2019 at 12:37 UTC ( [id://1230033]=note: print w/replies, xml ) Need Help??

in reply to Re^3: prevent stringification for hash-keys
in thread prevent stringification for hash-keys

"What I really want is a way to make $hash{bare_word} a compile-time error in a lexical scope..."

The way forward always starts with a minimal test.
  • Comment on Re^4: prevent stringification for hash-keys

Replies are listed 'Best First'.
Re^5: prevent stringification for hash-keys
by soonix (Canon) on Feb 17, 2019 at 23:57 UTC
    Terminology is a bitch. While it's true that interpreting a bareword as string, which occurs at complile time, is not called stringification, I think it is clear that OP wants $hash{blahblah} treated differently from $hash{'blahblah'} … only the former should be a syntax terror, something like use stricter; .-)

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-22 23:25 GMT
Find Nodes?
    Voting Booth?

    No recent polls found