Re: Inline/gtk2-perl problem solved / patch to Inline::denter.pm
- From: Guillaume Cottenceau <gc mandrakesoft com>
- To: goran kirra net
- Cc: gtk-perl-list gnome org
- Subject: Re: Inline/gtk2-perl problem solved / patch to Inline::denter.pm
- Date: 13 Nov 2002 17:36:27 +0100
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.
Nice!
FYI,
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 - http://people.mandrakesoft.com/~gc/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]