Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Readonly oddity

by zwon (Abbot)
on Jan 26, 2016 at 23:38 UTC ( #1153714=note: print w/replies, xml ) Need Help??


in reply to Re: Readonly oddity
in thread Readonly oddity

I don't agree with this advice either. I personally don't like constant because it is not suitable for any complex structures and you can't interpolate those constants in strings. Neither I like Readonly because you have to type "Readonly", which is quite a lot and the capital 'R' makes it simply unbearable. So I use Const::Fast.

Replies are listed 'Best First'.
Re^3: Readonly oddity
by dmitri (Priest) on Jan 27, 2016 at 01:06 UTC
    > I personally don't like constant because it is not suitable for any complex structures

    For example?

      The documentation for constant explains this.

      "For example?"

      The NOTES section of that documentation has an example.

      — Ken

        You mean the array reference example? It only says that you can change the values, not that it's "not suitable." It's quite suitable, I use it all the time.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2020-05-31 07:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (173 votes). Check out past polls.

    Notices?