Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: prevent stringification for hash-keys

by tobyink (Canon)
on Feb 17, 2019 at 01:11 UTC ( [id://1230012]=note: print w/replies, xml ) Need Help??


in reply to prevent stringification for hash-keys

Replies are listed 'Best First'.
Re^2: prevent stringification for hash-keys
by 1nickt (Canon) on Feb 17, 2019 at 03:22 UTC

    Heheh yes tobyink I thought about that too, but the OP appears to want to forbid in code the use of a string as a hash key, whether quoted or not, and only allow using a declared variable. IIUC.


    The way forward always starts with a minimal test.
      No, he wants to avoid stringification of hash keys, especially of barewords.

        "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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-19 23:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found