Mailing List Archive

Gotcha
I wouldn't call this a perl bug per se, but I was bitten nonetheless. I
had a Curses bug:

Curses win = c_win ? c_sv2Curses(ST(0), 0) : stdscr;
char * str = sv_grow(ST(c_arg),SvIV(ST(c_arg+1))+1);
int n = (int)SvIV(ST(c_arg+1));
int ret = CI_OPT_MV_AND( wgetnstr(win, buf, n) );
^^^-------- should be "str"

This is the only instance of "buf" in the whole module, but didn't get
flagged as an undefined variable because it matched the global buf[]
declaration in "perl.h". Be careful when using those common variable
names. :-)


William