This Week on perl5-porters (Sep 25 - Oct 03 2004)

This Week on perl5-porters (Sep 25 - Oct 03 2004)

IO::File reads garbage from directory filehandles

Andy Lester reported (bug #31730) that $fh->getline on a directory sometimes returns garbage and other times undef. Steve Peters pointed out that it depends on which OS you're on, which H. Merijn Brand demonstrated on several systems. People blahed at the idea of an argument to IO::File->new to specify the behavior of reading from a directory, though a note in the docs might be okay.

  http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2004-09/msg00384.html

eval {} in XS

Ton Hospel needed an equivalent of eval {} for XS code but didn't find any such thing in the API doc or perl source code, so he made his own. Nick Ing-Simmons explained how in Tk he does eval { &foo } by making a CV for the contents of {} then calling call_sv(cv, G_EVAL). (Note: examine btkGlue.c -- Lang_catch, Tcl_GetRegExpFromObj, and do_comp in the Tk source).

  http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2004-09/msg00381.html

Why do coderefs in @INC clear IoIFP?

Nobody knows apparently. Steve Hay tried not clearing IoIFP, but it caused a test to break.

  http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2004-09/msg00426.html

require Carp; vs use Carp; in warnings.pm

Tels was doing a require Carp instead of use Carp in order to load it on demand, but then found that use vars does use warnings which in turn does use Carp! So he submitted a patch for warnings. Then Vadim Konovalov noted how he always optimizes Dynaloader locally, so he also submitted a patch.

  http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2004-09/msg00373.html

Cannot build bleadperl on OpenVMS

Abe Timmerman, with Craig Berry's help, tried building bleadperl (and porting Test::Smoke) on OpenVMS -- on a VAX. It seems there are problems with 8-level directory names like

  DISK$USER_2:[TIMMERMAN.KLAD.PERL-CURRENT.LIB.AUTO.FILTER.UTIL.CALL]

If that didn't trigger your VMS allergies, you might try the rest of the thread:

  http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2004-10/msg00020.html

Bug fixes

Chris Kelly was vivified enough to report (bug #31767) that

  open $1, $file or die;

doesn't die. Dave Mitchell fixed it by making open croak if the first argument is read-only.

  http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2004-09/msg00429.html

perl@pythontech.co.uk found (bug #31767) that printing from an undef variable prints out junk instead of nothing in perl 5.8.3:

  $data = "13 characters";  $data = undef;
  open(MEM, '<', \$data) or die "Fail: $!\n";
  while (<MEM>) { print }

Rafael Garcia-Suarez fixed this in the development branch.

  http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2004-09/msg00345.html

Zefram (bug #31793) found that use overload wouldn't work when setting the $Data::Dumper::Useqq variable. Rick Delaney provided a patch to fix overload.pm (with Tels independently arriving at the same conclusion, apparently).

  http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2004-10/msg00008.html

Craig Berry made at least two VMS test fixes:

  http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2004-10/msg00015.html
  http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2004-10/msg00014.html

Reference

The thread for bug number $BUGNUM can be found at http://rt.perl.org/rt3/Ticket/Display.html?id=$BUGNUM

About this summary

This summary was written by Scott Lanning. Summaries are published weekly at http://use.perl.org/ and posted to a mailing list whose subscription address is perl5-summary-subscribe@perl.org. The archive is at http://dev.perl.org/perl5/list-summaries/. Comments and corrections welcome.