Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^10: Shouldn't references be readonly? (updated)

by ikegami (Patriarch)
on Aug 09, 2020 at 21:19 UTC ( #11120529=note: print w/replies, xml ) Need Help??

in reply to Re^9: Shouldn't references be readonly? (updated)
in thread Shouldn't LITERAL references be readonly? (updated)

Put differently, you want to prevent transformation of references, but using a completely ineffective tool to achieve it. Making references read-only doesn't prevent transformation.

Preventing transformation (stringification, numification, but not booleanification) of references might be a good idea.


  • Intentional uses of $ref+0 would have to be replaced by refaddr($ref).
  • Intentional uses of "$ref" would have to be replaced.
  • Programs that mostly function will start dying instead.


  • Catch some bad code (But what code wouldn't already be obviously wrong?)

Replies are listed 'Best First'.
Re^11: Shouldn't references be readonly? (updated)
by Corion (Patriarch) on Aug 10, 2020 at 06:08 UTC

    See also stringification, which allows you to say:

    no stringification;

    and forbids

    "$ref" # stringify $ref . "foo" # concat lc $ref lcfirst $ref uc $ref ucfirst $ref quotemeta $ref


      There are only dev releases of the module. If this is something you (the reader) is interested in, perhaps you could contact the author to encourage a proper release or assist with it.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2023-06-06 22:41 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (29 votes). Check out past polls.