Re: Inline/gtk2-perl problem solved / patch to

goran kirra net writes:

Not localizing $_ is an easy mistake to make 
since it is always in main:: as opposed to all
normal variables used inside a package.
And the problems didn't surface until we started 
to do pretty extreme things with Inline::C

Well - we're not going to launch a perl rage war are we? :) -
localizing $_ appears to me a *very* bad idea in all
circumstances, because $_ is so widely used everywhere. If you
set $_ in any subroutine, if you later call this subroutine from
a foreach, a map, anything, you'll be bitten hard. And this one
will be very tough to track down, especially when in a module
like Inline :).
Hopefully it will be fixed in 0.45, 'til then
we have the patch. 

I narrowed the offending lines down by using a
private copy of Inline and good old printf-debugging.
Debuggers are for whimps :-)

Congratulations. This one was really not a piece of cake!

Guillaume Cottenceau -

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]