Nicholas Clark [Tue, 28 Dec 2010 09:50:49 +0000 (09:50 +0000)]
As report_evil_fh() checks WARN_{CLOSED,UNOPENED}, don't duplicate this.
This trades reduced code size for an extra function call in the error path with
warnings disabled. (And removes a duplicated check for the case of taking the
error path *with* warnings enabled.)
Removing the check from Perl_do_close() does not change behaviour, as io is
NULL there, hence Perl_report_evil_fh() will always be checking WARN_UNOPENED
and setting vile to "unopened".
Nicholas Clark [Tue, 28 Dec 2010 09:30:31 +0000 (09:30 +0000)]
As report_wrongway_fh() checks ckWARN(WARN_IO) internally, don't duplicate this.
This trades reduced code size for an extra function call in the error path with
warnings disabled. (And removes a duplicated check for the case of taking the
error path *with* warnings enabled.)
Nicholas Clark [Tue, 28 Dec 2010 09:20:43 +0000 (09:20 +0000)]
Remove OP_phoney_{IN,OUT}PUT_ONLY, as they are no longer used or supported.
Nicholas Clark [Tue, 28 Dec 2010 09:09:44 +0000 (09:09 +0000)]
Argument op to report_evil_fh() is always PL_op->op_type, so need not be passed
Nicholas Clark [Tue, 28 Dec 2010 08:56:36 +0000 (08:56 +0000)]
The io argument to report_evil_fh() is always GvIO(gv), so need not be passed.
Nicholas Clark [Tue, 28 Dec 2010 07:55:45 +0000 (07:55 +0000)]
Extract the OP_phoney_* code from report_evil_fh() into report_wrongway_fh()
Previously Perl_report_evil_fh()'s body was just an if/else at the top level -
a good sign that it is actually implementing two disjoint functions.
Nicholas Clark [Tue, 28 Dec 2010 08:32:44 +0000 (08:32 +0000)]
In pp_sockpair, remove duplication of code to close the supplied file handles.
It's not necessary to (also) test gv1 and gv2 before returning undef as an
error, because io1 will automatically be NULL if gv1 is NULL, and similarly
io2 if gv2 is.
Nicholas Clark [Tue, 28 Dec 2010 08:19:03 +0000 (08:19 +0000)]
Fix typo in warning code added to pp_sockpair in
c289d2f7288798f8.
That should be gv2, not gv1. However, I believe that it's impossible to reach
the warning code, given the structure of the optree that the perl 5
implementation produces, as gv1 and gv2 will never be NULL, and GvIOn() will
always return non-NULL. (Or croak, but that won't return).
Tony Cook [Tue, 28 Dec 2010 02:58:29 +0000 (13:58 +1100)]
avoid undefined behaviour in fetch and modify of SP from
0a0e3cc51e
pp_sys.c: In function ‘Perl_pp_send’:
pp_sys.c:1845: warning: operation on ‘sp’ may be undefined
David Golden [Mon, 27 Dec 2010 19:50:31 +0000 (14:50 -0500)]
Add CPAN::Meta::YAML as a dual-life core module
Nicholas Clark [Mon, 27 Dec 2010 19:11:26 +0000 (19:11 +0000)]
Simplify return handling for tied handle OPEN/PRINTF/READ/WRITE.
Their code used to explicitly move the return value from its current position
on the stack, to the position that was top of top of the stack just before the
call was made. However, the POPBLOCK() in pp_leavesub will restore the stack
pointer, and passing G_SCALAR to call_method() will force exactly one return
value, so all of this is needless defensiveness.
Nicholas Clark [Mon, 27 Dec 2010 13:09:02 +0000 (13:09 +0000)]
A perldelta entry describing the refactoring of the chop/chomp implementation.
Nicholas Clark [Mon, 27 Dec 2010 12:56:12 +0000 (12:56 +0000)]
Move do_chomp() from pp.c to doop.c, and make it static.
It was never part of the public API, and only ever used by pp_{s,}cho{,m}p.
Nicholas Clark [Mon, 27 Dec 2010 11:41:10 +0000 (11:41 +0000)]
Merge the opcode bodies for chop/chomp and schop/schomp.
Nicholas Clark [Mon, 27 Dec 2010 08:58:19 +0000 (08:58 +0000)]
Merge Perl_do_chop() and Perl_do_chomp().
They share code for dealing with PVAVs, PVHVs, read only values and handling
PL_encoding. They are not part of the public API, and Google codesearch shows
no users outside the core.
Nicholas Clark [Mon, 27 Dec 2010 08:22:21 +0000 (08:22 +0000)]
Convert Perl_do_chomp() to the same prototype as Perl_do_chop().
Pass in an SV to hold the count, rather than returning the count.
Nicholas Clark [Mon, 27 Dec 2010 08:09:15 +0000 (08:09 +0000)]
Refactor pp_chomp to process arguments in the same order as pp_chop.
Previously list chomp worked from last to first, whilst list chop worked from
first to last.
Nicholas Clark [Mon, 27 Dec 2010 07:42:45 +0000 (07:42 +0000)]
Fix links (and hence the podchecker test) after
cce04bebd8af026c.
Zsbán Ambrus [Mon, 27 Dec 2010 02:10:57 +0000 (18:10 -0800)]
[perl #81016] Document ord("")
The following patch clarifies what ord("") does in pod/perlfunc.pod.
From the current documentation, it's not documented what it does, and one
could guess several different things: returns zero, returns undef, returns
zero with a warning, returns undef with a warning, dies. (There's precedent
for dying: some BASIC implementations give an error if you ask for ASC("")
-- here ASC is their equivalent of our ord function.)
Jerry D. Hedden [Fri, 24 Dec 2010 17:53:28 +0000 (12:53 -0500)]
Upgrade to Thread::Queue 2.12
Jerry D. Hedden [Fri, 24 Dec 2010 17:49:12 +0000 (12:49 -0500)]
Upgrade to Thread::Semaphore 2.12
David Golden [Mon, 13 Dec 2010 22:36:33 +0000 (17:36 -0500)]
Reorganize perlhack.pod
Following on an IRC conversation, I've attempted to reorganize
perlhack for greater clarity. I have only cut and paste blocks
of text and amended section titles and levels. (I have not addressed
any of the numerous factual issues which remain.)
The resulting guide should be clearer for those trying to skim the
table of contents to understand what is covered in perlhack and
whether it is worth an in-depth read.
I see this change as the first step towards future improvements.
David Leadbeater [Sun, 26 Dec 2010 22:40:56 +0000 (14:40 -0800)]
[perl #81218] Note that perlbug to p5p is subject to moderation
Peter John Acklam [Thu, 16 Dec 2010 14:54:39 +0000 (15:54 +0100)]
Calc.pm: Fix _modpow() part of RT#63237
Peter John Acklam [Sun, 26 Dec 2010 21:45:54 +0000 (13:45 -0800)]
Fix RT 62764: Math::BigFloat->bcmp() fails.
Why: The Math::BigFloat->bcmp() method returns the wrong result when the
exponent is too large to be represented exactly as a Perl numerical
scalar. In such cases, bcmp() returns 0 because it fails to distinguish
between the two exponents.
How: With this fix, bcmp() does not convert the exponents to Perl
numerical scalars, but keeps them as arbitrary precision integers, thus
returning the correct result regardsless of the number of digits in the
exponent.
Test: Two tests added. These tests fail with the old code.
Files:
- lib/Math/BigFloat.pm: New version of bcmp().
- t/bigfltpm.inc: Add two tests confirming desired behaviour.
- t/bare_mbf.t: Increment test count.
- t/bigfltpm.t: Increment test count.
- t/sub_mbf.t: Increment test count.
- t/with_sub.t Increment test count.
Peter John Acklam [Sun, 26 Dec 2010 21:17:16 +0000 (13:17 -0800)]
Fix RT 25274: Math::BigInt::Calc->_num() overflow.
Why: Math::BigInt::Calc->_num() converts a big integer (in the internal
format) to a Perl scalar. If the big integer is too large to be
represented as a Perl scalar, it might return a Perl scalar numeric
"nan", rather than "inf". The reason is that the current algorithm might
multiply "inf" by "0", giving a "nan" which propagates. The following
example illustrates the bug:
perl -MMath::BigInt=lib,Calc -wle \
'print Math::BigInt->new("
1e999999")->numify()'
How: This fix computes the output in a different way, never multiply
"inf" by "0".
Test: It is not obvious to me how to test this automatically in a
portable way, since Perl has no standard way of stringifying a scalar
numeric infinity. However the desired behaviour is verified manually and
no existing tests fail with the new code.
Chris 'BinGOs' Williams [Fri, 24 Dec 2010 22:32:46 +0000 (22:32 +0000)]
Update perldelta for threads and threads::shared
Jerry D. Hedden [Fri, 24 Dec 2010 22:29:14 +0000 (22:29 +0000)]
[PATCH] Upgrade to threads::shared 1.36
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
Jerry D. Hedden [Fri, 24 Dec 2010 22:27:58 +0000 (22:27 +0000)]
[PATCH] Upgrade to threads 1.82
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
Vincent Pit [Thu, 23 Dec 2010 17:03:00 +0000 (18:03 +0100)]
Quote 'threads' in test.pl
If unquoted, it may throw a warning when threads.pm can't be loaded.
Chris 'BinGOs' Williams [Thu, 23 Dec 2010 15:29:31 +0000 (15:29 +0000)]
Update Encode to CPAN version 2.41
[DELTA]
$Revision: 2.41 $ $Date: 2010/12/23 11:05:58 $
lib/Encode/MIME/Header.pm
Applied: RT#63387 encode of MIME-Header inserts too much whitespace
http://rt.cpan.org/Ticket/Display.html?id=63387
t/Aliases.t lib/Encode/Alias.pm
Applied: RT#63286: Various Encode::Alias improvements
http://rt.cpan.org/Ticket/Display.html?id=63286
Zefram [Wed, 22 Dec 2010 20:39:54 +0000 (20:39 +0000)]
update RMG discussion of post-release actions
use.perl.org is dead. www.cpan.org is maintained by Ask, not Jarkko
any more. Separate CPAN/src and www.cpan.org issues into distinct steps.
Nicholas Clark [Tue, 21 Dec 2010 16:55:38 +0000 (16:55 +0000)]
Fix IS_UTF8_CHAR() to recognise start bytes 0xF5, 0xF6, 0xF7.
The refactoring of
3b0fc154d4e77cfb inadvertently introduced a bug
in Perl_is_utf8_char() and its callers, such as Perl_is_utf8_string(),
whereby the beyond-Unicode characters 0x140000 to 0x1fffff were no longer
recognised as valid.
Nicholas Clark [Tue, 21 Dec 2010 16:38:24 +0000 (16:38 +0000)]
Convert lib/utf8.t to strict and warnings throughout.
Nicholas Clark [Tue, 21 Dec 2010 16:31:30 +0000 (16:31 +0000)]
Re-sort MANIFEST after
a7dcd8d74e57d2a8.
H.Merijn Brand [Tue, 21 Dec 2010 13:38:33 +0000 (14:38 +0100)]
No reference to $Id: in generated files
They might have served a purpose in the original files, but Nicholas
and Zefram expressed their concern that in the generated files, these
tags are misleading and unneeded.
H.Merijn Brand [Tue, 21 Dec 2010 12:57:10 +0000 (13:57 +0100)]
Move metaconfig control comments into its own files
H.Merijn Brand [Tue, 21 Dec 2010 12:01:37 +0000 (13:01 +0100)]
Restore a reference to $perlpath. Installation needs it
cbeaa1895 removed the reference to $perlpath
Jan Dubois [Tue, 21 Dec 2010 09:30:04 +0000 (01:30 -0800)]
sin6_scope_id is supported by Winsock2.
The field is missing in the headers included with VC6, but
commit
1ab9ebc11 adds it in our win32/include/sys/socket.h.
Tony Cook [Tue, 21 Dec 2010 04:02:56 +0000 (15:02 +1100)]
avoid emitting control characters in test comments
Tony Cook [Tue, 21 Dec 2010 04:01:24 +0000 (15:01 +1100)]
multiple watchdog()s in the one test script are meaningless
Craig A. Berry [Tue, 21 Dec 2010 04:06:44 +0000 (22:06 -0600)]
d_sin6_scope_id configuration probe for VMS.
It's present on recent versions, but not all versions. Follow-up
to
f53580fec42f3b12264ee27b756dec257c0bb77a.
Karl Williamson [Thu, 16 Dec 2010 15:44:59 +0000 (08:44 -0700)]
regexec.c: white-space only
Commit
9e2c615305806d76433db342e5659ffeccc3746a didn't adjust the white
space for the changes that it introduced. This patch does that.
Karl Williamson [Thu, 16 Dec 2010 02:22:37 +0000 (19:22 -0700)]
regexec:c Remove unreached code
The new name of ANYOF_LOC_NONBITMAP_FOLD makes it clear that the only
way folding can be aplicable here is if it is under locale.
Karl Williamson [Thu, 16 Dec 2010 01:34:59 +0000 (18:34 -0700)]
Change name of regex intrnl macro to new meaning
ANYOF_FOLD is now used only under fewer conditions. Otherwise the
bitmap of character 0-255 is fully calculated with the folds, and the
flag is not set. One condition is under locale, where the folds aren't
known at compile time; the other is for things accessible through a
swash.
By changing the name to its new meaning, certain optimizations become more
obvious.
H.Merijn Brand [Mon, 20 Dec 2010 16:13:46 +0000 (17:13 +0100)]
Add sin6_scope_id probe (LeoNerd)
Nicholas Clark [Mon, 20 Dec 2010 14:02:39 +0000 (14:02 +0000)]
Tweak IPC-Open3.t to cope with \r\n line endings on Win32.
The refactoring of
bd29e8c290c68f4f to use Test::More broke the tests on Win32,
because it didn't realise that the previous code was relying on the test
harness being line ending agnostic.
Craig A. Berry [Mon, 20 Dec 2010 01:26:28 +0000 (19:26 -0600)]
stdint.h has yet to appear on VMS.
Despite the compiler's claiming C99 compliance. What we probably
really need here is I_STDINT, or perhaps HAVE_INTMAX and
HAVE_UINTMAX, determined by Configure and friends. But in any case
07208e09d4435b4e72743076e0bc290ef4b34911 broke the build, so this
gets it going again for now.
Karl Williamson [Sun, 19 Dec 2010 21:40:34 +0000 (14:40 -0700)]
utf8.c: add to comment
Karl Williamson [Sun, 19 Dec 2010 18:59:31 +0000 (11:59 -0700)]
regexec.c: Remove unnecessary statements
These variables are set to other values just a couple of lines below
Karl Williamson [Sun, 19 Dec 2010 18:37:06 +0000 (11:37 -0700)]
perltodo: Revise utf8 todo
Karl Williamson [Sun, 19 Dec 2010 19:24:07 +0000 (12:24 -0700)]
utf8.c, .h: Clarify pod and comment
Karl Williamson [Sun, 19 Dec 2010 19:24:54 +0000 (12:24 -0700)]
mktables: fix typo in comment
Karl Williamson [Sun, 19 Dec 2010 18:08:47 +0000 (11:08 -0700)]
Change regexes to debug dump non-ASCII as hex.
instead of the less familiar octal for larger values. Perhaps they
should actually print the actual character, but this is far easier than
the previous to understand.
Karl Williamson [Sun, 19 Dec 2010 18:00:49 +0000 (11:00 -0700)]
pv_escape: Add option to dump all non-ascii as hex
This patch adds an option to pv_escape() to dump all characters above ASCII
in hex. Before, you could get all chars as hex or the Latin1 non-ASCII
as octal, whereas the typical values for these that people think in are
given in hex.
Karl Williamson [Sun, 19 Dec 2010 17:53:58 +0000 (10:53 -0700)]
dump.c: correct pod statement
Zefram [Mon, 20 Dec 2010 00:03:17 +0000 (00:03 +0000)]
update TOC for perl5138delta and perl5139delta
Zefram [Sun, 19 Dec 2010 23:59:39 +0000 (23:59 +0000)]
create perldelta for 5.13.9
Zefram [Sun, 19 Dec 2010 23:54:01 +0000 (23:54 +0000)]
epigraph for 5.13.8
Zefram [Sun, 19 Dec 2010 23:53:07 +0000 (23:53 +0000)]
replace gratuitous Unicode dashes
Zefram [Sun, 19 Dec 2010 23:41:10 +0000 (23:41 +0000)]
tweak later segments of release procedure
Slightly more clue about the indexer failures.
Move some post-release steps into a new "the day after" section.
Zefram [Sun, 19 Dec 2010 21:23:50 +0000 (21:23 +0000)]
fix -tree test for non-threaded perl
Zefram [Sun, 19 Dec 2010 19:12:10 +0000 (19:12 +0000)]
add autodie tag :2.1001 for blead-updated version
Zefram [Sun, 19 Dec 2010 18:48:08 +0000 (18:48 +0000)]
add new release to perlhist
Zefram [Sun, 19 Dec 2010 18:42:25 +0000 (18:42 +0000)]
update Module::CoreList for 5.13.8
Zefram [Sun, 19 Dec 2010 18:30:49 +0000 (18:30 +0000)]
update META.yml
Zefram [Sun, 19 Dec 2010 18:14:34 +0000 (18:14 +0000)]
acknowledgements in perldelta
Zefram [Sun, 19 Dec 2010 18:01:25 +0000 (18:01 +0000)]
perldelta wording nit
Zefram [Sun, 19 Dec 2010 15:11:49 +0000 (15:11 +0000)]
update references to earlier versions
Zefram [Sun, 19 Dec 2010 15:09:41 +0000 (15:09 +0000)]
link perldelta entries to perlapi sections
Zefram [Sun, 19 Dec 2010 15:04:53 +0000 (15:04 +0000)]
bump perl version number for 5.13.8
Zefram [Sun, 19 Dec 2010 14:49:15 +0000 (14:49 +0000)]
perldelta details of module updates
Zefram [Sun, 19 Dec 2010 13:48:06 +0000 (13:48 +0000)]
near-finalisation of perldelta
Put perldelta into mostly-final form, and copyedit it.
Zefram [Sun, 19 Dec 2010 13:01:09 +0000 (13:01 +0000)]
perldelta for updated modules
Zefram [Sun, 19 Dec 2010 12:21:54 +0000 (12:21 +0000)]
bump version of many modules
Core-only modules that have changed from v5.13.7, and dual-life modules
that have changed from v5.13.7 and didn't show up in earlier passes.
Zefram [Sun, 19 Dec 2010 11:50:07 +0000 (11:50 +0000)]
bump Unicode-Normalize version for blead changes
Zefram [Sun, 19 Dec 2010 11:48:59 +0000 (11:48 +0000)]
bump Unicode-Collate version for blead changes
Zefram [Sun, 19 Dec 2010 11:44:31 +0000 (11:44 +0000)]
bump threads-shared version for blead XS changes
Zefram [Sun, 19 Dec 2010 11:36:15 +0000 (11:36 +0000)]
bump ExtUtils-CBuilder version for blead change
Zefram [Sun, 19 Dec 2010 10:49:16 +0000 (10:49 +0000)]
bump autodie version for blead test fix
Zefram [Sun, 19 Dec 2010 09:00:09 +0000 (09:00 +0000)]
Zefram [Sun, 19 Dec 2010 08:50:06 +0000 (08:50 +0000)]
Zefram [Sun, 19 Dec 2010 08:46:30 +0000 (08:46 +0000)]
Zefram [Sun, 19 Dec 2010 08:40:12 +0000 (08:40 +0000)]
Zefram [Sun, 19 Dec 2010 08:36:00 +0000 (08:36 +0000)]
Father Chrysostomos [Sun, 19 Dec 2010 01:21:41 +0000 (17:21 -0800)]
Test B::Concise’s -tree mode
Chris 'BinGOs' Williams [Sat, 18 Dec 2010 22:36:50 +0000 (22:36 +0000)]
Update Archive-Tar to CPAN version 1.74
[DELTA]
* important changes in version 1.74 18/12/2010
- Skip extracting pax extended headers, reported as
RT #64038
Tony Cook [Sat, 18 Dec 2010 00:05:39 +0000 (11:05 +1100)]
Re-order the tests to match the comment
Win32 has been failing in re/re.t, maybe this will fix it.
Karl Williamson [Thu, 16 Dec 2010 15:34:35 +0000 (08:34 -0700)]
re.t: Use portable C locale
The locale en_US.UTF-8 has varying and wrong definitions depending on
manufacturer. Using the portable C locale works just as well for the
purposes of these tests.
Karl Williamson [Thu, 16 Dec 2010 05:33:07 +0000 (22:33 -0700)]
re.t: Avoid encoding issues by using hex chars
re.t is getting encoded as utf8 in places, which confuses things. So
use a hex notation to enter a non-ASCII char
Chip Salzenberg [Fri, 17 Dec 2010 19:21:54 +0000 (11:21 -0800)]
update warnings tests to cope with %z now being valid. use %y instead
Chip Salzenberg [Fri, 17 Dec 2010 18:55:20 +0000 (10:55 -0800)]
document new printf size modifiers
Chip Salzenberg [Fri, 17 Dec 2010 18:46:56 +0000 (10:46 -0800)]
smoke tests for %hhd %zd %td
Chip Salzenberg [Fri, 17 Dec 2010 18:13:43 +0000 (10:13 -0800)]
add %jd to printf where C99 exists; tweak %zd and %td
Nicholas Clark [Fri, 17 Dec 2010 17:18:33 +0000 (17:18 +0000)]
Refactor ExtUtils::Constant's tests to pass cleanly on older versions.
Work round bugs with the value of ~0 on 5.005 built on 64 bit systems.
Convert @INC to absolute paths on 5.6.x so that
ExtUtils::Constant::Aaargh56Hash will load from blib.
Remove $runperl, which is no longer needed.
Nicholas Clark [Fri, 17 Dec 2010 17:16:46 +0000 (17:16 +0000)]
Refactor ExtUtils::Constant::Utils backwards compatibility code.
Avoid warnings from letting 5.005 even think about POSIX charclass constants
in regexps, and use compile-time constants to enable backcompat features.
Nicholas Clark [Fri, 17 Dec 2010 15:16:33 +0000 (15:16 +0000)]
Convert ext/PerlIO-encoding/t/encoding.t to Test::More.
Nicholas Clark [Fri, 17 Dec 2010 11:07:32 +0000 (11:07 +0000)]
Convert ext/Opcode/t/ops.t to Test::More
Nicholas Clark [Fri, 17 Dec 2010 10:41:39 +0000 (10:41 +0000)]
Convert ext/IPC-Open3/t/IPC-Open3.t to Test::More
Unfortunately the gubbins of about 25% of its tests still rely on causing
subprocesses to emit the correct TAP, so part of it has to use a an explicit
test counter outside of Test::Builder.
Nicholas Clark [Fri, 17 Dec 2010 09:31:11 +0000 (09:31 +0000)]
In dbmt_common.pl, change checkOutput(...) to 5 calls to is().
Replacing a 5 armed boolean fed to ok() with 5 calls to is() gives much better
diagnostics on failure.