This month on perl5-porters (August 2006)

[email protected] (David Landgren) Sat, 09 Sep 2006 23:39:59 +0200
Newsgroups perl.perl5.porters,perl.perl5.summary
Organization The Lusty Decadent Delights of Imperial Pompeii
Message-ID <[email protected]>
This month on perl5-porters - August 2006

   "Insistent rumors claim that we used to have Perl compilable with C++
   -- I doubt it a bit, given the kind of problems I found when doing
   this latest cleanup work." -- Jarkko Hietaniemi, having now found a
   new wall against which to bang his head.

Topics of Interest

Perl 5.9.4 is out

   Rafael Garcia-Suarez posted the first draft of the delta that
   explained all the new goodies in the latest development release of
   Perl, 5.9.4.

     perl594delta
     http://xrl.us/rny2

   He made a number of changes based on feedback received.

     perl594delta (take two)
     http://xrl.us/rny3

   And after a second round of feedback, managed to push the tarball out
   the hatch.

     Perl 5.9.4 is out
     http://xrl.us/rny4

Define "PERL_NO_DEV_RANDOM" on Windows

   Alex Davies noticed that perl attempts to look for /dev/urandom on
   Win32 platforms, even though that file does not exist. And worse, you
   can create it, thereby subverting Perl's randomness. Steve Peters
   fixed that up.

     Have you in fact got any cheese here at all?
     http://xrl.us/rny5

IBM z/OS Unix source code fixes

   Jarkko Hietaniemi wrapped up his heroic endeavour to merge the code
   changes that IBM programmers made to a copy of Perl, *circa* 5.8.7, to
   "blead". He announced he was stepping down, having left a couple of
   parts of the patch unapplied, and explained why. He invited the IBM
   programmers to continue the good work, to have Perl running on z/OS.

     I hear the roar of a big machine
     http://xrl.us/rny6

ops needed for "[]" and "{}"

   Nicholas Clark discovered that a lot of work (lots of ops) are needed
   to build a single lousy anonymous hash or array, and wondered if there
   wasn't a more efficient way of of making one. He came up with a patch
   to change the behaviour (bonus JFDI points to Nicholas) that
   simultaneously slimmed down the op-tree, and doesn't break the test
   suite. And naturally enough, he wanted to know whether people thought
   this was a good idea.

   Jim Cromie ran a few benchmarks and found some measurable
   improvements.

     Special ops
     http://xrl.us/rny7

C99 is not compilable ... where?

   Dropping in from Parrot, Chip Salzenberg wanted to know if any porters
   knew of a platform far, far away that did not have a C99-capable
   compiler.

   Nicholas Clark mentioned "gcc", for starters. Andy Dougherty had some
   good advice. Tony Cook pointed out that Microsoft don't seem very
   interested in providing support for C99 features, unless they happen
   to also be C++-compatible. Chip said some naughty words.

     Just about everywhere else
     http://xrl.us/rny8

Ponie has been put out to pasture

   Jesse Vincent announced the end of the Ponie project, the migration of
   the Perl 5 core to use the Parrot VM. A number of other techniques are
   currently under development to have Perl 5 code running inside Perl 6,
   and much good came out of the project in terms of clean-ups to the
   code base.

     They shoot horses, don't they?
     http://xrl.us/rny9

Patches of Interest

   Numerous small patches that were applied quietly without fuss, or
   withdrawn by the author are not included in this section (it's big
   enough as it is).

Patching for g++

   Jarkko Hietaniemi checked in a large body of work to make the code
   base compile with g++, the GNU C++ compiler.

   First some g++ goodness for Tru64

     http://xrl.us/rnza

   And then a large patch for everyone, which nearly almost works, but
   significant smoking will be required, if only to get the kinks ironed
   out on some of the more common platforms.

     http://xrl.us/rnzb

   At this point, Jarkko rolled up a patch that succeeded as getting as
   far as completing "make perl", although "x2p" and a few extensions
   don't build. Steve Peters carried the baton and tidied up a few of the
   easier modules, although a couple needed more thought.

     http://xrl.us/rnzc

   Jarkko then puzzled for a bit over how to get C linkage back out again
   at the end of it, so that things would work as before. All this fuss
   made him suspect that the source probably never was compilable with a
   C++ compiler. Still, it might in the near future.

     http://xrl.us/rnzd

   He even managed to make "x2p" work.

     doubleplusgood
     http://xrl.us/rnze

Adding X<> tags to the documentation

   Gabor Szabo delivered some patches to add X<> tags (for indexing) to
   the core documentation and also snuck in a few stylistic changes while
   no-one was looking (although it warranted a comment from Rafael).

     File::Spec
     http://xrl.us/rnzf

     File::Basename
     http://xrl.us/rnzg

     perlvar
     http://xrl.us/rnzh

More portability pitfalls for "perlhack"

   Jarkko jotted down some more nuggets of wisdom acquired over the years
   of doing battle with unfriendly compilers.

     Here be dragons
     http://xrl.us/rnzi

Silence format and comparison warnings in perlio.c, pp.c and  regcomp.c

   Robin Barker sent in a patch to silence many warnings of
   signed/unsigned mismatches. Hooray! Applied.

     ttys everywhere rejoiced
     http://xrl.us/rnzj

Detecting bad /dev/nulls in "Configure"

   Michael Cummings, from Gentoo, proposed a patch to make "Configure"
   smarter about /dev/null, which may not always be configured correctly,
   especially in chrooted environments, and by the time this causes a
   problem, the build may already be quite some way down the track (and
   thus the original cause of the error may be hard to diagnose. "Missing
   Separator" errors may not seem crystal clear. Alexey Toptygin proposed
   a tweak. A new patch was proposed. Unapplied.

     Go directly to jail
     http://xrl.us/rnzk

Watching the smoke signals

Smoke [5.9.4] 28730 FAIL(F) OSF1 V5.1 (EV6/4 cpu)

   Things in lib/strict.t, lib/subs.t and t/run/fresh_perl.t seemed to be
   going pear-shaped, but appeared to be a Heisenbug, since Jarkko wasn't
   able to reproduce the errors manually.

     http://xrl.us/rnzm

Smoke [5.9.4] 28736 FAIL(F) OSF1 V5.1 (EV6/4 cpu)

   The pain persisted, so in the morning, Jarkko went to the ice-rink to
   see if Dave Mitchell was around. Nicholas Clark made the connection to
   the work on plugging leaks on unevaluable code, realising that that
   may be causing problems here. Dave professed to not having many tuits
   at the moment.

     http://xrl.us/rnzn

New and old bugs from RT

*FILE{IO} does not behave like *FILE for "stat()" and "-X()" operators 
(#8244)

   Andy Dougherty revived an old bug that rose to the surface after a
   Coverity scan. Rafael applied a quick fix.

     http://xrl.us/rnzo

isa cache leaks into and out of "Safe" compartments (#39887)

   Rafael asked for some test cases to draw the bug out into the open,
   where it may more easily be stamped out.

     Here buggy buggy
     http://xrl.us/rnzp

"B::Deparse" double "do" (#40055)

   Nicholas Clark wondered why "do{}" was deparsed as "do[ do{} }". Rick
   Delaney provided the fix.

     Deep do do
     http://xrl.us/rnzq

UTF-8 keys in a tied hash cause warning (#40067)

   Apparently not so much a bug as an unsupported feature.

     It's always done that
     http://xrl.us/rnzr

Memory leak in "Perl_newPMOP()" under "USE_ITHREADS" (#40077)

   A discussion at Perlmonks revealed a ref-counting memory leak. No
   takers.

     http://xrl.us/rnzs

"perlfaq6" example is wrong: pull out lines between two patterns (#40084)

   Max Maischein saw a flaw in a perlfaq example (where the two patterns
   appear on different lines). The only fix he could think of involved
   the arcane "m??". Rick Delaney offered a suggestion.

     This question frequently asked?
     http://xrl.us/rnzt

"Data::Dumper" with "Sortkeys" performs incomplete hash traversal (#40088)

   Peter S. Shenkin provided a short snippet showing how a hash would be
   not be completely traversed when the "Sortkeys" setting was active
   (but the example *was* using "each" too). And it appears fixed in
   5.8.8 anyway.

     ENOTABUG, I assume
     http://xrl.us/rnzu

File::Spec->case_tolerant() should return true on Cygwin (#40103)

   G. Paulissen explained why this should be so. No takers.

     http://xrl.us/rnzv

Using wrong case on module should warn (#40131)

   Ben Tilly suggested that a warning should be issued if a module is
   specified with incorrect capitalisation (on a filesystem with
   case-insensitive semantics), reasoning that while "use Strict" might
   work Here, it certainly won't work There.

   Rafael noted that it turns out that there used to be such a warning,
   but it was removed because of false positives.

     Can't please everyone, all the time
     http://xrl.us/rnzw

Perl 5 Errors on Windows 2003 (#40134)

   Steve Hay awarded Subba Valisetty a golden crown for have filed the
   most utterly useless bug report ever[TM]. Nicholas Clark was gentler,
   and offered a pointer to a tutorial on how to file good bug reports.

     Gong!
     http://xrl.us/rnzx

Problem compiling perl 5.9.3 (#40141)

   Pierre posted an excerpt of a failing compilation (pp_sys.c dying an
   agonising death). Steve Hay asked for the output of the myconfig
   script.

     http://xrl.us/rnzy

"warnings::warnif" is sometimes ignored (#40144)

   Wiles showed how to make "warnings::warnif" misbehave. No takers.

     http://xrl.us/rnzz

"make" fails for perl 5.8.8 build on AIX5.3 (#40155)

   Graham Stokes was having compiling 5.8.8 for AIX 5.3. Fortunately, he
   was smart enough to supply myconfig. Steve Hay suggested using "ld"
   (linker) from the GNU "binutils" package, rather than AIX's "ld". Andy
   Dougherty also provided some advice on fixing locale warnings.

     http://xrl.us/rnz3

"ccversion" fix for HP/UX (#40161)

   An anonymous porter, possibly using the HP testdrive facility, filed a
   fix for the HP/UX hints file. Applied.

     http://xrl.us/rnz4

Problem "join()"ing threads (#40168)

   Jonathan Geisler had a problem with threads, that Jerry D. Hedden
   thought was probably fixed in the latest versions of "threads"
   available on CPAN, and made a couple of suggestions to the code as
   posted. Johnathon thanked him for the courtesy, and pointed out that
   one of the snippets in question was lifted directly from "perlthrtut".

     So that's the bug
     http://xrl.us/rnz5

Unable to use "DProf" with threads (#40170)

   Jonathan also joined the long list of people who had found limitations
   with "Devel::DProf" in its current incarnation. Any takers?

     A call to tuits
     http://xrl.us/rnz6

   Solaris: BEGIN and "exec", "fork", "system" or "open(|-,-|)" (#40190)

   Gary Vollink discovered some Solaris wackiness, involving "use
   warnings FATAL => 'all'", systems and/or backticks failing, and code
   blocks then being evaluated and executed twice (when once would be
   ample).

   Nicholas Clark remembered this emergent behaviour cropping up in other
   contexts, and thought that it was something to do with the Unix file
   descriptor being diddled in the parent when the child dies.

     Solaris: you are awful, but I like you
     http://xrl.us/rnz7

"grep" autovivifies hash elements (#40194)

   Marc Lehmann wondered why grepping a value against a hash key causes
   the hash key to spring into existence. David Nicol thought that Marc
   should have been using "exists". chromatic supplied a much clearer
   pair of snippets to show what Marc was trying to get at. And yes, it's
   quite counter-intuitive, broken, and nearly impossible to fix. David
   still had trouble understanding, and Benjamin Carter (who writes from
   a domain with a most excellent name) explained in more detail about
   aliasing of $_ and the creation or not of hash keys.

     Weird science
     http://xrl.us/rnz8

Small typo in "perlxstut" man page (#40197)

   Ville Koskinen explained the difference between ensure and insure.
   Applied.

     http://xrl.us/rnz9

UTF-16 and regular expressions causes compilation failure (#40203)

   Ian Goodacre had a problem with regular expressions trying to match
   characters coming out of a UTF-16-encoded file, specifically, an
   unrecognised BOM 7061. No takers.

     http://xrl.us/rn2a

"<>" as glob in scalar context and interpolated variables (#40213)

   Dakkar filed a report about using "<>" as a glob in scalar context and
   interpolated variables and how iterators were not reset and even added
   a test case. No takers. Perhaps the fact that the test was tarred and
   bzipped scared away potential fixers.

     http://xrl.us/rn2b

"SelfLoader::croak" doesn't protect $@ from being clobbered by "require" 
(#40216)

   Bo Lindbergh filed a bug report so clear that Adriano Ferreira felt
   that he could fix it. So he did. Applied.

     http://xrl.us/rn2c

'reserved' warning not working (#40227)

   Jerry D. Hedden discovered a problem with "use warnings 'reserved'"
   not working correctly. Rafael made an oblique explanation as to why,
   but I was not able to determine whether he was pointing out that the
   error was in Jerry's test case or in Perl.

     http://xrl.us/rn2d

   They both seemed to understand each other, for an additional patch
   later on got things sorted out.

     http://xrl.us/rn2e

New hints file for MidnightBSD (#40239)

   Lucas Holt tweaked the FreeBSD hints file, to derive a new hints file
   that allows perl 5.8.8 to build successfully on MidnightBSD.
   Unapplied.

     Another platform added to the roster
     http://xrl.us/rn2f

"PerlIO::scalar" doesn't know how to truncate (#40241)

   Bo Lindbergh wanted "truncate" to work on strings. Rafael looked at
   the implementation and saw that it only works for file handles at the
   moment. Any takers?

     Your chance for fame and glory
     http://xrl.us/rn2g

"Math::BigInt" silently drops lib argument if not available (#40242)

   You can import "Math::Bigint" and tell it to use an underlying library
   to do the biginty calculations. But if you type the name incorrectly,
   it silently loads a couple of default libraries and never complains
   that anything is wrong. Andreas König thought this behaviour less than
   desirable. He felt that the script should die, so that the programmer
   could fix the error.

   The problem is that if this was changed now, it might break programs
   of people who were living happily in ignorance that their BigInt
   calculations were not in fact using GMP or Pari as they had thought,
   but rather the default Calc and Fastcalc libraries, simply because
   they had accidently typed "Gimp" or "Paris".

   Allen Smith felt that since this was the first time in four years that
   someone had questioned the existing behaviour, it maybe wasn't so bad
   after all. Tels offered a snippet of sanity checking boilerplate to do
   what Andreas wanted.

     You might find you get what you need
     http://xrl.us/rn2h

Interesting variation on 'Out of memory' (#40243)

   Andreas also posted a bug on rampant memory usage, that can be slimmed
   down by using temporaries, which in turn allows the garbage collector
   to fire off more readily, keeping consumption to a minimum.

     http://xrl.us/rn2i

Perl5 Bug Summary

   Around 21 new tickets were created this month, and alas, only 8 were
   closed, bringing the current total to 1519. Hopefully after the summer
   lull Steve will be able to get that figure down under 1500 again. And
   if a couple of people pitched in to help, we could bring it down
   lower, and faster.

     Over to you
     http://rt.perl.org/rt3/NoAuth/perl5/Overview.html

New Core Modules

   *   John Peacock uploaded version 0.67 of "version" to correct the
       problem that Ovid spotted of version 0.000001 not being
       understood.

         http://xrl.us/rn2j

   *   Dave Rolsky synced "blead" with "Time::Local" version 1.13 from
       CPAN.

         http://xrl.us/rn2k

   *   "Module::Load" became part of the core distribution.

         http://xrl.us/rn2m

   *   "Package::Constants" also became part of the core distribution.

         http://xrl.us/rn2n

   *   A proposal was made to add "Locale::Maketext::Simple" to the core,
       however, as far as I can see, it was not added. The fact that the
       module is not licensed under the Artistic or GPL licenses (rather,
       the MIT license), may have something to do with it.

         http://xrl.us/rn2o

   *   "Module::Loaded" also made it into the core, but sparked off a
       certain amount of debate as to whether it offered *enough*
       functionality.

         http://xrl.us/rn2p

   *   After having too much fun compiling perl with g++, Jarkko still
       found time to release "Time::HiRes" version 1.88 to CPAN.

         http://xrl.us/rn2q

In Brief

   Rich Rauenzahn suggested a tweak to determining the HP-UX compiler
   version in the Policy file.

     http://xrl.us/rn2r

   Nicholas Clark posted a long reply about the difference between
   Python's and Perl's threads, and why Perl's threads are unlikely to
   mesh nicely with a CORBA implementation.

     http://xrl.us/rn2s

   Brendan O'Dea, from the world of debian, wondered whether what was
   wrong with "setlocale()" was an implementation or a documentation
   problem.

     http://xrl.us/rn2t

   Alexandre Jousset wrote in to explain how to cross compile Perl for
   the TomTom GO 910. Rafael updated a config file to take account of the
   information.

     Is that a telephone or an MP3 player?
     http://xrl.us/rn2u

   Even though he's left us, we are not forgotten. Andy Lester CC'ed the
   list on his essay about why consting is good.

     http://xrl.us/rn2v

   Ben Morrow suggested adding all keywords to "perlfunc". And rather
   just moaning about how nice it would be, actually sent in the patch
   that documented a slew of things, like "can", "DESTROY" and so forth.
   Unapplied, but it has certain merits.

     http://xrl.us/rn2w

   Marc Lehmann uncovered a way to make perl with
   "-DPERL_DONT_CREATE_GVSV" dump core. Nicholas wasn't sure of the
   reason.

     http://xrl.us/rn2x

   Gerard Goossen came up with a test case for a "substr" with lvalue
   refcount increment bug, but no-one was sure what to do about it. At
   least, Dave Mitchell didn't know.

     http://xrl.us/rn2y

About this summary

   This summary was written by David Landgren.

   If you want a bookmarklet approach to viewing bugs and change reports,
   there are a couple of bookmarklets that you might find useful on my
   page of Perl stuff:

     http://www.landgren.net/perl/

   Weekly summaries are published on http://use.perl.org/ and posted on a
   mailing list, (subscription: [email protected]). 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 to help support the development of Perl.
-- 
"It's overkill of course, but you can never have too much overkill."