Gurusamy Sarathy's Fix of the Perl Problem I Encountered

Joel Meulenberg joelmeulenberg at yahoo.com
Sun Feb 13 18:15:37 CST 2000


At our last meeting I mentioned how the problem I'd encountered regarding lexical var's being erroneously cleared out by Perl before entering a continue block of code had been fixed.  (As you may remember I sent a message to the list asking "Anyone Know Why Perl Does This?".)  I also mentioned that Gurusamy Sarathy (formerly of the Ann Arbor Perl Mongers) managed to fix the problem I'd encountered while leaving another known bug intact.  During the meeting I couldn't remember the example given.  Some of you seemed interested, so I've included it below (at the bottom).  This was forwarded to me by Jeff Klein, who actually reported the bug I'd encountered to perlbug.

Now that I think about, this is a small example of open source "parallelized debugging" in action.  One of the concepts Eric S. Raymond has emphasized in his papers like "The Cathedral and the Bazaar" is that "debugging is parallelizable" and open source projects benefit because of it.  Another one of ESR's comments I recall is that often the person who finds a bug isn't able to fix it themselves, but that doesn't matter as long as they can route the problem to someone who can.  In this particular case, I ran into the bug and asked my local Perl associates about it (in early January).  One member of the local group, Jeff Klein, researched the problem (looking at the Perl source code, etc.) and determined that it merited the attention of perlbug.  Jeff sent a message to perlbug in mid-January.  By January 23rd, the bug had been fixed in the development version of Perl.

Truth be told, I was going to send it to perlbug but was hoping I might first be able to find the bug in the Perl source code and propose a fix.  Well, after reviewing some information on Perl internals and wading through the source, it's clear this would have been very challenging for me.  In the past I've sent patches to the authors of modules like SQL::Statement, IO::Tty, DBD::Oracle, and Graph, but this bug in Perl itself would have required much more learning before I could have been confident in making a suggestion.  I guess the point of all this is that one doesn't have to be able to fix the bug in order to help an open source project.  In fact, in this case, my attempt to grok and fix the bug just slowed down the process.

Thanks again for your help Jeff.

Change 4848 by gsar at auger on 2000/01/23 06:43:51

        fix scope cleanup when next jumps to a continue block; this is rather
        in the nature of a kludge; it doesn't fix the longstanding bug that
        makes C<while (!$x++) { local $x = 7 } continue { print $x }> print "7"
        instead of "1")



---------------------------------
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/archives/grand-rapids-pm-list/attachments/20000213/e688b1b0/attachment.htm


More information about the grand-rapids-pm-list mailing list