I know you're nervous about someone
untieing a
tied scalar, but I couldn't help but at least look into CPAN to see what I could turn up anyway.
Tie::Scalar::RestrictUpdates is the first thing I found. Look at the POD, and you'll see that when you tie it, you tell the class how many times you'll allow that scalar to be updated or changed. After that number is reached (could even be 1 if you want), the scalar can no longer be modified.
You're worried that someone would untie it, but realistically there isn't much someone couldn't do if he/she wanted. Someone could even completely rewrite your code, or abandon it altogether because of inflexibility. You can't really stop a developer from having his way with your code, if he has access to it. You may contrive an elaborate means of preventing a variable from being changed by a developer, but you can't lock him out of your code entirely, while at the same time giving him access to your code.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.