This Week on perl5-porters - 11-17 December 2006

This Week on perl5-porters - 11-17 December 2006

Topics of Interest

Change 29504 breaks Win32 build

Some changes to the parser code (in perly.y) made by Dave Mitchell in an attempt to lock down BEGIN{ die }-type leaks broke things in Windows land. Many platforms appeared to be affected. The problem turned out to be some debugging code left in by accident.

Another oddity was that make distclean left a few object files behind, which didn't make sense (and did not occur on all platforms). Apparently the issue was sorted out because nothing more was heard on the subject.

umask handling in File::Temp

Peter Dintelmann noticed that _gettemp() in the File::Temp module can make needless umask system calls under a number of circumstances, and came up with a patch to take this into account.

Mike Guy commented that whether Peter's patch is applied or not, the code does not appear to be thread-safe. So Peter thought about it a bit more, and realised that umask does not have to be called at all, although he was not sure whether VMS would still need to.

And the problem of umask thread safety for creating both temporary directories and the _force_writable routine remains.

Should $thr->join() propagate exceptions to joiner?

Jerry D. Hedden asked if there was interest in adding a method to the threads module that would allow people to detect problems in the case of a thread dying unexpectedly. And the people who responded, agreed.

Named-capture regular expression syntax

Aaron Crane pointed out an inconsistency with the new named captures syntax for regular expressions (that is (?<name>target) looks for 'target' and stores the result by name, rather than number ($1, $2...).

And the inconsistency is that (?...) had always meant that whatever happened in the "..." part would not result in a capture but now that's no longer the case. He proposed a change in syntax, in that named captures use + following the parentheses, which has a mnemonic %+ ring to it, so the syntax would be (+<name>target).

Dominic Dunlop argued that Python and PCRE already use (? to introduce named captures, which means that Perl should do the same. When Aaron pointed out that Python and PCRE use different syntaxes to perform named captures, Dominic returned with a patch to make Perl recognise those syntactic variants as well.

In any event, while the reasoning that led Aaron to the above conclusion is valid, the syntax is not going to change.

  not this week, at least
6-on-5 and read only aliasing

Sockets leaking on rapid reconnect?

strange warnings behavior

op/fork.t fails on Win32 since #29543

---Seeking PerlIO refcounting guidance

Patches of Interest

Move Win32::* functions from win32/win32.c to ext/Win32/Win32.xs

Michael G. Schwern wanted to know if he could use something simple to deal with Windows in ExtUtils::MakeMaker. Jan Dubois explained why it wouldn't work, so Michael suggested using an AUTOLOAD technique instead, arguing that it would be less surprising for an unsuspecting user.

Having had his attention drawn to the code in question, Jan noticed that there was a flaw in the code, in that perl's internal stack could be relocated at some point, and made a fix to stop bad things taking place if it happened. He checked the rest of the codebase briefly, and thought that Storable might need similar treatment.

And finally, Jan tweaked ext/Win32/Win32.xs to get it to compile out of the box on cygwin.

Text mode wrongly set on pipe file descriptors

Ilya Zakharevich discovered an old patch he had lying around to sort out a PerlIO problem. Steve Peters applied it.

Fixes for the test suite on OS/2

Ilya also determined that many of the failures he had observed on OS/2 were in fact false positives, and delivered a patch to clear up all bar two failures. Rafaël Garcia-Suarez applied all except the changes to getppid.t, since that test file has changed too much in blead over the intervening time. He made a note to see what could be salvaged and added to the current test file.

Errno is not rebuilt when changes

Yves Orton discovered that Errno depends on certain Config attributes, such as architecture. If these change, Errno doesn't realise the fact, and things go downhill from there.

So Yves tweaked the Makefile.PL for Errno to detect the changes and take the appropriate action.

  If you build it so will they

New and old bugs from RT

IO::Poll::remove() bug (#7899)

Steve Peters explained that a variant of the proposed patch is now used in the module.

regular expression segfault (#8718)

Steve also explained that, while there was no test data to exercise the posted bug, given all the work that has gone into the engine, and all the existing bugs that appear to be similar to this one are fixed, it's a safe bet to assume that this one is fixed too.

Configure: /usr/bin/df not found (#8777)

On a roll, Steve checked the Solaris hints for Configure, and noted that df no longer has a hardwired path.

Regexp causing segmentation fault (#10001)

A number of years ago, Hugo van der Sanden suggested a small fix to resolve this core-dumping bug, but he had doubts as to whether it would cause other problems. Be that as it may, Steve Peters observed that an identical change was in fact committed by Dave Mitchell back in May of this year, so the bug should be resolved.

Consult (#21472)

Three years ago Silvio Alberto Ospina Salgado wanted to find out how to find Perl reference books. A documentation patch was written at the time by Yitzchak Scott-Thoennes but never applied, but regardless, the documentation was subsequently rewritten. So Steve closed the bug.

Strange interaction between while() and system() on Win32 (#27918)

reading from DATA on win32 with perlio behaves oddly (#28106)

make rebuilds perl every time (#41058)

perl segfaults when map-arguments get freed (#41062)

Out of memory!, while extending scalar with vec() (#41065)

eval CODEREF should work (#41066)

study provokes "should not happen" (#41067)

require stringifies code references in tied @INC (#41071)

infinite loop if strftime fails (#41083)

xsubpp generates wrong line info for included files (#41091)

Perl5 Bug Summary

With 8 opened and only 3 closed this week, we'll have to wait until next week to see if we crack the 1500 barrier.

New Core Modules

In Brief

Shlomi Fish called everyone's attention to the fact that integer pragmas are not propagated to string evals in perl-5.8.x.

  need a hint

Jarkko Hietaniemi sent in some more suggestions for perlhack.pod and also posted the latest cut-and-paste findings he had available.

He also tweaked an #ifdef section in mg.c to factor out the invariant code on either side of the conditional.

Jerrad Pierce fixed a usability problem with Fatal, but didn't know what the best way was for dealing with core functions that have been overridden.

Anton Berezin made t/op/groups.t play nicely on modern FreeBSDs.

About this summary

This summary was written by David Landgren.

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.