Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: runtime problem; elusive error

by almut (Canon)
on Sep 20, 2007 at 15:22 UTC ( [id://640157]=note: print w/replies, xml ) Need Help??


in reply to Re: runtime problem; elusive error
in thread runtime problem; elusive error

my crude solution is to use string eval ...

What also seems to work is

Readonly my $_debug_ops => $DBG_RAND+0 | $DBG_KEYS+0 | $DBG_INFO+0;

but I'm not sure if it's the "+0 = force numeric" aspect or the associated pre-evaluation of the variables that's making this work...  (of course, this workaround isn't very satisfying either).

Anyhow, it's probably best to just stay away from using Readonly... (I had also already been bitten by other subtle weirdnesses).

Replies are listed 'Best First'.
Re^3: runtime problem; elusive error
by perl-diddler (Chaplain) on Sep 20, 2007 at 16:57 UTC
    Slightly cleaner (though admittedly, it doesn't quite "hit the spot" for satisfaction) is just or'ing with 0 as the first thing: "$debug_ops = 0 | $DBG_RAND | $DBG_KEYS | $DBG_INFO; That does the same thing (I think) as your +0 in this situation. Not sure how it gets the other value...weird!

    Thanks!
    Linda

Log In?
Username:
Password:

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

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

    No recent polls found