No such thing as a small change | |
PerlMonks |
Re^3: How do I pretend a reference isn't a referenceby BrowserUk (Patriarch) |
on Nov 06, 2008 at 11:16 UTC ( [id://721955]=note: print w/replies, xml ) | Need Help?? |
Um. The problem is that your map is returning the return value from tie, instead of the tied variable. If you change the map so:
That problem goes away also. (I made a similar error myself earlier:) Provided that your _(...) sub does the right thing, your users need never be aware that they are dealing with anything other than simple scalars. So, trade your (one-time, up-front) care (and a little getting up to speed with the ins and outs of tie), as you develop your solution, for ongoing and continuous care by all your programmers? Your choice, but I know which way I would go :) Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|