Front page | perl.perl5.changes |
Postings from May 2008
Change 33932: Integrate:
From:
Nicholas Clark
Date:
May 25, 2008 16:15
Subject:
Change 33932: Integrate:
Change 33932 by nicholas@mouse-mill on 2008/05/25 23:00:21
Integrate:
[ 33884]
Integrate:
[ 33827]
Subject: [PATCH] fix typo in a Tie::Hash documentation link
From: Niko Tyni <ntyni@debian.org>
Date: Wed, 14 May 2008 23:09:27 +0300
Message-Id: <1210795767-21221-1-git-send-email-ntyni@debian.org>
[ 33830]
Add investigating eliminating POSIX::int_macro_int() to perltodo.
[ 33832]
HP 9000 End of Sale Announcements
[ 33834]
Subject: Make perlfunc link to the correct section of perlop for q//, qq//, qx//, and qw//
From: Matt Kraai <kraai@ftbfs.org>
Date: Thu, 15 May 2008 15:45:17 -0700
Message-ID: <20080515224517.GA11692@ftbfs.org>
[ 33840]
Subject: [perl #39187] [DOC-PATCH]: perldoc -f reverse: examples (was: RE: Perlfunc needs to be made more clear regarding reverse in scalar context.)
From: "Bram via RT" <perlbug-followup@perl.org>
Date: Fri, 16 May 2008 14:44:07 -0700
Message-ID: <rt-3.6.HEAD-9880-1210974244-1717.39187-15-0@perl.org>
[ 33841]
Subject: [PATCH] Re: Compiling perl (5.10.x) with gcc <= 3.2.3
From: Andy Dougherty <doughera@lafayette.edu>
Date: Fri, 16 May 2008 13:59:41 -0400 (EDT)
Message-ID: <Pine.LNX.4.64.0805161344570.10409@fractal.phys.lafayette.edu>
[ 33848]
Subject: Re: eval "require Foo" with binary-incompatible XS modules
From: Niko Tyni <ntyni@debian.org>
Date: Sat, 17 May 2008 21:37:30 +0300
Message-ID: <20080517183730.GA4440@rebekka>
[ 33852]
New separations for the pattern match operator documentation,
suggested by David Nicol:
Subject: It's wafer thin!
From: "David Nicol" <davidnicol@gmail.com>
Date: Fri, 9 May 2008 18:14:29 +0000
Message-ID: <934f64a20805091114y40595f9ap9d355b39f20779c1@mail.gmail.com>
[ 33853]
fix misleading comment about Perl_re_dup_guts
[ 33865]
Add "profile installman" to the TODO.
[ 33895]
Integrate:
[ 33849]
Subject: [perl #38955] exists(): error message on wrong argument type is incorrect (5.8.7 cygwin)
From: "Bram via RT" <perlbug-followup@perl.org>
Date: Sat, 17 May 2008 04:14:11 -0700
Message-ID: <rt-3.6.HEAD-11257-1211022849-1634.38955-15-0@perl.org>
[ 33891]
metabatman fails the "this patch is self-documenting" test. Restore
(roughly) the original parameter names.
Affected files ...
... //depot/maint-5.8/perl/INSTALL#51 integrate
... //depot/maint-5.8/perl/README.hpux#18 integrate
... //depot/maint-5.8/perl/hv.h#37 integrate
... //depot/maint-5.8/perl/lib/Tie/Hash.pm#8 integrate
... //depot/maint-5.8/perl/op.c#231 integrate
... //depot/maint-5.8/perl/pod/perldiag.pod#107 integrate
... //depot/maint-5.8/perl/pod/perlfunc.pod#111 integrate
... //depot/maint-5.8/perl/pod/perlop.pod#39 integrate
... //depot/maint-5.8/perl/pod/perltodo.pod#46 integrate
... //depot/maint-5.8/perl/regcomp.c#119 integrate
Differences ...
==== //depot/maint-5.8/perl/INSTALL#51 (text) ====
Index: perl/INSTALL
--- perl/INSTALL#50~33192~ 2008-02-02 08:53:33.000000000 -0800
+++ perl/INSTALL 2008-05-25 16:00:21.000000000 -0700
@@ -1893,6 +1893,13 @@
tries to exercise the regular expression subsystem quite thoroughly,
and may well be far more demanding than your normal usage.
+=item libgcc_s.so.1: cannot open shared object file
+
+This message has been reported on gcc-3.2.3 and earlier installed with
+a non-standard prefix. Setting the LD_LIBRARY_PATH environment variable
+(or equivalent) to include gcc's lib/ directory with the libgcc_s.so.1
+shared library should fix the problem.
+
=item Failures from lib/File/Temp/t/security saying "system possibly insecure"
First, such warnings are not necessarily serious or indicative of a
==== //depot/maint-5.8/perl/README.hpux#18 (text) ====
Index: perl/README.hpux
--- perl/README.hpux#17~33805~ 2008-05-10 08:40:07.000000000 -0700
+++ perl/README.hpux 2008-05-25 16:00:21.000000000 -0700
@@ -87,11 +87,11 @@
document will not attempt to address issues for compiling Perl on the
Motorola chipset.
-The most recent version of PA-RISC at the time of this document's last
-update is 2.0. HP PA-RISC systems are usually refered to with model
-description "HP 9000". The last CPU in this series is the PA-8900.
-Support for PA-RISC architectured machines officially ends as shown
-in the following table:
+The version of PA-RISC at the time of this document's last update is 2.0,
+which is also the last there will be. HP PA-RISC systems are usually
+refered to with model description "HP 9000". The last CPU in this series
+is the PA-8900. Support for PA-RISC architectured machines officially
+ends as shown in the following table:
PA-RISC End-of-Life Roadmap
+--------+----------------+----------------+-----------------+
@@ -114,6 +114,13 @@
| cores | | PA-8900/rp34x0 | 2014 |
+--------+----------------+----------------+-----------------+
+From http://www.hp.com/products1/evolution/9000/eol_announcement.html:
+
+ The last order date for HP9000 PA-RISC systems is planned for
+ December 31, 2008 and ship date of April 1, 2009. Operating system
+ releases for HP-UX will continue shipping past the HP9000 systems
+ last order date.
+
A complete list of models at the time the OS was built is in the file
/usr/sam/lib/mo/sched.models. The first column corresponds to the last
part of the output of the "model" command. The second column is the
@@ -641,6 +648,6 @@
=head1 DATE
-Version 0.8.1: 2008-02-06
+Version 0.8.2: 2008-05-16
=cut
==== //depot/maint-5.8/perl/hv.h#37 (text) ====
Index: perl/hv.h
--- perl/hv.h#36~33805~ 2008-05-10 08:40:07.000000000 -0700
+++ perl/hv.h 2008-05-25 16:00:21.000000000 -0700
@@ -351,42 +351,42 @@
/* These don't exist for 5.8.x, but there will be fewer merge conflicts in
various *ish.h headers if they are defined as no-ops. */
-#define hv_store_ent(zlonk, awk, touche, zgruppp) \
- ((HE *) hv_common((zlonk), (awk), NULL, 0, 0, HV_FETCH_ISSTORE, \
- (touche), (zgruppp)))
+#define hv_store_ent(hv, keysv, val, hash) \
+ ((HE *) hv_common((hv), (keysv), NULL, 0, 0, HV_FETCH_ISSTORE, \
+ (val), (hash)))
-#define hv_exists_ent(zlonk, awk, zgruppp) \
- (hv_common((zlonk), (awk), NULL, 0, 0, HV_FETCH_ISEXISTS, 0, (zgruppp))\
+#define hv_exists_ent(hv, keysv, hash) \
+ (hv_common((hv), (keysv), NULL, 0, 0, HV_FETCH_ISEXISTS, 0, (hash)) \
? TRUE : FALSE)
-#define hv_fetch_ent(zlonk, awk, touche, zgruppp) \
- ((HE *) hv_common((zlonk), (awk), NULL, 0, 0, \
- ((touche) ? HV_FETCH_LVALUE : 0), NULL, (zgruppp)))
-#define hv_delete_ent(zlonk, awk, touche, zgruppp) \
- ((SV *) hv_common((zlonk), (awk), NULL, 0, 0, (touche) | HV_DELETE, \
- NULL, (zgruppp)))
-
-#define hv_store_flags(urkk, zamm, clunk, thwape, sploosh, eee_yow) \
- ((SV**) hv_common((urkk), NULL, (zamm), (clunk), (eee_yow), \
- (HV_FETCH_ISSTORE|HV_FETCH_JUST_SV), (thwape), \
- (sploosh)))
+#define hv_fetch_ent(hv, keysv, lval, hash) \
+ ((HE *) hv_common((hv), (keysv), NULL, 0, 0, \
+ ((lval) ? HV_FETCH_LVALUE : 0), NULL, (hash)))
+#define hv_delete_ent(hv, key, flags, hash) \
+ ((SV *) hv_common((hv), (key), NULL, 0, 0, (flags) | HV_DELETE, \
+ NULL, (hash)))
+
+#define hv_store_flags(hv, key, klen, val, hash, flags) \
+ ((SV**) hv_common((hv), NULL, (key), (klen), (flags), \
+ (HV_FETCH_ISSTORE|HV_FETCH_JUST_SV), (val), \
+ (hash)))
-#define hv_store(urkk, zamm, clunk, thwape, sploosh) \
- ((SV**) hv_common_key_len((urkk), (zamm), (clunk), \
+#define hv_store(hv, key, klen, val, hash) \
+ ((SV**) hv_common_key_len((hv), (key), (klen), \
(HV_FETCH_ISSTORE|HV_FETCH_JUST_SV), \
- (thwape), (sploosh)))
+ (val), (hash)))
-#define hv_exists(urkk, zamm, clunk) \
- (hv_common_key_len((urkk), (zamm), (clunk), HV_FETCH_ISEXISTS, NULL, 0) \
+#define hv_exists(hv, key, klen) \
+ (hv_common_key_len((hv), (key), (klen), HV_FETCH_ISEXISTS, NULL, 0) \
? TRUE : FALSE)
-#define hv_fetch(urkk, zamm, clunk, pam) \
- ((SV**) hv_common_key_len((urkk), (zamm), (clunk), (pam) \
+#define hv_fetch(hv, key, klen, lval) \
+ ((SV**) hv_common_key_len((hv), (key), (klen), (lval) \
? (HV_FETCH_JUST_SV | HV_FETCH_LVALUE) \
: HV_FETCH_JUST_SV, NULL, 0))
-#define hv_delete(urkk, zamm, clunk, pam) \
- ((SV*) hv_common_key_len((urkk), (zamm), (clunk), \
- (pam) | HV_DELETE, NULL, 0))
+#define hv_delete(hv, key, klen, flags) \
+ ((SV*) hv_common_key_len((hv), (key), (klen), \
+ (flags) | HV_DELETE, NULL, 0))
#define HINTS_REFCNT_INIT NOOP
#define HINTS_REFCNT_TERM NOOP
==== //depot/maint-5.8/perl/lib/Tie/Hash.pm#8 (text) ====
Index: perl/lib/Tie/Hash.pm
--- perl/lib/Tie/Hash.pm#7~30539~ 2007-03-10 10:15:47.000000000 -0800
+++ perl/lib/Tie/Hash.pm 2008-05-25 16:00:21.000000000 -0700
@@ -173,7 +173,7 @@
C<SCALAR> is only defined in B<Tie::StdHash> and B<Tie::ExtraHash>.
If needed, these methods should be defined by the package inheriting from
-B<Tie::Hash>, B<Tie::StdHash>, or B<Tie::ExtraHash>. See L<pertie/"SCALAR">
+B<Tie::Hash>, B<Tie::StdHash>, or B<Tie::ExtraHash>. See L<perltie/"SCALAR">
to find out what happens when C<SCALAR> does not exist.
=head1 MORE INFORMATION
==== //depot/maint-5.8/perl/op.c#231 (text) ====
Index: perl/op.c
--- perl/op.c#230~33866~ 2008-05-19 07:57:58.000000000 -0700
+++ perl/op.c 2008-05-25 16:00:21.000000000 -0700
@@ -5400,7 +5400,7 @@
else if (kid->op_type == OP_AELEM)
o->op_flags |= OPf_SPECIAL;
else if (kid->op_type != OP_HELEM)
- Perl_croak(aTHX_ "%s argument is not a HASH or ARRAY element",
+ Perl_croak(aTHX_ "%s argument is not a HASH or ARRAY element or a subroutine",
OP_DESC(o));
op_null(kid);
}
==== //depot/maint-5.8/perl/pod/perldiag.pod#107 (text) ====
Index: perl/pod/perldiag.pod
--- perl/pod/perldiag.pod#106~32394~ 2007-11-18 14:16:34.000000000 -0800
+++ perl/pod/perldiag.pod 2008-05-25 16:00:21.000000000 -0700
@@ -131,7 +131,7 @@
(F) msgsnd() requires a string at least as long as sizeof(long).
-=item %s argument is not a HASH or ARRAY element
+=item %s argument is not a HASH or ARRAY element or a subroutine
(F) The argument to exists() must be a hash or array element, such as:
==== //depot/maint-5.8/perl/pod/perlfunc.pod#111 (text) ====
Index: perl/pod/perlfunc.pod
--- perl/pod/perlfunc.pod#110~33805~ 2008-05-10 08:40:07.000000000 -0700
+++ perl/pod/perlfunc.pod 2008-05-25 16:00:21.000000000 -0700
@@ -1514,6 +1514,10 @@
is implemented. It is also Perl's exception trapping mechanism, where
the die operator is used to raise exceptions.
+If you want to trap errors when loading an XS module, some problems with
+the binary interface (such as Perl version skew) may be fatal even with
+C<eval> unless C<$ENV{PERL_DL_NONLAZY}> is set. See L<perlrun>.
+
If the code to be executed doesn't vary, you may use the eval-BLOCK
form to trap run-time errors without incurring the penalty of
recompiling each time. The error, if any, is still returned in C<$@>.
@@ -4088,13 +4092,15 @@
=item qq/STRING/
-=item qr/STRING/
-
=item qx/STRING/
=item qw/STRING/
-Generalized quotes. See L<perlop/"Regexp Quote-Like Operators">.
+Generalized quotes. See L<perlop/"Quote-Like Operators">.
+
+=item qr/STRING/
+
+Regexp-like quote. See L<perlop/"Regexp Quote-Like Operators">.
=item quotemeta EXPR
X<quotemeta> X<metacharacter>
@@ -4588,13 +4594,16 @@
elements of LIST and returns a string value with all characters
in the opposite order.
- print reverse <>; # line tac, last line first
+ print join(", ", reverse "world", "Hello"); # Hello, world
- undef $/; # for efficiency of <>
- print scalar reverse <>; # character tac, last line tsrif
+ print scalar reverse "dlrow ,", "olleH"; # Hello, world
Used without arguments in scalar context, reverse() reverses C<$_>.
+ $_ = "dlrow ,olleH";
+ print reverse; # No output, list context
+ print scalar reverse; # Hello, world
+
This operator is also handy for inverting a hash, although there are some
caveats. If a value is duplicated in the original hash, only one of those
can be represented as a key in the inverted hash. Also, this has to
==== //depot/maint-5.8/perl/pod/perlop.pod#39 (text) ====
Index: perl/pod/perlop.pod
--- perl/pod/perlop.pod#38~33805~ 2008-05-10 08:40:07.000000000 -0700
+++ perl/pod/perlop.pod 2008-05-25 16:00:21.000000000 -0700
@@ -1135,6 +1135,8 @@
that you won't change the variables in the pattern. If you change them,
Perl won't even notice. See also L<"qr/STRING/msixo">.
+=item The empty pattern //
+
If the PATTERN evaluates to the empty string, the last
I<successfully> matched regular expression is used instead. In this
case, only the C<g> and C<c> flags on the empty pattern is honoured -
@@ -1142,6 +1144,8 @@
previously succeeded, this will (silently) act instead as a genuine
empty pattern (which will always match).
+=item Matching in list context
+
If the C</g> option is not used, C<m//> in list context returns a
list consisting of the subexpressions matched by the parentheses in the
pattern, i.e., (C<$1>, C<$2>, C<$3>...). (Note that here C<$1> etc. are
@@ -1188,6 +1192,8 @@
by adding the C</c> modifier (e.g. C<m//gc>). Modifying the target
string also resets the search position.
+=item \G assertion
+
You can intermix C<m//g> matches with C<m/\G.../g>, where C<\G> is a
zero-width assertion that matches the exact position where the previous
C<m//g>, if any, left off. Without the C</g> modifier, the C<\G> assertion
==== //depot/maint-5.8/perl/pod/perltodo.pod#46 (text) ====
Index: perl/pod/perltodo.pod
--- perl/pod/perltodo.pod#45~33922~ 2008-05-25 12:51:20.000000000 -0700
+++ perl/pod/perltodo.pod 2008-05-25 16:00:21.000000000 -0700
@@ -208,6 +208,13 @@
There's a similar problem with SelfLoader.
+=head2 profile installman
+
+The F<installman> script is slow. All it is doing text processing, which we're
+told is something Perl is good at. So it would be nice to know what it is doing
+that is taking so much CPU, and where possible address it.
+
+
=head1 Tasks that need a little sysadmin-type knowledge
Or if you prefer, tasks that you would learn from, and broaden your skills
@@ -446,6 +453,8 @@
want to determine what ops I<really> are the most commonly used. And in turn
suggest evictions and promotions to achieve a better F<pp_hot.c>.
+One piece of Perl code that might make a good testbed is F<installman>.
+
=head2 Allocate OPs from arenas
Currently all new OP structures are individually malloc()ed and free()d.
@@ -551,6 +560,18 @@
the perl API that comes from writing modules that use XS to interface to
C.
+=head2 investigate removing int_macro_int from POSIX.xs
+
+As a hang over from the original C<constant> implementation, F<POSIX.xs>
+contains a function C<int_macro_int> which in conjunction with C<AUTOLOAD> is
+used to wrap the C functions C<WEXITSTATUS>, C<WIFEXITED>, C<WIFSIGNALED>,
+C<WIFSTOPPED>, C<WSTOPSIG> and C<WTERMSIG>. It's probably worth replacing
+this complexity with 5 simple direct wrappings of those 5 functions.
+
+However, it would be interesting if someone could measure the memory usage
+before and after, both for the case of C<use POSIX();> and the case of
+actually calling the Perl space functions.
+
=head2 safely supporting POSIX SA_SIGINFO
Some years ago Jarkko supplied patches to provide support for the POSIX
==== //depot/maint-5.8/perl/regcomp.c#119 (text) ====
Index: perl/regcomp.c
--- perl/regcomp.c#118~33435~ 2008-03-04 11:15:14.000000000 -0800
+++ perl/regcomp.c 2008-05-25 16:00:21.000000000 -0700
@@ -4817,8 +4817,8 @@
/*
re_dup - duplicate a regexp.
- This routine is expected to clone a given regexp structure. It is not
- compiler under USE_ITHREADS.
+ This routine is expected to clone a given regexp structure. It is only
+ compiled under USE_ITHREADS.
See pregfree() above if you change anything here.
*/
End of Patch.
-
Change 33932: Integrate:
by Nicholas Clark