Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
go ahead... be a heretic
 
PerlMonks  

Re: Yet Another Unitialized Value Question

by Zaxo (Archbishop)
on Sep 22, 2003 at 14:25 UTC ( [id://293220]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Yet Another Unitialized Value Question

You have a logic error.

To get to line 435, the object of unless must be true, i.e. ($lock, $updon) != (). $lock is therefore redefined everywhere between the unless block and the DONE: label. It may well be undef, if the database column contains nulls.

Update, corrected some confusion of mine.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: Yet Another Unitialized Value Question
by doorslam (Beadle) on Sep 22, 2003 at 14:49 UTC
    The column is a boolean flag with a not null constraint. I assume if fetchrow returns no rows, lock is undefined, but then I don't reference it again.

    If there is a row, then lock must be 0 or 1.
      Are you sure you have the right line?
      undef $lock; if ($lock) ...
      does not cause a warning for me (perl 5.8.0). It's not doing a numerical == comparison.

      Have you tried using the debugger?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://293220]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.