Front page | perl.perl5.changes |
Postings from October 2008
Change 34539: Integrate:
From:
Nicholas Clark
Date:
October 20, 2008 13:00
Subject:
Change 34539: Integrate:
Change 34539 by nicholas@mouse-mill on 2008/10/20 19:55:16
Integrate:
[ 25261]
Subject: [PATCH] Typos in *.p[lm]
From: "Piotr Fusik" <pfusik@op.pl>
Date: Sun, 31 Jul 2005 12:50:04 +0200
Message-ID: <001401c595bd$dccb5d80$0bd34dd5@piec>
[the Filter::Simple typo - Damian notes "the complete failure of my
campaign to gain acceptance for the esoteric practice of
concatentation"]
[ 34533]
Integrate:
[ 34378]
Subject: Re: [PATCH] Revised: Improved documentation for flock() in perlfunc.pod
From: Paul Fenwick <pjf@perltraining.com.au>
Date: Tue, 16 Sep 2008 20:32:39 +1000
Message-ID: <48CF8B47.30803@perltraining.com.au>
[ 34380]
Kevin J. Woolley has taken over from Gozer.
[ 34386]
Subject: [PATCH] Re: [perl #59134] Typo in File::stat man pag
From: Moritz Lenz <moritz@casella.verplant.org>
Date: Sun, 21 Sep 2008 17:50:04 +0200
Message-ID: <20080921154935.4916.qmail@lists.develooper.com>
[ 34389]
Subject: [PATCH] Re: [perl #59128] Typo in perldsc(1)
From: Moritz Lenz <moritz@casella.verplant.org>
Date: Sun, 21 Sep 2008 17:47:11 +0200
Message-ID: <48D66C7F.6000602@casella.verplant.org>
[ 34408]
Subject: [PATCH] Show using waitpid in IPC::Open[23] SYNOPSIS
From: brian d foy <brian.d.foy@gmail.com>
Date: Sun, 21 Sep 2008 15:23:47 -0500
Message-ID: <210920081523471499%brian.d.foy@gmail.com>
[ 34435]
Subject: Re: [PATCH] Add open "|-" and open "-|" to perlopentut
From: Shlomi Fish <shlomif@iglu.org.il>
Date: Tue, 23 Sep 2008 19:00:41 +0300
Message-id: <200809231900.41474.shlomif@iglu.org.il>
[ 34451]
error reporting of [$a ; $b] can be a TODO.
[ 34454]
It's RISC OS, dammit. Hard space, upper case. Always.
[ 34463]
Update copyright year to 2008.
[ 34505]
Damian has transferred Filter::Simple to p5p. Bump its version to 0.83
with the new contact details, and remove the out-of-date README from
core.
[ 34529]
Bump IPC::Open2's $VERSION. (The docs changed.)
[ 34531]
Bump the $VERSION of File::stat (documentation changed).
Affected files ...
... //depot/maint-5.8/perl/MANIFEST#447 integrate
... //depot/maint-5.8/perl/Porting/Maintainers.pl#43 integrate
... //depot/maint-5.8/perl/Porting/repository.pod#9 integrate
... //depot/maint-5.8/perl/README#14 integrate
... //depot/maint-5.8/perl/lib/File/stat.pm#2 integrate
... //depot/maint-5.8/perl/lib/Filter/Simple.pm#3 integrate
... //depot/maint-5.8/perl/lib/Filter/Simple/Changes#3 integrate
... //depot/maint-5.8/perl/lib/Filter/Simple/README#2 delete
... //depot/maint-5.8/perl/lib/IPC/Open2.pm#3 integrate
... //depot/maint-5.8/perl/lib/IPC/Open3.pm#8 integrate
... //depot/maint-5.8/perl/perl.c#234 integrate
... //depot/maint-5.8/perl/pod/perldsc.pod#4 integrate
... //depot/maint-5.8/perl/pod/perlfunc.pod#115 integrate
... //depot/maint-5.8/perl/pod/perlopentut.pod#12 integrate
... //depot/maint-5.8/perl/pod/perltodo.pod#51 integrate
Differences ...
==== //depot/maint-5.8/perl/MANIFEST#447 (text) ====
Index: perl/MANIFEST
--- perl/MANIFEST#446~34461~ 2008-10-05 09:28:33.000000000 -0700
+++ perl/MANIFEST 2008-10-20 12:55:16.000000000 -0700
@@ -1675,7 +1675,6 @@
lib/filetest.t See if filetest works
lib/Filter/Simple/Changes Filter::Simple
lib/Filter/Simple.pm Simple frontend to Filter::Util::Call
-lib/Filter/Simple/README Filter::Simple
lib/Filter/Simple/t/data.t See if Filter::Simple works
lib/Filter/Simple/t/export.t See if Filter::Simple works
lib/Filter/Simple/t/filter_only.t See if Filter::Simple works
==== //depot/maint-5.8/perl/Porting/Maintainers.pl#43 (text) ====
Index: perl/Porting/Maintainers.pl
--- perl/Porting/Maintainers.pl#42~34009~ 2008-06-07 07:01:05.000000000 -0700
+++ perl/Porting/Maintainers.pl 2008-10-20 12:55:16.000000000 -0700
@@ -349,14 +349,6 @@
'CPAN' => 1,
},
- 'Filter::Simple' =>
- {
- 'MAINTAINER' => 'dconway',
- 'FILES' => q[lib/Filter/Simple.pm lib/Filter/Simple
- t/lib/Filter/Simple],
- 'CPAN' => 1,
- },
-
'Filter::Util::Call' =>
{
'MAINTAINER' => 'pmqs',
==== //depot/maint-5.8/perl/Porting/repository.pod#9 (text) ====
Index: perl/Porting/repository.pod
--- perl/Porting/repository.pod#8~32298~ 2007-11-12 15:21:15.000000000 -0800
+++ perl/Porting/repository.pod 2008-10-20 12:55:16.000000000 -0700
@@ -498,8 +498,8 @@
The mail alias E<lt>perl-repository-keepers@perl.orgE<gt> can be used to reach
all current users of the repository.
-The repository keeper is currently Philippe M. Chiasson
-E<lt>gozer@ActiveState.comE<gt>.
+The repository keeper is currently Kevin J. Woolley
+E<lt>kevinw@ActiveState.comE<gt>.
=head1 AUTHORS
==== //depot/maint-5.8/perl/README#14 (text) ====
Index: perl/README
--- perl/README#13~33192~ 2008-02-02 08:53:33.000000000 -0800
+++ perl/README 2008-10-20 12:55:16.000000000 -0700
@@ -1,5 +1,5 @@
Perl is Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007 by Larry Wall and others.
+2002, 2003, 2004, 2005, 2006, 2007, 2008 by Larry Wall and others.
All rights reserved.
==== //depot/maint-5.8/perl/lib/File/stat.pm#2 (text) ====
Index: perl/lib/File/stat.pm
--- perl/lib/File/stat.pm#1~17645~ 2002-07-19 12:29:57.000000000 -0700
+++ perl/lib/File/stat.pm 2008-10-20 12:55:16.000000000 -0700
@@ -6,7 +6,7 @@
our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-our $VERSION = '1.00';
+our $VERSION = '1.01';
BEGIN {
use Exporter ();
@@ -76,7 +76,7 @@
use File::stat qw(:FIELDS);
stat($file) or die "No $file: $!";
- if ( ($st_mode & 0111) && $st_nlink > 1) ) {
+ if ( ($st_mode & 0111) && ($st_nlink > 1) ) {
print "$file is executable with lotsa links\n";
}
==== //depot/maint-5.8/perl/lib/Filter/Simple.pm#3 (text) ====
Index: perl/lib/Filter/Simple.pm
--- perl/lib/Filter/Simple.pm#2~25381~ 2005-09-10 14:18:44.000000000 -0700
+++ perl/lib/Filter/Simple.pm 2008-10-20 12:55:16.000000000 -0700
@@ -4,7 +4,7 @@
use vars qw{ $VERSION @EXPORT };
-$VERSION = '0.82';
+$VERSION = '0.83';
use Filter::Util::Call;
use Carp;
@@ -650,7 +650,7 @@
changed when the placeholders are removed from C<$_> after the filter
is complete.
-For example, the following filter detects concatentated pairs of
+For example, the following filter detects concatenated pairs of
strings/quotelikes and reverses the order in which they are
concatenated:
@@ -774,10 +774,24 @@
=head1 AUTHOR
-Damian Conway (damian@conway.org)
+Damian Conway
-=head1 COPYRIGHT
+=head1 CONTACT
- Copyright (c) 2000-2001, Damian Conway. All Rights Reserved.
+Filter::Simple is now maintained by the Perl5-Porters.
+Please submit bug via the C<perlbug> tool that comes with your perl.
+For usage instructions, read C<perldoc perlbug> or possibly C<man perlbug>.
+For mostly anything else, please contact E<lt>perl5-porters@perl.orgE<gt>.
+
+Maintainer of the CPAN release is Steffen Mueller E<lt>smueller@cpan.orgE<gt>.
+Contact him with technical difficulties with respect to the packaging of the
+CPAN module.
+
+Praise of the module, flowers, and presents still go to the author,
+Damian Conway E<lt>damian@conway.orgE<gt>.
+
+=head1 COPYRIGHT AND LICENSE
+
+ Copyright (c) 2000-2008, Damian Conway. All Rights Reserved.
This module is free software. It may be used, redistributed
and/or modified under the same terms as Perl itself.
==== //depot/maint-5.8/perl/lib/Filter/Simple/Changes#3 (text) ====
Index: perl/lib/Filter/Simple/Changes
--- perl/lib/Filter/Simple/Changes#2~25381~ 2005-09-10 14:18:44.000000000 -0700
+++ perl/lib/Filter/Simple/Changes 2008-10-20 12:55:16.000000000 -0700
@@ -105,3 +105,10 @@
- Fixed INSTALLDIRS=>perl in Makefile.PL (thanks all)
- Fixed other problems caused by de-schwernification
+
+
+0.83 Sat Oct 18 18:51:51 CET 2008
+
+ - Updated contact details: Maintained by the Perl5-Porters.
+ - Some tiny distribution fixes.
+
==== //depot/maint-5.8/perl/lib/IPC/Open2.pm#3 (text) ====
Index: perl/lib/IPC/Open2.pm
--- perl/lib/IPC/Open2.pm#2~25371~ 2005-09-10 07:20:14.000000000 -0700
+++ perl/lib/IPC/Open2.pm 2008-10-20 12:55:16.000000000 -0700
@@ -6,7 +6,7 @@
require 5.000;
require Exporter;
-$VERSION = 1.02;
+$VERSION = 1.03;
@ISA = qw(Exporter);
@EXPORT = qw(open2);
@@ -28,6 +28,9 @@
# or without using the shell
$pid = open2($chld_out, $chld_in, 'some', 'cmd', 'and', 'args');
+ waitpid( $pid, 0 );
+ my $child_exit_status = $? >> 8;
+
=head1 DESCRIPTION
The open2() function runs the given $cmd and connects $chld_out for
==== //depot/maint-5.8/perl/lib/IPC/Open3.pm#8 (text) ====
Index: perl/lib/IPC/Open3.pm
--- perl/lib/IPC/Open3.pm#7~34538~ 2008-10-20 12:38:15.000000000 -0700
+++ perl/lib/IPC/Open3.pm 2008-10-20 12:55:16.000000000 -0700
@@ -26,6 +26,9 @@
$pid = open3($wtr, $rdr, $err,
'some cmd and args', 'optarg', ...);
+ waitpid( $pid, 0 );
+ my $child_exit_status = $? >> 8;
+
=head1 DESCRIPTION
Extremely similar to open2(), open3() spawns the given $cmd and
==== //depot/maint-5.8/perl/perl.c#234 (text) ====
Index: perl/perl.c
--- perl/perl.c#233~34298~ 2008-09-06 07:47:42.000000000 -0700
+++ perl/perl.c 2008-10-20 12:55:16.000000000 -0700
@@ -1,7 +1,7 @@
/* perl.c
*
- * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- * 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by Larry Wall and others
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ * 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
@@ -3399,7 +3399,7 @@
#endif
PerlIO_printf(PerlIO_stdout(),
- "\n\nCopyright 1987-2007, Larry Wall\n");
+ "\n\nCopyright 1987-2008, Larry Wall\n");
#ifdef MACOS_TRADITIONAL
PerlIO_printf(PerlIO_stdout(),
"\nMac OS port Copyright 1991-2002, Matthias Neeracher;\n"
==== //depot/maint-5.8/perl/pod/perldsc.pod#4 (text) ====
Index: perl/pod/perldsc.pod
--- perl/pod/perldsc.pod#3~30468~ 2007-03-05 10:08:59.000000000 -0800
+++ perl/pod/perldsc.pod 2008-10-20 12:55:16.000000000 -0700
@@ -71,8 +71,8 @@
=head1 REFERENCES
X<reference> X<dereference> X<dereferencing> X<pointer>
-The most important thing to understand about all data structures in Perl
--- including multidimensional arrays--is that even though they might
+The most important thing to understand about all data structures in
+Perl--including multidimensional arrays--is that even though they might
appear otherwise, Perl C<@ARRAY>s and C<%HASH>es are all internally
one-dimensional. They can hold only scalar values (meaning a string,
number, or a reference). They cannot directly contain other arrays or
==== //depot/maint-5.8/perl/pod/perlfunc.pod#115 (text) ====
Index: perl/pod/perlfunc.pod
--- perl/pod/perlfunc.pod#114~34462~ 2008-10-05 09:38:51.000000000 -0700
+++ perl/pod/perlfunc.pod 2008-10-20 12:55:16.000000000 -0700
@@ -1890,25 +1890,27 @@
Here's a mailbox appender for BSD systems.
- use Fcntl ':flock'; # import LOCK_* constants
+ use Fcntl qw(:flock SEEK_END); # import LOCK_* and SEEK_END constants
sub lock {
- flock(MBOX,LOCK_EX);
- # and, in case someone appended
- # while we were waiting...
- seek(MBOX, 0, 2);
+ my ($fh) = @_;
+ flock($fh, LOCK_EX) or die "Cannot lock mailbox - $!\n";
+
+ # and, in case someone appended while we were waiting...
+ seek($fh, 0, SEEK_END) or die "Cannot seek - $!\n";
}
sub unlock {
- flock(MBOX,LOCK_UN);
+ my ($fh) = @_;
+ flock($fh, LOCK_UN) or die "Cannot unlock mailbox - $!\n";
}
open(my $mbox, ">>", "/usr/spool/mail/$ENV{'USER'}")
or die "Can't open mailbox: $!";
- lock();
+ lock($mbox);
print $mbox $msg,"\n\n";
- unlock();
+ unlock($mbox);
On systems that support a real flock(), locks are inherited across fork()
calls, whereas those that must resort to the more capricious fcntl()
==== //depot/maint-5.8/perl/pod/perlopentut.pod#12 (text) ====
Index: perl/pod/perlopentut.pod
--- perl/pod/perlopentut.pod#11~33805~ 2008-05-10 08:40:07.000000000 -0700
+++ perl/pod/perlopentut.pod 2008-10-20 12:55:16.000000000 -0700
@@ -165,6 +165,33 @@
library will handle this for you. Check out
L<perlipc/"Bidirectional Communication with Another Process">
+perl-5.6.x introduced a version of piped open that executes a process
+based on its command line arguments without relying on the shell. (Similar
+to the C<system(@LIST)> notation.) This is safer and faster than executing
+a single argument pipe-command, but does not allow special shell
+constructs. (It is also not supported on Microsoft Windows, Mac OS Classic
+or RISC OS.)
+
+Here's an example of C<open '-|'>, which prints a random Unix
+fortune cookie as uppercase:
+
+ my $collection = shift(@ARGV);
+ open my $fortune, '-|', 'fortune', $collection
+ or die "Could not find fortune - $!";
+ while (<$fortune>)
+ {
+ print uc($_);
+ }
+ close($fortune);
+
+And this C<open '|-'> pipes into lpr:
+
+ open my $printer, '|-', 'lpr', '-Plp1'
+ or die "can't run lpr: $!";
+ print {$printer} "stuff\n";
+ close($printer)
+ or die "can't close lpr: $!";
+
=head2 The Minus File
Again following the lead of the standard shell utilities, Perl's
==== //depot/maint-5.8/perl/pod/perltodo.pod#51 (text) ====
Index: perl/pod/perltodo.pod
--- perl/pod/perltodo.pod#50~34346~ 2008-09-11 08:16:28.000000000 -0700
+++ perl/pod/perltodo.pod 2008-10-20 12:55:16.000000000 -0700
@@ -883,6 +883,23 @@
These tasks would need C knowledge, and knowledge of how the interpreter works,
or a willingness to learn.
+=head2 error reporting of [$a ; $b]
+
+Using C<;> inside brackets is a syntax error, and we don't propose to change
+that by giving it any meaning. However, it's not reported very helpfully:
+
+ $ perl -e '$a = [$b; $c];'
+ syntax error at -e line 1, near "$b;"
+ syntax error at -e line 1, near "$c]"
+ Execution of -e aborted due to compilation errors.
+
+It should be possible to hook into the tokeniser or the lexer, so that when a
+C<;> is parsed where it is not legal as a statement terminator (ie inside
+C<{}> used as a hashref, C<[]> or C<()>) it issues an error something like
+I<';' isn't legal inside an expression - if you need multiple statements use a
+do {...} block>. See the thread starting at
+http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2008-09/msg00573.html
+
=head2 UTF-8 revamp
The handling of Unicode is unclean in many places. For example, the regexp
End of Patch.
-
Change 34539: Integrate:
by Nicholas Clark