This is a live mirror of the Perl 5 development currently hosted at
11 years agoFor make test, move the 'porting' tests before 'lib', 'ext', 'dist' & 'cpan'
Nicholas Clark [Fri, 17 Feb 2012 15:13:05 +0000 (16:13 +0100)]
For make test, move the 'porting' tests before 'lib', 'ext', 'dist' & 'cpan'

This makes the order more consistent with test_harness, and moves the
"interesting" tests earlier. "interesting", in that these are more likely
to spot unexpected problems with the tested changes.

11 years agoIn Perl_sv_del_backref(), don't panic if tsv is already freed.
Nicholas Clark [Thu, 16 Feb 2012 22:20:53 +0000 (23:20 +0100)]
In Perl_sv_del_backref(), don't panic if tsv is already freed.

During global destruction it's possible for tsv, the target of this weak
reference, to already be freed. This isn't a bug, and hence the interpreter
should not panic.

11 years agoUpdate Socket to CPAN version 1.98
Chris 'BinGOs' Williams [Thu, 16 Feb 2012 16:28:35 +0000 (16:28 +0000)]
Update Socket to CPAN version 1.98


  1.98  CHANGES:
         * Detect presence of sockaddr_in6 and ipv6_mreq; conditionally build
           pack/unpack functions on this
         * Back-compatibility improvements for older perls, back as far as
           5.6.1 (thanks Zefram)
         * Fix for picky compilers or platforms on which size_t doesn't
           printf() correctly by %d
         * Suppress some harmless compile-time warnings about unused variables

11 years agoCarp-1.25 released to CPAN
Zefram [Fri, 17 Feb 2012 09:24:17 +0000 (09:24 +0000)]
Carp-1.25 released to CPAN

11 years agoin Carp, cope with "_" in $warnings::VERSION
Zefram [Fri, 17 Feb 2012 09:20:49 +0000 (09:20 +0000)]
in Carp, cope with "_" in $warnings::VERSION

The check for very old versions of warnings was generating a numeric
warning on some versions of warnings where $warnings::VERSION isn't a
proper number.  Oh, the irony.  Specifically affected the version of
warnings that was bundled with Perl 5.8.9.

11 years agoAdd new probes for IPv6 (LeoNerd)
H.Merijn Brand [Thu, 16 Feb 2012 16:17:18 +0000 (17:17 +0100)]
Add new probes for IPv6 (LeoNerd)

11 years agobegin filling the 5.16.0 delta from 5.15.7
Ricardo Signes [Thu, 16 Feb 2012 03:49:36 +0000 (22:49 -0500)]
begin filling the 5.16.0 delta from 5.15.7

This is largely a copy and paste job.  Once I copy and paste most
things in, I will then start condensing them.

This does *not* include the following sections from perl5157delta:

* module updates
* configuration and compilation changes

11 years agobegin filling the 5.16.0 delta from 5.15.6
Ricardo Signes [Thu, 16 Feb 2012 03:39:47 +0000 (22:39 -0500)]
begin filling the 5.16.0 delta from 5.15.6

This is largely a copy and paste job.  Once I copy and paste most
things in, I will then start condensing them.

This does *not* include the following sections from perl5156delta:

* module updates
* internals changes

11 years agobegin filling the 5.16.0 delta from 5.15.5
Ricardo Signes [Thu, 16 Feb 2012 03:20:31 +0000 (22:20 -0500)]
begin filling the 5.16.0 delta from 5.15.5

This is largely a copy and paste job.  Once I copy and paste most
things in, I will then start condensing them.

This does *not* include the following sections from perl5155delta:

* module updates
* configuration and compilation changes
* internals changes

11 years agobegin filling the 5.16.0 delta from 5.15.4
Ricardo Signes [Thu, 16 Feb 2012 03:10:09 +0000 (22:10 -0500)]
begin filling the 5.16.0 delta from 5.15.4

This is largely a copy and paste job.  Once I copy and paste most
things in, I will then start condensing them.

This does *not* include the following sections from perl5154delta:

* module updates
* configuration and compilation changes
* internals changes

11 years agobegin filling the 5.16.0 delta from 5.15.3
Ricardo Signes [Thu, 16 Feb 2012 02:55:56 +0000 (21:55 -0500)]
begin filling the 5.16.0 delta from 5.15.3

This is largely a copy and paste job.  Once I copy and paste most
things in, I will then start condensing them.

This does *not* include the following sections from perl5153delta:

* module updates

11 years agoSimplify VMS symlink override.
Craig A. Berry [Thu, 16 Feb 2012 02:39:16 +0000 (20:39 -0600)]
Simplify VMS symlink override.

The implementation assumed that the CRTL's requirement to specify
the target name in Unix syntax is somehow related to EFS (Extended
Filename Syntax).  It isn't, so remove that assumption and simplify
the implementation.  Bug introduced by 4148925f.

11 years agoperldelta: Some char names now obsoleted
Karl Williamson [Thu, 16 Feb 2012 02:22:37 +0000 (19:22 -0700)]
perldelta: Some char names now obsoleted

Since I wrote the revision to perldelta about changing the names for the
four controls whose previous preferred name each contained parentheses,
the Unicode Technical Committee has voted to mark the old names as
obsolete.  This just updates the text to reflect that.

11 years agopp.c: Cast function argument to expected type
Karl Williamson [Thu, 16 Feb 2012 01:52:38 +0000 (18:52 -0700)]
pp.c: Cast function argument to expected type

This was breaking some builds

11 years agopp_quote_meta: in locale, quote all UTF-8 Latin1 non-ASCII
Karl Williamson [Wed, 15 Feb 2012 19:27:23 +0000 (12:27 -0700)]
pp_quote_meta: in locale, quote all UTF-8 Latin1 non-ASCII

Under locale rules, this commit quotes all non-ASCII Latin1 characters
in UTF-8 encoded strings.  This provides consistency with this function
and other functions, such as lc().

11 years agopp.c: white-space only
Karl Williamson [Wed, 15 Feb 2012 19:07:01 +0000 (12:07 -0700)]
pp.c: white-space only

11 years agoperl #77654: quotemeta quotes non-ASCII consistently
Karl Williamson [Wed, 15 Feb 2012 18:31:27 +0000 (11:31 -0700)]
perl #77654: quotemeta quotes non-ASCII consistently

As described in the pod changes in this commit, this changes quotemeta()
to consistenly quote non-ASCII characters when used under
unicode_strings.  The behavior is changed for these and UTF-8 encoded
strings to more closely align with Unicode's recommendations.

The end result is that we *could* at some future point start using other
characters as metacharacters than the 12 we do now.

11 years agopp_quotemeta(): Use more explicit macro
Karl Williamson [Wed, 15 Feb 2012 17:04:10 +0000 (10:04 -0700)]
pp_quotemeta(): Use more explicit macro

Changing the macro to a differently-named equivalent stresses that only
ASCII characters may escape from being quoted.  That is, all non-ASCII
are quoted.

11 years agohandy.h: New macro for quotemeta
Karl Williamson [Tue, 14 Feb 2012 01:51:34 +0000 (18:51 -0700)]
handy.h: New macro for quotemeta

This tests if a Latin1 character should be quoted.

11 years agol1_char_class_tab.h: Add field for quotemeta
Karl Williamson [Tue, 14 Feb 2012 01:48:59 +0000 (18:48 -0700)]
l1_char_class_tab.h: Add field for quotemeta

This changes this header to include a bit for each character indicating
if it should be quoted by quotemeta under unicode_strings

11 years agomktables: Generate a table for quotemeta
Karl Williamson [Tue, 14 Feb 2012 01:47:20 +0000 (18:47 -0700)]
mktables: Generate a table for quotemeta

This adds a new table generated by mktables consisting of the code
points that should be escaped by quotemeta

11 years agoClarify some quotemeta docs
Karl Williamson [Tue, 14 Feb 2012 01:44:35 +0000 (18:44 -0700)]
Clarify some quotemeta docs

11 years agoperlfunc: quotemeta, clarify, fix incorrect statement
Karl Williamson [Sun, 12 Feb 2012 15:14:34 +0000 (08:14 -0700)]
perlfunc: quotemeta, clarify, fix incorrect statement

11 years agoFurther eliminate POSIX-emulation under LinuxThreads
Ævar Arnfjörð Bjarmason [Sat, 11 Feb 2012 17:17:31 +0000 (17:17 +0000)]
Further eliminate POSIX-emulation under LinuxThreads

Under POSIX threads the getpid() and getppid() functions return the
same values across multiple threads, i.e. threads don't have their own
PID's. This is not the case under the obsolete LinuxThreads where each
thread has a different PID, so getpid() and getppid() will return
different values across threads.

Ever since the first perl 5.0 we've returned POSIX-consistent
semantics for $$, until v5.14.0-251-g0e21945 when the getpid() cache
was removed. In 5.8.1 Rafael added further explicit POSIX emulation in
perl-5.8.0-133-g4d76a34 [1] by explicitly caching getppid(), so that
multiple threads would always return the same value.

I don't think all this effort to emulate POSIX sematics is worth it. I
think $$ and getppid() are OS-level functions that should always
return the same as their C equivalents. I shouldn't have to use a
module like Linux::Pid to get the OS version of the return values.

This is pretty much a complete non-issue in practice these days,
LinuxThreads was a Linux 2.4 thread implementation that nobody
maintains anymore[2], all modern Linux distros use NPTL threads which
don't suffer from this discrepancy. Debian GNU/kFreeBSD does use
LinuxThreads in the 6.0 release, but they too will be moving away from
it in future releases, and really, nobody uses Debian GNU/kFreeBSD

This caching makes it unnecessarily tedious to fork an embedded Perl
interpreter. When someone that constructs an embedded perl interpreter
and forks their application, the fork(2) system call isn't going to
run Perl_pp_fork(), and thus the return value of $$ and getppid()
doesn't reflect the current process. See [3] for a bug in uWSGI
related to this, and Perl::AfterFork on the CPAN for XS code that you
need to run after forking a PerlInterpreter unbeknownst to perl.

We've already been failing the tests in t/op/getpid.t on these Linux
systems that nobody apparently uses, the Debian GNU/kFreeBSD users did
notice and filed #96270, this patch fixes that failure by changing the
tests to test for different behavior under LinuxThreads, I've tested
that this works on my Debian GNU/kFreeBSD 6.0.4 virtual machine.

If this change is found to be unacceptable (i.e. we want to continue
to emulate POSIX thread semantics for the sake of LinuxThreads) we
also need to revert v5.14.0-251-g0e21945, because currently we're only
emulating POSIX semantics for getppid(), not getpid(). But I don't
think we should do that, both v5.14.0-251-g0e21945 and this commit are

This commit includes a change to embedvar.h made by "make


11 years agoMerge branch 'avar/eject-strptime' into blead
Ævar Arnfjörð Bjarmason [Wed, 15 Feb 2012 19:07:34 +0000 (19:07 +0000)]
Merge branch 'avar/eject-strptime' into blead

Ejecting the strptime patches to POSIX out of blead Nicholas Clark
raises some good points about why it shouldn't be in blead as-is, we
can always deal with this in the 5.17 window instead of just before
the user-visible changes freeze.

See the "POSIX-strptime latest code" thread on p5p.

11 years agoPOSIX: bump version to 1.30
Ævar Arnfjörð Bjarmason [Wed, 15 Feb 2012 19:05:13 +0000 (19:05 +0000)]
POSIX: bump version to 1.30

I've reverted the strptime() code, which involved bumping the version
number, bump the version number again to 1.30 so the version number
won't go backwards.

11 years agoRevert "Merge branch 'avar/POSIX-strptime' into blead"
Ævar Arnfjörð Bjarmason [Wed, 15 Feb 2012 18:46:06 +0000 (18:46 +0000)]
Revert "Merge branch 'avar/POSIX-strptime' into blead"

This reverts commit 0e582130ad8fc3afc6514f60b7a513c550379b7d, reversing
changes made to a748fe11f70695552294fe4e31343b2dacb59db2.



11 years agoRevert "Merge branch 'avar/POSIX-strptime' into blead"
Ævar Arnfjörð Bjarmason [Wed, 15 Feb 2012 18:42:15 +0000 (18:42 +0000)]
Revert "Merge branch 'avar/POSIX-strptime' into blead"

This reverts commit 0e582130ad8fc3afc6514f60b7a513c550379b7d, reversing
changes made to 423a1dfc8c367cb58e7dcef73a81b4ec7a8b8810.

11 years agoRevert "Use the strptime() probe in POSIX.xs & tests"
Ævar Arnfjörð Bjarmason [Wed, 15 Feb 2012 18:38:15 +0000 (18:38 +0000)]
Revert "Use the strptime() probe in POSIX.xs & tests"

This reverts commit 05a9a07a5bad262994c7980ced7fffdd93aa2867.

11 years agoRevert "Add strptime probe"
Ævar Arnfjörð Bjarmason [Wed, 15 Feb 2012 18:37:51 +0000 (18:37 +0000)]
Revert "Add strptime probe"

This reverts commit 8852e312c3c616ab731ccbe7da54fb04eb8c3d30.

11 years agoRevert "VMS does have strptime."
Ævar Arnfjörð Bjarmason [Wed, 15 Feb 2012 18:37:33 +0000 (18:37 +0000)]
Revert "VMS does have strptime."

This reverts commit 310f9c6e1d10c69ebae8d0356b22e58f451fdc76.

11 years agoClarify the newSVpvn documentation.
Shlomi Fish [Wed, 15 Feb 2012 11:30:32 +0000 (12:30 +0100)]
Clarify the newSVpvn documentation.

"string" is now called "buffer", and we mention that it might contain NUL

11 years agoPod::Html's feature2.t needs to match path separators portably.
Nicholas Clark [Tue, 14 Feb 2012 22:06:24 +0000 (23:06 +0100)]
Pod::Html's feature2.t needs to match path separators portably.

On Win32 the path separator in the output it is testing is backslash.
This implies that it will be ] on VMS. Tweak the regular expression to
match these in addition to / for *nix.

11 years agoSkip stat.t readability test on VMS.
Craig A. Berry [Wed, 15 Feb 2012 01:29:07 +0000 (19:29 -0600)]
Skip stat.t readability test on VMS.

This new test grants full access on a test file to group and other.
Since I'm a member of my own group and everyone is someone, I of
course have full access to the file, but the test expects it to be
unreadable.  If there is a hierarchy in Unix file permissions, it
clearly doesn't work the same way as the VMS one.

11 years agoFix Pod::Simple search test for VMS.
Craig A. Berry [Wed, 15 Feb 2012 01:14:54 +0000 (19:14 -0600)]
Fix Pod::Simple search test for VMS.

Awaiting upstream integration at:

11 years agoFix CGI's url.t test for VMS.
Craig A. Berry [Wed, 15 Feb 2012 01:09:52 +0000 (19:09 -0600)]
Fix CGI's url.t test for VMS.

Awaiting upstream integration at:

11 years agoperl #110648, single Unicode prop in inverted class not getting inverted
Karl Williamson [Tue, 14 Feb 2012 19:04:21 +0000 (12:04 -0700)]
perl #110648, single Unicode prop in inverted class not getting inverted

Commit b6c46382308166d54090e3d8e385710664693ac0 introduced a bug when
an inverted bracketed character class consists solely of a Unicode
property, that property wasn't getting inverted outside the Latin1

This was due to an optimization that should have been disabled for this

11 years agoSmall updates for perlobj.pod
Dave Rolsky [Tue, 14 Feb 2012 17:05:51 +0000 (11:05 -0600)]
Small updates for perlobj.pod

Fixed some typos.

Improved some wording.

Clarified some points.

11 years agoClarify that @ISA contains scalars which are strings.
Dave Rolsky [Tue, 14 Feb 2012 16:44:02 +0000 (10:44 -0600)]
Clarify that @ISA contains scalars which are strings.

11 years agoDon't reference a specific year for the definition of modern.
Dave Rolsky [Tue, 14 Feb 2012 16:34:41 +0000 (10:34 -0600)]
Don't reference a specific year for the definition of modern.

Just say "with modern Perl" instead of "in 2011".

11 years agoFix a typo (s/lead/led) and some bleah phrasing.
Dave Rolsky [Tue, 14 Feb 2012 16:25:20 +0000 (10:25 -0600)]
Fix a typo (s/lead/led) and some bleah phrasing.

11 years agoUpdate CPANPLUS to CPAN version 0.9118
Chris 'BinGOs' Williams [Tue, 14 Feb 2012 09:47:13 +0000 (09:47 +0000)]
Update CPANPLUS to CPAN version 0.9118


  Changes for 0.9118      Mon Feb 13 22:29:33 2012
  * Test reporting enhancements

11 years agoUpdate CPANPLUS-Dist-Build to CPAN version 0.62
Chris 'BinGOs' Williams [Tue, 14 Feb 2012 09:41:51 +0000 (09:41 +0000)]
Update CPANPLUS-Dist-Build to CPAN version 0.62


  0.62 Mon Feb 13 22:15:57 GMT 2012
    - Test reporting enhancements

11 years agomixing declarations and assignments not allowed in C89
H.Merijn Brand [Tue, 14 Feb 2012 08:17:02 +0000 (09:17 +0100)]
mixing declarations and assignments not allowed in C89

11 years agoMake pp_study a no-op, as discussed on p5p
Abhijit Menon-Sen [Wed, 1 Feb 2012 05:22:31 +0000 (10:52 +0530)]
Make pp_study a no-op, as discussed on p5p

11 years agois_utf8_char_slow(): Make constistent, correct docs.
Karl Williamson [Mon, 13 Feb 2012 20:13:02 +0000 (13:13 -0700)]
is_utf8_char_slow(): Make constistent, correct docs.

This function is only used by the Perl core for very large code points,
though it is designed to be able to be used for all code points.

For any variant code points, it doesn't succeed unless the passed in
length is exactly the same as the number of bytes the code point
occupies.  The documentation says it succeeds if the length is at least
that number.  This commit updates the documentation to match the

Also, for an invariant code point, it succeeds no matter what the
passed-in length says.  This commit changes this to be consistent with
the behavior for all other code points.

11 years agocharnames.t: viacode doesn't return Unicode_1 name always
Karl Williamson [Mon, 13 Feb 2012 18:44:44 +0000 (11:44 -0700)]
charnames.t: viacode doesn't return Unicode_1 name always

There are now four characters which have a different preferred name.

11 years agoavoid unused-var warning from MY_CXT_INIT
Zefram [Mon, 13 Feb 2012 18:14:23 +0000 (18:14 +0000)]
avoid unused-var warning from MY_CXT_INIT

11 years agomktables: viacode() return unparenthesized names for 4 controls
Karl Williamson [Mon, 13 Feb 2012 16:54:22 +0000 (09:54 -0700)]
mktables: viacode() return unparenthesized names for 4 controls

This commit changes the viacode() returned name for four control characters, as
 Code point      Old Name             New Name
   U+000A    LINE FEED (LF)        LINE FEED
   U+000C    FORM FEED (FF)        FORM FEED
   U+0085    NEXT LINE (NEL)       NEXT LINE

Only the return from viacode is affected.  All the names are accepted as
input, as they always have been.

Unicode 6.1 now has official names for all the controls, and the new
names match those.  The old names were the ones that were recommended by
TR18 prior to 6.1, and still are, sort of.  This change uses the
official names in preference to the TR18 ones.  We probably wouldn't
bother except that the old names were problematic--the only names in the
whole universe of names containing parentheses, and not matching
traditional usage.  The new names have always been accepted as inputs by

I actually doubt that Unicode ever grokked that they were recommending
these ugly names. and they haven't paid much attention to TR18 anyway,
breaking it in version 6.0 by encoding one of the recommended names
(BELL) as an official name for another code point, and without realizing
it.  TR18 now is in limbo, still wrongly recommending BELL, with a
rewrite being promised for many months now.  It's unclear what will
happen with it.

It was agreed on p5p to go with the cleaner, now official names, instead
of the older, likely obsolete, TR18 names.  I did a search of
CPAN; it was unclear if this change, (which again is only for viacode())
mattered to any code there or not.  There were a few instances of the
old names, but none of those were apparently associated with viacode().

11 years agomktables: Don't add exact duplicate to tables
Karl Williamson [Mon, 13 Feb 2012 16:47:09 +0000 (09:47 -0700)]
mktables: Don't add exact duplicate to tables

This was a bug in the case where there can be multiple entries in a
table for a single code point.  But there only can be one identical

11 years agofix a comment typo: s/MYCXT/MY_CXT/
David Mitchell [Mon, 13 Feb 2012 12:12:39 +0000 (12:12 +0000)]
fix a comment typo: s/MYCXT/MY_CXT/

11 years agoin INSTALL, make clear -DDEBUGGING is much slower
David Mitchell [Mon, 13 Feb 2012 12:10:15 +0000 (12:10 +0000)]
in INSTALL, make clear -DDEBUGGING is much slower

There's some existing text that says it will be bigger and slower, but add
some 'much'es to the text to make it clear that it *really* sucks.

11 years agoTypo in commit 4fe70ef9a66bbf96 spotted by Ilmari.
Nicholas Clark [Mon, 13 Feb 2012 12:04:52 +0000 (13:04 +0100)]
Typo in commit 4fe70ef9a66bbf96 spotted by Ilmari.

11 years agoIn perlfunc, standardise the descriptions for keywords enabled by features.
Nicholas Clark [Mon, 13 Feb 2012 11:37:44 +0000 (12:37 +0100)]
In perlfunc, standardise the descriptions for keywords enabled by features.

Previously the "Functions by Category" summaries noted that state, __SUB__
and the "switch" keywords are enabled only by the feature system, but made
no mention of this for evalbytes, fc and say. __SUB__ didn't note that it
was also always available with a CORE:: prefix. Now the descriptions are
consistent for all feature-enabled keywords.

11 years agounset PERLDB_OPTS environment variable or rt-61222 might hang.
Todd Rinaldo [Tue, 7 Feb 2012 21:42:10 +0000 (15:42 -0600)]
unset PERLDB_OPTS environment variable or rt-61222 might hang.


11 years agoadd --quiet to silence noisy tests
Robin Barker [Tue, 7 Feb 2012 20:13:41 +0000 (20:13 +0000)]
add --quiet to silence noisy tests

The ext/Pod-Html tests generate warnings that appear in the output.
This patch adds --quiet to the function call to silence the
warnings, without (I hope) changing the point of the tests.

11 years agoFix skip count for B using tests in PerlIO::Scalar
David Leadbeater [Sun, 12 Feb 2012 21:54:41 +0000 (13:54 -0800)]
Fix skip count for B using tests in PerlIO::Scalar

11 years agoReplace `char * ptr` with `char *ptr`
Alan Haggai Alavi [Fri, 19 Aug 2011 19:40:53 +0000 (01:10 +0530)]
Replace `char * ptr` with `char *ptr`

Changed pointer declaration style for consistency.

11 years agoVMS does have strptime.
Craig A. Berry [Sun, 12 Feb 2012 16:19:55 +0000 (10:19 -0600)]
VMS does have strptime.

And has had since version 6.2 in 1995.

11 years agoUse the strptime() probe in POSIX.xs & tests
Ævar Arnfjörð Bjarmason [Sun, 12 Feb 2012 14:35:50 +0000 (14:35 +0000)]
Use the strptime() probe in POSIX.xs & tests

My merge of strptime() in v5.15.7-367-g0e58213 would break systems
that didn't have strptime in the C library, use the probe H.Merijn
Brand kindly provided in v5.15.7-370-g8852e31 to deal with that.

Now we'll just croak on systems without strptime(3) if the
POSIX::strptime() function is called, in the same way we croak for
other unimplemented functions in there:

    $ ./perl -Ilib -MPOSIX=strptime -e 'strptime(qw/foo bar/)'
    POSIX::strptime not implemented on this architecture at -e line 1.

This patch is best viewed with the -w option to show or git log, I've
re-indented some code in time.t for the new SKIP block I've added.

11 years agoAdd strptime probe
H.Merijn Brand [Sun, 12 Feb 2012 13:38:30 +0000 (14:38 +0100)]
Add strptime probe

11 years agoCast around signedness warnings in POSIX's new strptime.
Craig A. Berry [Sun, 12 Feb 2012 12:10:42 +0000 (06:10 -0600)]
Cast around signedness warnings in POSIX's new strptime.

11 years agofix -DPERL_GLOBAL_STRUCT compilation error introduced in e8570548
Tony Cook [Sun, 12 Feb 2012 02:04:53 +0000 (03:04 +0100)]
fix -DPERL_GLOBAL_STRUCT compilation error introduced in e8570548

11 years agoMerge branch 'avar/POSIX-strptime' into blead
Ævar Arnfjörð Bjarmason [Sat, 11 Feb 2012 22:31:03 +0000 (22:31 +0000)]
Merge branch 'avar/POSIX-strptime' into blead

Merge my rebased version of Paul "LeoNerd" Evans's branch to blead
after I'd cherry-picked the unrelated a748fe1 commit out of it.

This may or may not be the perfect implementation of strptime, but it
seems to work well enough for me, the bugs that have been raised
against it have been addressed, and it's going to work a hell of a lot
better than not having any strptime support at all.

11 years agoMore obvious variable names and neater code in strptime()
Paul "LeoNerd" Evans [Wed, 8 Feb 2012 16:24:35 +0000 (16:24 +0000)]
More obvious variable names and neater code in strptime()

11 years agostr_offset ought to be a STRLEN, not an int
Paul "LeoNerd" Evans [Wed, 8 Feb 2012 15:52:32 +0000 (15:52 +0000)]
str_offset ought to be a STRLEN, not an int

11 years agoIf strptime() is called with UTf-8 string but legacy format, then downgrade the strin...
Paul "LeoNerd" Evans [Thu, 2 Feb 2012 22:44:00 +0000 (22:44 +0000)]
If strptime() is called with UTf-8 string but legacy format, then downgrade the string to match; taking care to handle pos() counts both sides

11 years agoIf strptime() is called with legacy string but UTF-8 format, then upgrade the string...
Paul "LeoNerd" Evans [Thu, 2 Feb 2012 22:17:46 +0000 (22:17 +0000)]
If strptime() is called with legacy string but UTF-8 format, then upgrade the string to match; taking care to handle pos() counts both sides

11 years agoSmall refactor of string offset code in POSIX::strptime() to hopefully better handle...
Paul "LeoNerd" Evans [Wed, 1 Feb 2012 20:10:25 +0000 (20:10 +0000)]
Small refactor of string offset code in POSIX::strptime() to hopefully better handle mixed UTF-8/non between str and fmt

11 years agoWhen strptime() receives a reference, ensure it's a mutable scalar
Paul "LeoNerd" Evans [Wed, 1 Feb 2012 19:37:34 +0000 (19:37 +0000)]
When strptime() receives a reference, ensure it's a mutable scalar

11 years agoYield -1 as undef from POSIX::strptime(); ensure that mktime() isn't biased by sec...
Paul "LeoNerd" Evans [Wed, 1 Feb 2012 19:19:51 +0000 (19:19 +0000)]
Yield -1 as undef from POSIX::strptime(); ensure that mktime() isn't biased by sec/min/hour = -1

11 years agoActually implement @EXPORT_OK of strptime correctly; delete'ing an undef element...
Paul "LeoNerd" Evans [Wed, 1 Feb 2012 19:06:59 +0000 (19:06 +0000)]
Actually implement @EXPORT_OK of strptime correctly; delete'ing an undef element yields false so ... and push ... would never have worked

11 years agoSolaris needs _STRPTIME_DONTZERO in order not to zero out all the untouched fields...
Paul "LeoNerd" Evans [Tue, 31 Jan 2012 19:30:09 +0000 (19:30 +0000)]
Solaris needs _STRPTIME_DONTZERO in order not to zero out all the untouched fields in strptime(3)

11 years agoFix ext/POSIX/t/time.t test 17's name to be a) unique, and b) factually accurate
Paul "LeoNerd" Evans [Tue, 31 Jan 2012 18:17:16 +0000 (18:17 +0000)]
Fix ext/POSIX/t/time.t test 17's name to be a) unique, and b) factually accurate

11 years agoRemember to init_tm() the struct tm before strptime()ing it; a workaround for some...
Paul "LeoNerd" Evans [Sat, 28 Jan 2012 15:14:59 +0000 (15:14 +0000)]
Remember to init_tm() the struct tm before strptime()ing it; a workaround for some architectures that have extra fields

11 years agoDetect failure of mktime(), return error
Paul "LeoNerd" Evans [Sat, 28 Jan 2012 15:07:00 +0000 (15:07 +0000)]
Detect failure of mktime(), return error

11 years agoDon't use 1906 to test strptime/mktime because it yields a negative time_t value
Paul "LeoNerd" Evans [Sat, 28 Jan 2012 15:02:48 +0000 (15:02 +0000)]
Don't use 1906 to test strptime/mktime because it yields a negative time_t value

11 years agoBump version number in
Paul "LeoNerd" Evans [Thu, 29 Dec 2011 23:38:56 +0000 (23:38 +0000)]
Bump version number in

11 years agoAdded some docs about new POSIX::strptime()
Paul "LeoNerd" Evans [Fri, 23 Dec 2011 18:17:12 +0000 (18:17 +0000)]
Added some docs about new POSIX::strptime()

11 years agomktime() before returning result from strptime(), to ensure wday/yday/isdst fields...
Paul "LeoNerd" Evans [Wed, 21 Dec 2011 00:10:41 +0000 (00:10 +0000)]
mktime() before returning result from strptime(), to ensure wday/yday/isdst fields are correct

11 years agoAccept strptime \$str, "format" to use/set pos() magic at parsing position
Paul "LeoNerd" Evans [Fri, 23 Dec 2011 17:50:43 +0000 (17:50 +0000)]
Accept strptime \$str, "format" to use/set pos() magic at parsing position

11 years agoInitial hack at strptime(); just literal strings for now
Paul "LeoNerd" Evans [Sun, 18 Dec 2011 23:25:03 +0000 (23:25 +0000)]
Initial hack at strptime(); just literal strings for now

11 years agoAmmend comment referring to init_tm() to point to its correct location
Paul "LeoNerd" Evans [Sat, 28 Jan 2012 15:12:47 +0000 (15:12 +0000)]
Ammend comment referring to init_tm() to point to its correct location

11 years agoperldelta: Note is_utf8_char_buf() and is_utf8_char()
Karl Williamson [Sat, 11 Feb 2012 21:54:24 +0000 (14:54 -0700)]
perldelta: Note is_utf8_char_buf() and is_utf8_char()

11 years agoChange =head1 to =head2 in perldelta
Karl Williamson [Sat, 11 Feb 2012 21:40:02 +0000 (14:40 -0700)]
Change =head1 to =head2 in perldelta

11 years agoDeprecate is_utf8_char()
Karl Williamson [Sat, 11 Feb 2012 21:20:56 +0000 (14:20 -0700)]
Deprecate is_utf8_char()

This function assumes that there is enough space in the buffer to read
however many bytes are indicated by the first byte in the alleged UTF-8
encoded string.  This may not be true, and so it can read beyond the
buffer end.  is_utf8_char_buf() should be used instead.

11 years agoAdd is_utf8_char_buf()
Karl Williamson [Sat, 11 Feb 2012 21:04:39 +0000 (14:04 -0700)]
Add is_utf8_char_buf()

This function is to replace is_utf8_char(), and requires an extra
parameter to ensure that it doesn't read beyond the end of the buffer.

Convert is_utf8_char() and the only place in the Perl core to use the
new one, assuming in each that there is enough space.

Thanks to Jarkko Hietaniemi for suggesting this function name

11 years agoExtUtils::Install: Fix POD error
Dominic Hargreaves [Sat, 11 Feb 2012 21:18:06 +0000 (14:18 -0700)]
ExtUtils::Install: Fix POD error

11 years agoTerm-Cap/ Fix POD errors
Dominic Hargreaves [Sat, 11 Feb 2012 21:13:07 +0000 (14:13 -0700)]
Term-Cap/ Fix POD errors

11 years agointrpvar.h: Rmv no longer used PL_ variable
Karl Williamson [Sat, 11 Feb 2012 20:43:26 +0000 (13:43 -0700)]
intrpvar.h: Rmv no longer used PL_ variable

Commit 24caacbccae7b938deecdcc3f13dd66c9c6a684e removed all uses of this
variable, but failed to remove it.

11 years agoregcomp.c: /[[:lower:]]/i should match the same as /\p{Lower}/i
Karl Williamson [Sat, 11 Feb 2012 17:49:06 +0000 (10:49 -0700)]
regcomp.c: /[[:lower:]]/i should match the same as /\p{Lower}/i

Same for [[:upper:]] and \p{Upper}.  These were matching instead all of
[[:alpha:]] or \p{Alpha}.  What /\p{Lower}/i and /\p{Upper}/i match instead
is \p{Cased}, and so that is what these should match.

11 years agoGeneral-purpose symbol shortening for VMS.
Craig A. Berry [Sat, 11 Feb 2012 20:17:12 +0000 (14:17 -0600)]
General-purpose symbol shortening for VMS.

Some folks like to write long sentences and then use them as
variable names, which doesn't come up that often, but when it
does, the build on VMS falls down hard if any of the resulting
symbols is longer than 31 characters.  The problem is not for
the compiler, which when using /NAMES=SHORTENED (which we now do
by default) will shorten the symbols, but for the linker, which
must have an exact list of the symbol names to be exported when
creating the perlshr.exe shareable image.

That list of potentially shortened symbols goes in a linker options
file created by vms/  Until now we had no recourse
but to hard-code there a mapping of long symbols to shortened ones,
but the AUTODIN-II polynomial used by the compiler to do the
shortening is (partially) documented under the help for CC/NAMES,
and it was possible to extrapolate from there and create a pure-
Perl implementation that mimics precisely what the C compiler (and
the C++ compiler under "extern C" declarations) use for shortening
long symbol names.

Symbols like Perl__it_was_the_best_of_times_it_was_the_worst_of_times
can now be created freely without causing the VMS linker to seize up.

11 years agoregcomp.c: Remove outdated #undef
Karl Williamson [Sat, 11 Feb 2012 20:20:45 +0000 (13:20 -0700)]
regcomp.c: Remove outdated #undef

11 years agomktables: Update comments, variable names
Karl Williamson [Sat, 11 Feb 2012 17:00:11 +0000 (10:00 -0700)]
mktables: Update comments, variable names

Commit d11155ec2b4e3f6cf952e2a25615aec506a8e296 changed the format of
some of the generated tables, but I left some of the old comments and
variable names the same in order to not make this already large commit
bigger.  This updates these to reflect the new format.

It also refactors one 'if' statement to not use a block.

11 years agoregcomp.c: Remove duplicate inversion list
Karl Williamson [Fri, 10 Feb 2012 17:35:48 +0000 (10:35 -0700)]
regcomp.c: Remove duplicate inversion list

\h and \p{XPosixBlank} contain the same code points, so there is no need
to have both of them.

11 years agohandle conditional definition of PL_check_mutex
Zefram [Sat, 11 Feb 2012 17:14:45 +0000 (17:14 +0000)]
handle conditional definition of PL_check_mutex

PL_check_mutex only exists on threading builds, so needs to
know about that conditionality to produce correct export lists.

11 years agoadd wrap_op_checker() API function
Zefram [Sat, 11 Feb 2012 11:05:51 +0000 (11:05 +0000)]
add wrap_op_checker() API function

This function provides a convenient and thread-safe way for modules to
hook op checking.

11 years agorestore ExtUtils-ParseXS portability to Perl 5.6
Zefram [Sat, 11 Feb 2012 08:35:35 +0000 (08:35 +0000)]
restore ExtUtils-ParseXS portability to Perl 5.6

11 years agoupdate ExtUtils-ParseXS to CPAN version 3.15
Zefram [Sat, 11 Feb 2012 08:30:03 +0000 (08:30 +0000)]
update ExtUtils-ParseXS to CPAN version 3.15

Ensure that every module in the ExtUtils-ParseXS distribution has

11 years agoUCD.t: white-space only
Karl Williamson [Fri, 10 Feb 2012 23:18:23 +0000 (16:18 -0700)]
UCD.t: white-space only

This outdents some statements that are no longer enclosed in a block