Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Refactoring Perl 3 - Inline Temp

by ikegami (Patriarch)
on Jul 17, 2007 at 20:18 UTC ( [id://627117]=note: print w/replies, xml ) Need Help??


in reply to Refactoring Perl #3 - Inline Temp

While Perl lacks the means to turn a once dynamic variable into a read-only (does anyone know of one?)

For SVs, Scalar::Readonly. It's basically identical to Readonly::XS (whose interface is private and undocumented). It would be nice if it was part of Scalar::Util which currently has a function to check the read-only flag (readonly), but none to set it.

I don't see anything on CPAN to make AVs or HVs read-only. It could be that Perl doesn't support read-only AVs and HVs. I'll have to check that when I get home. (Readonly fakes it by tieing magic unto variables.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-03-29 13:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found