Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

This Week on perl5-porters - 14-20 June 2008

posted by grinder on 2008.06.27 15:39   Printer-friendly

This Week on perl5-porters - 14-20 June 2008

David Nicol: Does pushing all exceptions to @@ whenever $@ gets assigned to break anything?

Abigail: In theory, it could, as @@ is a "normal" array that can be used as such. But I doubt anything serious will break. I'd say anyone that uses a punctuation variable that currently has no special meaning does so at his/her own risk, and doesn't have the right to complain if it does get special meaning.

-- Abigail, suggesting that a little backwards compatibility breakage from time to time can be good for the soul.

Topics of Interest

Module::Build changes for VMS

Craig Berry sorted out the changes for Module::Build that had made it to blead but not to the M::B repository, and tidied them up so that Ken Williams could apply them with a minimum of fuss.

  http://xrl.us/gpjvm 

Attempt to Configure under Bash on VMS results.

John E. Malmberg, at a loss as to how to entertain himself, tried to configure Perl using the GNV/bash subsystem on VMS. After examining dozens of problems, he concluded that "it looks like a bit of work before VMS can run the UNIX configure script".

One fundamental problem is that the test programs are there to test for C routines, but if Configure fails to spot the required header file in the first place, it will skip the test altogether, even though VMS compilers have ways of finding header files in all sorts of VMS-specific ways.

Peter Prymmer suggested that a hints/vms.sh might allow a sane GNV environment to be set up, which could improve Configure's chances of success.

Paul Green, paramount wrangler of Perl on Stratus VOS suggested that it was unlikely that pushing changes back to the autoconf authors was a viable approach. He did that five years ago, and he's still waiting for the changes to propagate out to various projects that use it. He advised John to tweak the VMS to work with the existing framework.

  http://xrl.us/gpjvu 

Perl 5.8 and perl 5.10 differences on UTF/Pack things

Alberto Simões ran into trouble with the changes that Ton added in 5.10 to make pack/unpack self consistent. He wasn't sure what technique should be used to ensure the same behaviour on both versions of Perl; Nicholas Clark suggested side-stepping the problem altogether.

  the clark gambit
  http://xrl.us/gpjv2 

Empty regex

Alfie accidentally trod in a thread from last month concerning the use of qr/$var/ when $var is empty, thus reusing the previous pattern used for matching.

This attracted a considerable amount of discussion, with Yitzchak Scott-Thoennes contributing the following gem:

 my $x = qr//;
  ok("foo" =~ /foo/ && "bar" =~ /$x$x/);
  ok("foo" =~ /foo/ && "bar" =~ /$x/);

in which the first test succeeds, and the second test fails. Nicholas Clark wanted to know if there was a TODO for this (Yitzchak thought probably not), and which behaviour was the most desirable.

  http://xrl.us/gpjv8 

How to dig through symbol tables

Sean O'Rourke was trying to inspect symbol tables, and noticed that *FOO{SCALAR} was always defined, and wondered if that was because he was prodding too hard. Ben Morrow confirmed that he was seeing the expected behaviour, although Yitzchak Scott-Thoennes pointed out that PERL_DONT_CREATE_GVSV changes the picture somewhat.

  http://xrl.us/gpjwe 

A Project to get Perl supported on Google App Engine

Steven Adkins mentioned the project (at this stage not much more than a wish) to get Perl supported as a language for Google's App Engine.

Not much came out of the discussion, apart from Ævar Arnfjörð Bjarmason who asked if there was a precise description of the sandbox environment the hosted applications would run in (such as no XS modules or system calls).

  http://xrl.us/gpjwk 

Incorrect variable reported in uninitialized value warning

Yuval Kogman managed to fool the new "variable name reported in uninitialized value" warnings with a simple code snippet. Dave Mitchell fixed the problem a few hours later.

This inspired Nicholas Clark to go looking, and find a more devious case that remained broken. Dave went looking and found a few more, and theoretically nailed them all with an additional patch.

  desperately seeking PUSHs(&PL_sv_undef)
  http://xrl.us/gpjwr 


TODO of the week

A task that will get your name mentioned in the description of the "Highlights of 5.12".

make ithreads more robust

Fix Perl_sv_dup, et al so that threads can return objects.

(hint: you have more than one week to achieve this).


Patches of Interest

.gitignore file

Florian Ragwitz began to update .gitignore files all over the codebase until Rafaël Garcia-Suarez gently explained that the files didn't exist in the repository yet, given that the porters had not yet switched over to git.

Sam Vilain, owner and manager of the git mirror of the Perforce repository, outlined a mechanism he intended to put into place to allow people to start using git now, while not interfering with Perforce. Rafaël gave the approach the thumbs up.

  http://xrl.us/gpjwx 

At the same time, Sam added a little script to parse perforce change numbers, and return the git revision ID when captured, or 'git-log' output otherwise. Unapplied.

  http://xrl.us/gpjw5 

TODO B::Deparse cpan #33708

Reini dusted off the old TODO test from the CPAN report and tidied it up to suit blead. Applied by Rafaël.


  http://xrl.us/gpjxb 

pp_sys.c: gethostbyaddr

H.Merijn Brand asked for help to figure out what was the best way for dealing with an HP-UX bug, since gethostbyaddr will use a DNS resolver whenever it finds one, regardless of what /etc/resolv.conf says.

  routing around brain damage
  http://xrl.us/gpjxd 

In the process of tracking down that problem, H.Merijn discovered that HP-UX's C compiler has a warnings dial that goes up to 11. So he cranked it up and posted the results to the list, to see if anyone was inspired to adjust the code to reduce the quantity.

  nope
  http://xrl.us/gpjxh 

Configure - d_sprintf_returns_strlen

Jerry D. Hedden noticed that if the test program used to detect the setting for d_sprintf_returns_strlen failed to compile, no-one would have been any the wiser. Unapplied.

  now you would know
  http://xrl.us/gpjxj 


New and old bugs from RT

Unix Domain sockaddr returned by recv is not acceptable to Socket::unpack_sockaddr_un (#2052)

Renée Bäcker noticed that one of the oldest still-open bugs in the database was no more.

  seems to be fixed
  http://xrl.us/gpjxo 

As does "Lexical objects not destroyed at end of scope" (#3308)

  http://xrl.us/gpjxs 

foreach spuriously autovivifies (#2166)

Mike Guy originally pointed out that foreach (@h{a, b}) { } autovivifies $h{a} and $h{b}, when it would have been nice not to. Renée didn't see why it should, but since it's been known about and relied upon for so long, it may no longer be fixed.

Bo Lindbergh showed how a do block could be used as a work-around.

  EWONTFIX
  http://xrl.us/gpjxy 

Issue with the exists function (#45147)

Renée also added another datapoint to this problem, narrowing the effect to one implicating @-.

  http://xrl.us/gpjx6 

Buffer overflow in win32_select() (PATCH included) (#46309)

Risto Kankkunen had identified this, and proposed a patch, back in October 2007. Rafaël applied it to blead this week.

  http://xrl.us/gpjyc 

"Out of memory ... sbrk()" on FreeBSD-6.x for v.5.8.x but not v.5.6.x (#46381)

Rafael also applied Slaven Rezic's patch that fixes this problem.

  http://xrl.us/gpjyg 

as well as a a patch to stat.t from John P. Linderman, thus resolving bug #47746.

  http://xrl.us/gpjyk 

Regexp optimisation affected by threads (#55600)

John Gardiner Myers had identified a problem with pattern matches being performed slowly in threads, since a character class optimisation was skipped. Dave Mitchell grovelled through the source and discovered why the optimisation was suppressed, and why it wasn't be re-enabled. Unfortunately Dave isn't familiar with this part of the code and didn't want to hazard a fix.

  http://xrl.us/gpjyp 

perlbug refactoring and prose cleanup (#55844)

Jesse Vincent consolidated the various patches to perlbug from last week. Paul Johnson stopped by to comment that he hated the linguistic drift that has made "issue" become synonymous with "bug", "problem" or "question". (note to self: guilty as charged).

On a completely different note, Paul also thought that autodie (the name, not the concept) is awful.

  a pity the alternatives are worse
  http://xrl.us/gpjyt 

h2xs does not handle properly enum constants (#55896)

Domi@hp reported an issue, no, problem, with XS bindings to interface C code that uses enums, and a pointer to a blog that provides additional commentary.

Steve Peters thought that all the problems that were known at the time the blog entry was written had been addressed, so he wasn't sure if it was still relevant. But he did want to find out more about the specific problem being encountered, in case there was more enum work that needed doing.

  http://xrl.us/gpjyz 

Iteration order of hash keys doesn't appear random (#55952)

Jonathon Sailor wondered why hash keys were always iterated in the same order, regardless of how PERL_HASH_SEED is set. Turns out the documentation was wrong.

  http://xrl.us/gpjy7 

miniperl SIGBUS on test during build Sunos8 64-bit (#55968)

Someone at Sony filed a report about failing to build on Solaris. Andy Dougherty made a few educated guesses about what the problem was, and suggested a recipe that might work, and/or a copy of config.sh to figure what the problem was.

  http://xrl.us/gpjzb 

problem with miniperl (#55980)

Shanthi M Srinivasan had a problem with libraries on a 64-bit Linux box not being picked up. Andy explained that the problem was resolved in 5.10 (which was released six months (!) ago). For people stuck with 5.8, the fix is simple, just requiring /lib64 and /usr/lib64 to be specified during configuration.

  http://xrl.us/gpjzh 

return return (#56150)

Nicholas Clark wondered why this wasn't a syntax error. Rafaël Garcia-Suarez showed him why it was a feature.

The thread then expanded into a very long discussion about the (f)utility of using an explicit return statement.

  obviously you've never tried to return a reference to a hash
  http://xrl.us/gpjzq 

(((??{1 + $^N}))) behaves differently in 5.10.0 than in blead (#56194)

While researching whether bug #27603 had been fixed, Bram discovered that 123 =~ /^(\d)(((??{1+$^N})))+$/ ? 1 : 0 return 0 or 1, depending on whether one uses 5.10.0 or 5.11.0 (or any suitable blead) to run the code. No replies, but it's obviously some sort of regression that wasn't nailed down by a test.

  of course, it didn't work at all in 5.8
  http://xrl.us/gpjzu 

Attempt to free unreferenced scalar: SV... (#56202)

Mike Capella reported a problem with an enormous list of qr/.../o patterns producing some interesting emergent behaviour. Bram suggested he get rid of the /o modifiers. Mike wanted to know the reason but no-one clued him in. In the meantime, Mike came up with a work-around, but since the appearance of the error seemed to be dependent on the number of patterns used, he thought it indicated some sort of overflow situation, should someone with the necessary internals skills feel like looking into it.

  not today
  http://xrl.us/gpjz2 

Perl5 Bug Summary

Hmm, four more this week than last week.

  271 new + 1275 open = 1546 (+12 -8)
  http://xrl.us/gpjz6
  http://rt.perl.org/rt3/NoAuth/perl5/Overview.html 


New Core Modules

threads::shared

Version 1.23 is alive and kicking, thanks to Jerry D. Hedden. The change is an attempt to stamp out timing errors that cause spurious failures in the test suite.

  http://xrl.us/gpj2a 


In Brief

Paul Fenwick asked about accessing caller's %^H at runtime in 5.8.x, as part of his ongoing autodie adventure. Sartak suggested he look at chocolateboy's Devel::Hints::Lexical for inspiration. Paul admitted having spoken to chocolateboy at length about that very module, and explained that it didn't really go as far as he needed.

  http://xrl.us/gpj2e 

Paul then shared a monologue with us regarding accessing caller's $^H in 5.8 and 5.10.

  they all lived happily ever after
  http://xrl.us/gpj2k 

Crawford Curry mentioned the incomplete documentation of CGI::charset (in cpan #36817).

  paging mr. stein
  http://xrl.us/gpj2r 

In a followup to the changes in m//m in 5.10 thread, Eric Brine suggested that the documentation in perlop needed updating.

  http://xrl.us/gpj2x 

Niko Tyni reported that the Debian project had discovered that the latest File::Path::rmtree makes symlink targets world-writable.

  something else for my copious spare time
  http://xrl.us/gpj25 

Last week's summary

Jan Dubois picked up on last week's summary of why IPC::Run is preferable to system, explaining that on Win32 it is rather inefficient as it depends on additional helper processes to get the job done. As a result, the variable $^X (the name of the current copy of Perl) doesn't contain what one might expect.

An additional complication is that the exit status counter on Win32 is a 32-bit quantity and thus does not even fit in $?. One solution would be to borrow from VMS, and implement a sane ${^CHILD_ERROR_NATIVE} variable.

Worse, if a child process returns -1... In certain circumstances, the parent runs the child a second time.

And then they started talking about losing $@ from an eval all over again. Mark Mielke nailed the problem when he said that the problem is that $@ is a global, but eval is inherently recursive.

  This Week on perl5-porters - 1-6 June 2008
  http://xrl.us/et7yb 

About this summary

This summary was written by David Landgren.

Weekly summaries are published on http://use.perl.org/ and posted on a mailing list, (subscription: perl5-summary-subscribe@perl.org ). The archive is at http://dev.perl.org/perl5/list-summaries/ . Corrections and comments are welcome.

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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.