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

Re^2: Import constants as scalar instead of bareword sub

by itub (Priest)
on Nov 02, 2005 at 20:50 UTC ( [id://505093]=note: print w/replies, xml ) Need Help??


in reply to Re: Import constants as scalar instead of bareword sub
in thread Import constants as scalar instead of bareword sub

Another option is the Readonly module, available on CPAN. I've never tried it, but some people recommend it.
  • Comment on Re^2: Import constants as scalar instead of bareword sub

Replies are listed 'Best First'.
Re^3: Import constants as scalar instead of bareword sub
by powerman (Friar) on Nov 02, 2005 at 21:29 UTC
    I've read about it in Perl Best Practices book and I've tried it. It looks very promising (especially with Readonly::XS helper module).

    But Devel::DProf show it's still use tie()ed scalar (and so call FETCH() on each scalar access) even with Readonly::XS installed.

    This was sadly news, because I feel like with Readonly::XS it should just 'mark' SV as read-only and doesn't tie() it. :-(

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-25 12:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found