[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Use of uninitialized value?



>Is it just me, or is this the most frustrating warning to debug?

It's just you, Matt. I have no problems with the MacPerl editor and stuff 
because I keep all line numbers and the hex 
multiplication/division/remainder tables in my head. Aren't you a geek, 
too?

Okay, okay, I don't keep line numbers in my head. But my wife thinks I 
philosophize too much, does that count? 

>Especially when it can't even tell me what thing is uninitialized.  And
>the line number is only an approximation.  Or when it tells me that

I happen to own Codewarrior, so I do my editing there, copy the whole 
thing to the MacPerl edit window, and syntax check or whatever. Haven't 
yet graduated to Alpha or BBEdit. So far, I haven't really found the line 
numbers to be off. I mean, when I'm using an uninitialized in a 
conditional or such things it often gives me the line the conditional 
starts on, that sort of thing. I've never met a compiler writer who could 
predict where my thinking is going to go bad, so it doesn't bother me 
when the compiler can only tell me where it lost track.

><INFILE> is uninitialized (but I know the file open was successful).

Anyway, check your file handles with things like

if ( defined( $line = <INFILE> ) ) 

to get rid of this one. Vaguely reminiscent of C. Took me a while to 
figure out how to appease the warning generator without dumping every 
other line into the bit bucket.

>Oh well, I just wanted to vent.

Yeah, that also happens in the real world.

Joel Rees
----------------------------------------
                       Keeping the Faith
<joel_rees@sannet.ne.jp>
<http://www.page.sannet.ne.jp/joel_rees>
(free account:) <reiisi@nettaxi.com>
<http://www.nettaxi.com/citizens/reiisi>
----------------------------------------


# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org