This Week on perl5-porters - 4-10 December 2006

This Week on perl5-porters - 4-10 December 2006

"This comment in mg.c scares me: /* Not sure why the av can get freed ahead of its sv, but somehow it does */" -- Marc Lehmann, uncovering ancient evil.

Topics of Interest

madly duplicated files

Dave Mitchell performed some stellar file refactoring to bring Misc Attribute Decoration under control. As a result, the only extra file is a two-liner madly.c file.

  preprocessor does the rest

How to create a new Config setting?

Steve Hay wanted to add a new Config variable to indicate that perl was simply capable of emulating a fork. This would eliminate the need for some exceptionally hairy boolean logic that no-one gets right, and thus is subject to error.

He knew how to create new entries in the win32 config files, but wasn't sure how to move on from there. H.Merijn Brand explained that the process was semi-automated, although he had spent time improving it recently so that less manual work was required.

Craig Berry noted that it would be nice to set this up for VMS as well, since that platform lacks Unix-style fork semantics, but he was happy to punt with an undef for the time being.

Undo VOS breakage caused by change #28892

There is an array of data that the regular expression engine uses, but if debugging is enabled, the core needs to know about it as well. And since a debugging build is the exception, and we don't want to bloat the core for no reason, the array is hosted either the extension or the core, depending on whether -DDEBUGGING is defined.

Paul Green discovered that a recent patch from Yves Orton failed to build on Stratus VOS, because the linker ended up failing to link the array to anything in a debugging build. Yves explained it all very well, so hopefully Paul will be able to concoct something that satisfies the VOS linker.

Latest Perl in Cygwin is 5.8.7

Adriano Ferreira wondered why the latest available Perl for Cygwin was not 5.8.8. (hint: the current maintainer stepped down and asked for volunteers to take over. Does this sound familiar?)

Slaven Rezic said that he had succeeded in building some of the trickier modules such as Tk, and so he and H.Merijn Brand swapped notes.

In other Cygwin news, Jan Dubois tweaked Makefile.PL to get it to compile Win32.xs.

Do we care about old dmakes for building perl on Win32?

Following on from Steve Hay's desire to drop old make support on Win32, David Landgren asked whether it would be possible for an explanatory error message to be issued if an old dmake was pressed into service, to give the luckless programmer a pointer to the documentation that tells them what to do.

Steve tweaked the Makefile and therefore showed that it was possible, except that the message doesn't explain what to do to fix the problem.

fields pragma in blead prohibits reblessing

Andreas König noticed that one can no longer bless a fields object into another package (noticed by the fact that a CPAN module, Danga::Socket, now fails its test suite).

Dan Kogai, the module in question's author offered a workaround to repair the breakage, but remained puzzled as to why the error (Modification of a read-only value) was occurring.

Deadlock in ext/threads/shared/t/cond.t on bleadperl

Jan Dubois saw regular deadlocks in a threads test on Win32, and wondered if it was related to the hangs that Steve Hay sees in his test smokes. Steve Hay in turn thought that this particular problem started showing up around the time threads 1.53 was released.

Jerry D. Hedden thought that the problem is probably quite deep and has only come to light now that multi-CPU boxes are more common, and thus are really testing the threads implementation instead of just pretending. If fact, he figured out how the test was failing, but didn't know how to track down the culprit that would explain why.

Regexp test coverage teaser

Nicholas had a long conversation with himself after looking at Sébastien Aperghis-Tramoni's coverage reports and noticing that only the UTF-8 variant of a section of code in the regexp engine was visited by the test suite.

He wanted to find a non-UTF-8 pattern to shed light on the other side of the path. He managed to find one, but felt that the fact that it used re 'eval' was cheating a bit. He then thought of a better way, but tripped over a bug in a study'ed variable.

Yves Orton said he'd take a look at things when he had some time.

Patches of Interest

User pragmas now accessible from B

Joshua ben Jore taught the B modules how to deal with user pragmas. Steve Hay and Yves Orton taught the patch to play nicely on Windows, and Rafaël Garcia-Suarez fixed up the tests. gets confused by slices

Bo Lindbergh produced a patch to stop getting confused between package and lexical variables when slices are involved. Nicholas Clark chided him for copying code, so Bo came back with a fully-refactored improvement that Rafaël applied.

  New! Improved!

New and old bugs from RT

Perl coredumps on nested s///e (#40274)

Appears fixed in blead, probably when the regular expression engine went re-entrant.

perlio forgets buffering settings on EAGAIN (#41043)

Marc Lehmann tracked down a problem concerning buffering in PerlIO.

bignum returns NaN when raising integer value to negative power (#41050)

E. Culver noted that if bignum is in force, 10 ** -1 returns Nan (instead of 0.1).

  brand new mathematics

perldoc: deal with 2nd etc. arguments (#41054)

Sean M. Burke asked if anyone wanted to take over the maintenance of perldoc, since he no longer had the time to devote the attention it requires. Which is in fact not a whole lot.

  Apply within

Nested closures drop outer lexical scope (#41057)

Marcus Holland-Moritz noted that a bug, as reported by Aaron D.Ball, is FIB.

  Fixed In Blead

make rebuilds perl every time (#41058)

Marc Lehmann noted that gcc 4.1.2 20061115 (prerelease) (Debian 4.1.1-20) would rebuild perl every time make was run. Neither Andy Dougherty nor Rafaël were able to reproduce the problem.

  works for me, alas

weak references cause corruption, crashes etc. (#41061)

Marc also noted that any time he tried to use weak references in any non-trivial program, it would crash in any number of different and entertaining ways. Try as he might he was not able to produce a small test case, but offered some suggestions as to where to look.

  sort of like

perl segfaults when map arguments get freed (#41062)

Marc filed a third report concerning map that I was happy to report as FIBbed.

Perl5 Bug Summary

A stasis, of sorts. Still stuck at 1501 open tickets.

New Core Modules

In Brief

Time::HiRes is happy again. One has to tread lightly on XS code that is still able to run on 5.004.

A truly satisfactory approach to install missing Compress/IO/{Base,Zlib} has not been found, but the current solution is good enough.

  something special

Robin Barker explained precisely why integer exponentiation may return a floating point result.

Adriano Ferreira had a problem with @{%hash}{@idx}, since %hash is now evaluated in scalar context for a slice. The construct was always iffy at best, now it is an error.

  less deviance

Yitzchak Scott-Thoennes ensured that -DDEBUGGING=both sets -g, because it would be a pity if it didn't.

Jim Cromie took a stab at refactoring dump.c to remove some cut-and-paste code and asked for some XS mavens to make sure he hadn't made any drastic mistakes.


Yves supplied a few more tweaks to make it easier to create regexp engine plug-ins, which were applied, with a few tweaks.

Jerry D. Hedden realised that Perl_save_destructor is not a mathom, since it is required by Opcode. Rafael unmathomised it.

  Back from the cemetary

Jan Dubois moved some files around between win32/ext/Win32 and ext/Win32, which made sense, but had some surprising cascade effects.

Andy Lester forwarded a message containing information about the Klocwork analysis of Perl, but Jonathan Rockway pointed out that a password is needed to pass the gate.

  Let me in

John E. Malmberg issued an extensive followup to Craig A. Berry's remakes on the patch to provide VMS xterm support for the debugger.

Ilya Zakharevich delivered the missing link for building perl on OS/2.

About this summary

This summary was written by David Landgren. Sorry about being later than usual. Too many end of year parties, and I'd sooner drink wine and scoff oysters than write summaries.

Weekly summaries are published on and posted on a mailing list, (subscription: The archive is at Corrections and comments are welcome.

If you found this summary useful, please consider contributing to the Perl Foundation to help support the development of Perl.