This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
13 years agoAdd JSON::PP to the Perl core
David Golden [Fri, 31 Dec 2010 04:43:44 +0000 (23:43 -0500)]
Add JSON::PP to the Perl core

Per discussions with Jesse Vincent, JSON::PP has been added
to the Perl core to support the new CPAN meta file specification

13 years agotests for [perl #36347] Object destruction incomplete
Father Chrysostomos [Mon, 3 Jan 2011 02:30:17 +0000 (18:30 -0800)]
tests for [perl #36347] Object destruction incomplete

13 years ago[perl #36347] Object destruction incomplete
Father Chrysostomos [Sun, 2 Jan 2011 22:51:21 +0000 (14:51 -0800)]
[perl #36347] Object destruction incomplete

do_clean_objs only looks for objects referenced by RVs, so blessed
array references and lexical variables (and probably other SVs, too)
are not DESTROYed.

This commit adds a new visit() call to sv_clean_objs, which curses
(DESTROYs and un-blesses, leaving the reference count as it is) any
objects that are still left after do_clean_named_io_objs. The new
do_curse routine (a pointer to which is passeds to visit()) follows
do_clean_named_io_objs’ example and explicitly skips the STDOUT and
STDERR handles, in case destructors need to use them.

The cursing code, which is now called from two places, is moved out of
sv_clear and put in its own routine. The check that the reference
count is zero does not apply when called from sv_clean_objs, so the
new S_curse routine takes a boolean argument that determines whether
that check should take place.

13 years agoMerge branch 'briandfoy/perlfaq' into blead
brian d foy [Mon, 3 Jan 2011 02:27:39 +0000 (20:27 -0600)]
Merge branch 'briandfoy/perlfaq' into blead

13 years agoperlfaq1: Adjust some of the language around the Perl 6 references
brian d foy [Mon, 3 Jan 2011 02:26:01 +0000 (20:26 -0600)]
perlfaq1: Adjust some of the language around the Perl 6 references

13 years ago[perl #73630] Build separate DTrace for miniperl
David Leadbeater [Sun, 2 Jan 2011 22:33:16 +0000 (14:33 -0800)]
[perl #73630] Build separate DTrace for miniperl

As outlined in the RT ticket due to miniperl's dependencies differing to
the final perl binary dtrace -G needs to be called separately for each.

Build tested on Mac OS X 10.6, Solaris 11 and Scientific Linux with
SystemTap from git.

(Solaris is the only system I have access to where DTRACE_O actually gets
defined. Neither the dtrace binary on OS X nor SystemTap's dtrace
compatibility layer accept the -G option.)

13 years agoUpdate CPAN::Meta::YAML to 0.003
David Golden [Sun, 2 Jan 2011 22:34:44 +0000 (17:34 -0500)]
Update CPAN::Meta::YAML to 0.003

This is a minor documentation change at Ingy's request.  Also,
the 0.003 CPAN release omits a test file that we were excluding
so I've removed it from the EXCLUDES list in Maintainers.pl

13 years ago[perl #81500] Make compilation work when NO_ENV_ARRAY_IN_MAIN is defined
David Leadbeater [Sun, 2 Jan 2011 21:38:21 +0000 (13:38 -0800)]
[perl #81500] Make compilation work when NO_ENV_ARRAY_IN_MAIN is defined

This is only normally defined if OEMVS is defined; the commit that added it
(2f3efc97) claims z/OS support. I guess no-one has tried this for awhile as
dd374669 broke this in 2005.

13 years ago[perl #81400] Fix bmodinv() part of RT 63237
Peter John Acklam [Sun, 2 Jan 2011 21:13:31 +0000 (13:13 -0800)]
[perl #81400] Fix bmodinv() part of RT 63237

The following standard definition is used: z is the modular inverse of
x (mod y) if and only if x*z (mod y) = 1 (mod y).

- dist/Math-BigInt/lib/Math/BigInt.pm: Fix the code in bmodinv() so it can
  handle negative arguments. The code can be optimized further for speed,
  but correctnes first.

- dist/Math-BigInt/t/bigintpm.inc: Fix the test case for modinv(-3, -5).
  The output should be -3, since -3 * -3 (mod -5) = -9 (mod -5) = -4, and
  1 (mod -5) = -4.

- dist/Math-BigRat/t/bigratpm.inc: Fix same test case as above.
  Math::BigRat::bmodinv() only handles integers, and is essentially just a
  front-end to Math::BigInt::bmodinv().

13 years agoDon't clobber $^O when you're going to use it again.
Craig A. Berry [Sun, 2 Jan 2011 21:16:11 +0000 (15:16 -0600)]
Don't clobber $^O when you're going to use it again.

Even if using it means relying on t/test.pl functionality such as
fresh_perl_is().

13 years agoGvIO(gv) returns NULL for a NULL gv, so refactor to take advantage of this.
Nicholas Clark [Sun, 2 Jan 2011 20:56:21 +0000 (20:56 +0000)]
GvIO(gv) returns NULL for a NULL gv, so refactor to take advantage of this.

Simplify tests of !gv || !io to just !io, avoid calling GvIO(gv) more than
once, and where possible initialise io at declaration time, to allow it to be
const.

13 years agomake <expr> always overload if expr is overloaded
David Mitchell [Sun, 2 Jan 2011 19:38:30 +0000 (19:38 +0000)]
make <expr> always overload if expr is overloaded

Due to the way that '<> as glob' was parsed differently from
'<> as filehandle' from 5.6 onwards, something like <$foo[0]>
didn't handle overloading, even where $foo[0] was an overloaded object.
This was contrary to the docs for overload, and meant that <> couldn't
be used as a general overloaded iterator operator.

13 years agooverloaded <> sometimes left an extra stack arg
David Mitchell [Sun, 2 Jan 2011 15:04:50 +0000 (15:04 +0000)]
overloaded <> sometimes left an extra stack arg

13 years agocall pp_glob() even when its being skipped
David Mitchell [Fri, 31 Dec 2010 18:55:36 +0000 (18:55 +0000)]
call pp_glob() even when its being skipped

Currently when an external Perl glob function is used (which is most of
the time), the OP_GLOB op is removed and replaced with the pair:
    GV("CORE::GLOBAL::glob"), ENTERSUB.

This commit re-adds the OP_GLOB to the op tree, but with OPf_SPECIAL set;
and pp_glob() is updated to just return if OPf_SPECIAL is set.

Thus there's no change in outward functionality with this commit. However,
by always calling pp_glob(), it will allow us (in the next commit) to
handle iterator overloading consistently, regardless of whether the
internal globbing function is used or not.

13 years agock_glob() - add a little code comment
David Mitchell [Fri, 31 Dec 2010 14:53:24 +0000 (14:53 +0000)]
ck_glob() - add a little code comment

13 years ago1; is not a valid no-op for /bin/sh, but true is.
Nicholas Clark [Sun, 2 Jan 2011 17:01:49 +0000 (18:01 +0100)]
1; is not a valid no-op for /bin/sh, but true is.

b99c822f5c5b52c3 was not actually correct in identify the cause of the errors.
(although still a valid change to make for the sake of consistency)

13 years agoUpdate META.yml's no_index after the Time-Local move
Florian Ragwitz [Sun, 2 Jan 2011 17:08:26 +0000 (18:08 +0100)]
Update META.yml's no_index after the Time-Local move

We should probably write a porting test for that at some point.

13 years agoCPAN is upstream for Time::Local again
Florian Ragwitz [Sun, 2 Jan 2011 16:19:37 +0000 (17:19 +0100)]
CPAN is upstream for Time::Local again

13 years agoMake Time::Local run on perls older than 5.12 again
Florian Ragwitz [Sun, 2 Jan 2011 15:25:52 +0000 (16:25 +0100)]
Make Time::Local run on perls older than 5.12 again

With 5.12, this module was made y2038-safe, even on systems with a 32-bit
time_t. Unfortunately, that broke things on older perl versions and blead became
this module's upstream as the y2038-safety couldn't easily be backported.

This change also doesn't attempt to backport y2038 support. It merely restores
the old behaviour including the y2038 limitations on older versions of perl on
platforms without a 64-bit time_t.

With this, we can at least move Time::Locale's upstream back to CPAN. Making it
y2038-safe for old perls on 32-bit time_t platforms probably shouldn't be a
priority anyway. There's Time::y2038, which does everything this module does,
and then some, while being y2038-safe.

At some point, this module should probably be deprecated.

13 years agochmod +x metaconfig.SH.
Nicholas Clark [Sun, 2 Jan 2011 10:40:25 +0000 (10:40 +0000)]
chmod +x metaconfig.SH.

Otherwise ./Configure -S generates a diagnostic, as it expects to be able to
execute it.

13 years agoperlbug did not previously generate a From: header. While some MTAs do
Jesse Vincent [Sun, 2 Jan 2011 02:50:21 +0000 (10:50 +0800)]
perlbug did not previously generate a From: header. While some MTAs do
the "right" thing and insert a valid "From:", not all of them do,
potentially resulting in dropped mail.

13 years agoEnsure ExtUtils::CBuilder's 04-base.t cleans up its temporary directories.
Nicholas Clark [Sat, 1 Jan 2011 15:33:18 +0000 (15:33 +0000)]
Ensure ExtUtils::CBuilder's 04-base.t cleans up its temporary directories.

The tempdir() function has the rather confusing default of *not* cleaning up
("because of issues with backwards compatibility") so one needs the CLEANUP
flag. (The analogous newdir() method in the OO interface doesn't suffer this
gotcha.)

13 years agoDocument 'test_porting' and start a section on how committing to blead
Jesse Vincent [Sat, 1 Jan 2011 10:46:20 +0000 (18:46 +0800)]
Document 'test_porting' and start a section on how committing to blead

13 years agoUpdate Encode to CPAN version 2.42
Chris 'BinGOs' Williams [Sat, 1 Jan 2011 10:37:04 +0000 (10:37 +0000)]
Update Encode to CPAN version 2.42

  [DELTA]

  $Revision: 2.42 $ $Date: 2010/12/31 22:48:48 $
  ! Encode.xs
  ! Unicode/Unicode.xs
    Applied: RT#64371: Update for 5.14 API changes
    http://rt.cpan.org/Ticket/Display.html?id=64371

13 years agoAvoid using OP_NAME() in unimplemented_op(), as it won't give useful strings.
Nicholas Clark [Fri, 31 Dec 2010 16:20:11 +0000 (16:20 +0000)]
Avoid using OP_NAME() in unimplemented_op(), as it won't give useful strings.

Using OP_NAME() isn't going to be helpful here. Firstly, it doesn't cope
with out of range op numbers - it only "special" cases op_custom.  Secondly,
as the three ops we "panic" on are padmy, mapstart and custom, if we get
here for a custom op then that means that the custom op didn't have an
implementation. Given that OP_NAME() looks up the custom op by its pp_addr,
likely it will return NULL, unless someone (unhelpfully) registers
&PL_unimplemented_op as the address of their custom op.  NULL doesn't
generate a useful error message. "custom" does. */

13 years agoPorting/Maintainers.pl: add (MY)META.json to ignored files
David Golden [Fri, 31 Dec 2010 16:29:33 +0000 (11:29 -0500)]
Porting/Maintainers.pl: add (MY)META.json to ignored files

13 years agostandardise amagic method naming
David Mitchell [Thu, 30 Dec 2010 16:29:12 +0000 (16:29 +0000)]
standardise amagic method naming

Some amagic-related macros take the full method enumeration name,
(e.g. "add_amg"); while others "helpfully" allow you to pass a shortened
version, ("add"), and do a CAT2(meth,_amg) behind the scenes.

Standardise on passing the full name; this makes it less confusing and
allows you to grep for the enumeration name in the source.

It updates two macros to accept full enumeration names: tryAMAGICunTARGET
(which isn't used outside the core apparently), and AMG_CALLun, which is
replaced by a new AMG_CALLunary (since AMG_CALLun is used outside the
core).

13 years agoVMS nits in cpan/Test-Harness/t/source.t
Craig A. Berry [Fri, 31 Dec 2010 01:45:13 +0000 (19:45 -0600)]
VMS nits in cpan/Test-Harness/t/source.t

1.)  Can't get the basename of a directory in native format.

2.)  Symlinks still a bit dodgy -- skip tests for now.

Submitted upstream at:

https://rt.cpan.org/Ticket/Display.html?id=64353

13 years agoSkip ExtUtils-CBuilder base tests expected and known to fail on VMS.
Craig A. Berry [Thu, 30 Dec 2010 22:29:50 +0000 (16:29 -0600)]
Skip ExtUtils-CBuilder base tests expected and known to fail on VMS.

13 years agoMerge the opcode bodies for pp_bind and pp_connect.
Nicholas Clark [Thu, 30 Dec 2010 17:45:53 +0000 (17:45 +0000)]
Merge the opcode bodies for pp_bind and pp_connect.

13 years agoMost socket ops weren't warning for unopened handles unless 'closed' was enabled
Nicholas Clark [Thu, 30 Dec 2010 17:30:24 +0000 (17:30 +0000)]
Most socket ops weren't warning for unopened handles unless 'closed' was enabled

They were checking that category 'closed' was enabled for warnings before
calling report_evil_fh(), which in turn was (correctly) checking category
'unopened'.

13 years agoConvert a pp_sys test to use warnings 'closed', instead of the broader 'io'.
Nicholas Clark [Thu, 30 Dec 2010 17:14:15 +0000 (17:14 +0000)]
Convert a pp_sys test to use warnings 'closed', instead of the broader 'io'.

It's actually only testing warnings enabled by 'closed', so test using the
tighter category.

13 years agopp_leavewrite wasn't warning for unopened handles unless 'closed' was enabled.
Nicholas Clark [Thu, 30 Dec 2010 16:52:22 +0000 (16:52 +0000)]
pp_leavewrite wasn't warning for unopened handles unless 'closed' was enabled.

It was checking that category 'closed' was enabled for warnings before calling
report_evil_fh(), which in turn was (correctly) checking category 'unopened'.

13 years agoBetter handling of magic methods freeing the SV
David Mitchell [Thu, 30 Dec 2010 10:32:44 +0000 (10:32 +0000)]
Better handling of magic methods freeing the SV

This is a fix for RT #81230 (and more). Currently, mg_get() works around
the case where the called magic (e.g. FETCH) frees the magic SV. It does
this by unconditionally pushing the SV on the tmps stack before invoking
the method.

There are two issues with this. Firstly, it may artificially extend the
life of the SV. This was the root of the problem with #81230. There, the
DB_File code, under -T, created a tainted tied object. Accessing the
object (within FETCH as it happens), caused mg_get() to be invoked on the
object (due to the taint magic), and thus extend the life of the object.
This then caused c<untie %h if $h{k}> to give the warning
    untie attempted while 1 inner references still exist.
This only became noticeable after efaf36747029c85b4d8825318cb4d485a0bb350e,
which stopped wrapping magic method calls in SAVETMPS/FREETMPS.

The second issue issue that this protection only applies to mg_get();
functions like mg_set() can still segfault if the SV is deleted.

This commit fixes both problems as follows:

First, the protection mechanism is moved out of mg_get() and into
save_magic() / restore_magic(), so that it protects more things.
Secondly, the protection is now:

* in save_magic(), SvREFCNT_inc() the SV, thus protecting it from being
  freed during FETCH (or whatever)

* in restore_magic(), SvREFCNT_dec() the SV, undoing the protection
  without extending the life of the SV, *except* if the refcount is
  1 (ie FETCH tried to free it), then push it on the mortals stack
  to extend it life a bit so our callers wont choke on it.

13 years agoUpdate Renee Baeckers mail address
Renee Baecker [Wed, 29 Dec 2010 09:10:32 +0000 (01:10 -0800)]
Update Renee Baeckers mail address

Signed-off-by: David Golden <dagolden@cpan.org>
13 years agoproperly clean up work files from testing GDBM_File
Tony Cook [Wed, 29 Dec 2010 05:44:58 +0000 (16:44 +1100)]
properly clean up work files from testing GDBM_File

13 years agoclose the produced test file so win32 can unlink it
Tony Cook [Tue, 28 Dec 2010 11:39:14 +0000 (22:39 +1100)]
close the produced test file so win32 can unlink it

Previously runs would leave a GLOB(0x...) file in t/

13 years agoskip ExtUtils-CBuilder base tests expected and known to fail on Win32
Tony Cook [Tue, 28 Dec 2010 11:09:31 +0000 (22:09 +1100)]
skip ExtUtils-CBuilder base tests expected and known to fail on Win32

13 years agoAs report_evil_fh() checks WARN_{CLOSED,UNOPENED}, don't duplicate this.
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".

13 years agoAs report_wrongway_fh() checks ckWARN(WARN_IO) internally, don't duplicate this.
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.)

13 years agoRemove OP_phoney_{IN,OUT}PUT_ONLY, as they are no longer used or supported.
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.

13 years agoArgument op to report_evil_fh() is always PL_op->op_type, so need not be passed
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

13 years agoThe io argument to report_evil_fh() is always GvIO(gv), 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.

13 years agoExtract the OP_phoney_* code from report_evil_fh() into report_wrongway_fh()
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.

13 years agoIn pp_sockpair, remove duplication of code to close the supplied file handles.
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.

13 years agoFix typo in warning code added to pp_sockpair in c289d2f7288798f8.
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).

13 years agoavoid undefined behaviour in fetch and modify of SP from 0a0e3cc51e
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

13 years agoAdd CPAN::Meta::YAML as a dual-life core module
David Golden [Mon, 27 Dec 2010 19:50:31 +0000 (14:50 -0500)]
Add CPAN::Meta::YAML as a dual-life core module

13 years agoSimplify return handling for tied handle OPEN/PRINTF/READ/WRITE.
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.

13 years agoA perldelta entry describing the refactoring of the chop/chomp implementation.
Nicholas Clark [Mon, 27 Dec 2010 13:09:02 +0000 (13:09 +0000)]
A perldelta entry describing the refactoring of the chop/chomp implementation.

13 years agoMove do_chomp() from pp.c to doop.c, and make it static.
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.

13 years agoMerge the opcode bodies for chop/chomp and schop/schomp.
Nicholas Clark [Mon, 27 Dec 2010 11:41:10 +0000 (11:41 +0000)]
Merge the opcode bodies for chop/chomp and schop/schomp.

13 years agoMerge Perl_do_chop() and Perl_do_chomp().
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.

13 years agoConvert Perl_do_chomp() to the same prototype as Perl_do_chop().
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.

13 years agoRefactor pp_chomp to process arguments in the same order as pp_chop.
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.

13 years agoFix links (and hence the podchecker test) after cce04bebd8af026c.
Nicholas Clark [Mon, 27 Dec 2010 07:42:45 +0000 (07:42 +0000)]
Fix links (and hence the podchecker test) after cce04bebd8af026c.

13 years ago[perl #81016] Document ord("")
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.)

13 years agoUpgrade to Thread::Queue 2.12
Jerry D. Hedden [Fri, 24 Dec 2010 17:53:28 +0000 (12:53 -0500)]
Upgrade to Thread::Queue 2.12

13 years agoUpgrade to Thread::Semaphore 2.12
Jerry D. Hedden [Fri, 24 Dec 2010 17:49:12 +0000 (12:49 -0500)]
Upgrade to Thread::Semaphore 2.12

13 years agoReorganize perlhack.pod
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.

13 years ago[perl #81218] Note that perlbug to p5p is subject to moderation
David Leadbeater [Sun, 26 Dec 2010 22:40:56 +0000 (14:40 -0800)]
[perl #81218] Note that perlbug to p5p is subject to moderation

13 years agoCalc.pm: Fix _modpow() part of RT#63237
Peter John Acklam [Thu, 16 Dec 2010 14:54:39 +0000 (15:54 +0100)]
Calc.pm: Fix _modpow() part of RT#63237

13 years agoFix RT 62764: Math::BigFloat->bcmp() fails.
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.

13 years agoFix RT 25274: Math::BigInt::Calc->_num() overflow.
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.

13 years agoUpdate perldelta for threads and threads::shared
Chris 'BinGOs' Williams [Fri, 24 Dec 2010 22:32:46 +0000 (22:32 +0000)]
Update perldelta for threads and threads::shared

13 years ago[PATCH] Upgrade to threads::shared 1.36
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>
13 years ago[PATCH] Upgrade to threads 1.82
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>
13 years agoQuote 'threads' in test.pl
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.

13 years agoUpdate Encode to CPAN version 2.41
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

13 years agoupdate RMG discussion of post-release actions
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.

13 years agoFix IS_UTF8_CHAR() to recognise start bytes 0xF5, 0xF6, 0xF7.
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.

13 years agoConvert lib/utf8.t to strict and warnings throughout.
Nicholas Clark [Tue, 21 Dec 2010 16:38:24 +0000 (16:38 +0000)]
Convert lib/utf8.t to strict and warnings throughout.

13 years agoRe-sort MANIFEST after a7dcd8d74e57d2a8.
Nicholas Clark [Tue, 21 Dec 2010 16:31:30 +0000 (16:31 +0000)]
Re-sort MANIFEST after a7dcd8d74e57d2a8.

13 years agoNo reference to $Id: in generated files
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.

13 years agoMove metaconfig control comments into its own files
H.Merijn Brand [Tue, 21 Dec 2010 12:57:10 +0000 (13:57 +0100)]
Move metaconfig control comments into its own files

13 years agoRestore a reference to $perlpath. Installation needs it
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

13 years agosin6_scope_id is supported by Winsock2.
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.

13 years agoavoid emitting control characters in test comments
Tony Cook [Tue, 21 Dec 2010 04:02:56 +0000 (15:02 +1100)]
avoid emitting control characters in test comments

13 years agomultiple watchdog()s in the one test script are meaningless
Tony Cook [Tue, 21 Dec 2010 04:01:24 +0000 (15:01 +1100)]
multiple watchdog()s in the one test script are meaningless

13 years agod_sin6_scope_id configuration probe for VMS.
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.

13 years agoEmphasis that you have to check input data in your CGI program
brian d foy [Tue, 21 Dec 2010 01:49:07 +0000 (19:49 -0600)]
Emphasis that you have to check input data in your CGI program

13 years agoregexec.c: white-space only
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.

13 years agoregexec:c Remove unreached code
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.

13 years agoChange name of regex intrnl macro to new meaning
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.

13 years agoAdd sin6_scope_id probe (LeoNerd)
H.Merijn Brand [Mon, 20 Dec 2010 16:13:46 +0000 (17:13 +0100)]
Add sin6_scope_id probe (LeoNerd)

13 years agoTweak IPC-Open3.t to cope with \r\n line endings on Win32.
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.

13 years agostdint.h has yet to appear on VMS.
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.

13 years agoutf8.c: add to comment
Karl Williamson [Sun, 19 Dec 2010 21:40:34 +0000 (14:40 -0700)]
utf8.c: add to comment

13 years agoregexec.c: Remove unnecessary statements
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

13 years agoperltodo: Revise utf8 todo
Karl Williamson [Sun, 19 Dec 2010 18:37:06 +0000 (11:37 -0700)]
perltodo: Revise utf8 todo

13 years agoutf8.c, .h: Clarify pod and comment
Karl Williamson [Sun, 19 Dec 2010 19:24:07 +0000 (12:24 -0700)]
utf8.c, .h: Clarify pod and comment

13 years agomktables: fix typo in comment
Karl Williamson [Sun, 19 Dec 2010 19:24:54 +0000 (12:24 -0700)]
mktables: fix typo in comment

13 years agoChange regexes to debug dump non-ASCII as hex.
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.

13 years agopv_escape: Add option to dump all non-ascii as hex
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.

13 years agodump.c: correct pod statement
Karl Williamson [Sun, 19 Dec 2010 17:53:58 +0000 (10:53 -0700)]
dump.c: correct pod statement

13 years agoupdate TOC for perl5138delta and perl5139delta
Zefram [Mon, 20 Dec 2010 00:03:17 +0000 (00:03 +0000)]
update TOC for perl5138delta and perl5139delta

13 years agocreate perldelta for 5.13.9
Zefram [Sun, 19 Dec 2010 23:59:39 +0000 (23:59 +0000)]
create perldelta for 5.13.9

13 years agoepigraph for 5.13.8
Zefram [Sun, 19 Dec 2010 23:54:01 +0000 (23:54 +0000)]
epigraph for 5.13.8

13 years agoreplace gratuitous Unicode dashes
Zefram [Sun, 19 Dec 2010 23:53:07 +0000 (23:53 +0000)]
replace gratuitous Unicode dashes

13 years agotweak later segments of release procedure
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.