This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
2 years agoPrint a deprecation warning if downgrading to a use VERSION below v5.11
Paul "LeoNerd" Evans [Sat, 5 Feb 2022 02:20:13 +0000 (02:20 +0000)]
Print a deprecation warning if downgrading to a use VERSION below v5.11

2 years agoAdd a PL_prevailing_version interpreter var
Paul "LeoNerd" Evans [Sat, 5 Feb 2022 02:05:56 +0000 (02:05 +0000)]
Add a PL_prevailing_version interpreter var

Save/restore PL_prevailing_version at SAVEHINTS time

Have PL_prevailing_version track the applied use VERSION currently in scope

2 years agoAdd tests for string "-Inf" to IV conversion.
TAKAI Kousuke [Sat, 12 Feb 2022 05:18:44 +0000 (14:18 +0900)]
Add tests for string "-Inf" to IV conversion.

While a numeric -Inf is treated as IV_MIN in IV context (such as
operands for bitwise operators under "use integer"), string "-Inf"
used to yield some random (zero, or previously assigned) value in
such context.

2 years agosv.c: String "Inf" is now consistently converted to IV/UV
TAKAI Kousuke [Wed, 9 Feb 2022 13:42:56 +0000 (22:42 +0900)]
sv.c: String "Inf" is now consistently converted to IV/UV

S_sv_2iuv_common() used to fail to set IV/UV slot on direct conversion
from string "Inf" to IV/UV, so such conversion would return garbage on
the memory.  Now it will return the same result with two-staged
conversions, string to NV first and then NV to IV/UV.

2 years agot/porting/diag.t: Fix typo in comment
Karl Williamson [Thu, 10 Feb 2022 20:40:05 +0000 (13:40 -0700)]
t/porting/diag.t: Fix typo in comment

2 years agoDocument that $^S is 1 inside a try block
Paul "LeoNerd" Evans [Tue, 8 Feb 2022 17:06:03 +0000 (17:06 +0000)]
Document that $^S is 1 inside a try block

2 years agoUpdate perldiag and perldeprecation for features removed in 5.30
Dagfinn Ilmari Mannsåker [Mon, 7 Feb 2022 18:11:17 +0000 (18:11 +0000)]
Update perldiag and perldeprecation for features removed in 5.30

Remove the perldiag entry for `my` in false conditional, and change
the perldiag entries to past tense.

Also correct the description of what actually happened to
`File::Glob::glob()`.

2 years agoMark lib/warnings.pm and warnings.h as generated
Dagfinn Ilmari Mannsåker [Mon, 7 Feb 2022 18:18:05 +0000 (18:18 +0000)]
Mark lib/warnings.pm and warnings.h as generated

2 years agoUpdate perlhactips for bool changes
Karl Williamson [Wed, 2 Feb 2022 03:17:59 +0000 (20:17 -0700)]
Update perlhactips for bool changes

This changes this doc to reflect the changes in the past few commits

2 years agoSimplify cBOOL defn
Karl Williamson [Wed, 2 Feb 2022 03:05:49 +0000 (20:05 -0700)]
Simplify cBOOL defn

This existed because there wasn't a compiler bool necessarily, and
made complicated to workaround a bug in an AIX compiler as of 2010-ish.
Now that C99 is required, there always is a bool type; we don't know if
the bug existed in a C99 mode for the broken compiler, and sufficient
time has passed that it should have been fixed nonetheless.

This was tested on

IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72)
Version: 12.01.0000.0012

which dates to about 2012.

2 years agoRemove HAS_BOOL
Karl Williamson [Wed, 2 Feb 2022 03:03:46 +0000 (20:03 -0700)]
Remove HAS_BOOL

This is no longer used in core.  It occurs twice in metacpan, both to
define it so as to fool core into thinking it is there; hence it isn't
actually used at all in cpan.

2 years agoRemove PERL_BOOL_AS_CHAR uses; always define HAS_BOOL
Karl Williamson [Wed, 2 Feb 2022 02:50:45 +0000 (19:50 -0700)]
Remove PERL_BOOL_AS_CHAR uses; always define HAS_BOOL

Now that C99 is required, bool is always defined, so HAS_BOOL should
also always be defined.

PERL_BOOL_AS_CHAR was used to workaround problems when no bool type
existed, so it is obsolete, and in fact perl won't compile if
PERL_BOOL_AS_CHAR is #defined.  So remove it completely from being
looked at.

2 years agoUse `optexpr` in anonymous to reduce number of symbols
Branislav Zahradník [Thu, 23 Dec 2021 22:27:18 +0000 (23:27 +0100)]
Use `optexpr` in anonymous to reduce number of symbols

2 years agoUnify optional rules
Branislav Zahradník [Thu, 23 Dec 2021 22:25:49 +0000 (23:25 +0100)]
Unify optional rules

- start with `opt` (renamed `siglistornull`)
- employ bison's default rule whenever possible

2 years agoIntroduce rule `empty` returning NULL
Branislav Zahradník [Thu, 23 Dec 2021 22:24:52 +0000 (23:24 +0100)]
Introduce rule `empty` returning NULL

to save few keystrokes ...

2 years agoGather all MY variants into single rule
Branislav Zahradník [Thu, 23 Dec 2021 22:24:09 +0000 (23:24 +0100)]
Gather all MY variants into single rule

2 years agoFavour switch over if/else if to improve readability
Branislav Zahradník [Thu, 23 Dec 2021 22:20:01 +0000 (23:20 +0100)]
Favour switch over if/else if to improve readability

2 years agoCleanup remnants after distinguising C- and perly- literals
Branislav Zahradník [Thu, 23 Dec 2021 22:19:43 +0000 (23:19 +0100)]
Cleanup remnants after distinguising C- and perly- literals

2 years agoExpansions of PERLVAR* in intrpvar.h should not end in semicolons
Paul "LeoNerd" Evans [Sat, 5 Feb 2022 13:43:43 +0000 (13:43 +0000)]
Expansions of PERLVAR* in intrpvar.h should not end in semicolons

2 years agomake autodoc.pl and makedef.pl understand the I embed.fnc flag
Tomasz Konojacki [Fri, 4 Feb 2022 17:18:08 +0000 (18:18 +0100)]
make autodoc.pl and makedef.pl understand the I embed.fnc flag

It's needed in case a publicly visible PERL_STATIC_FORCE_INLINE
function is added.

2 years agoembedvar.h is a generated file
Paul "LeoNerd" Evans [Thu, 3 Feb 2022 17:17:46 +0000 (17:17 +0000)]
embedvar.h is a generated file

2 years agoAugment overload::Method docs
Hugo van der Sanden [Thu, 3 Feb 2022 02:26:07 +0000 (02:26 +0000)]
Augment overload::Method docs

2 years agotoke.c: Fix potential C sign error
Karl Williamson [Sat, 22 Jan 2022 21:41:27 +0000 (14:41 -0700)]
toke.c: Fix potential C sign error

Taking (UV)(* char) isn't what was meant.  Instead it should be
       (UV) * (U8 *)(char).
(and the UV cast becomes irrelevant in this case).

If the C compiler defaults char to unsigned, it doesn't matter.  Nor
does it matter if the char value is positive.  But it gives the wrong
result when 'char' means 'signed char' and the value is negative.

Experimentally adding non-ASCII brackets to this code showed up this
error.

2 years agoRefactor utf8 to code point conversion
Karl Williamson [Thu, 13 May 2021 14:50:23 +0000 (08:50 -0600)]
Refactor utf8 to code point conversion

Most such conversions occur in the inlined function
Perl_utf8n_to_uvchr_msgs(), which several macros like utf8n_to_uvchr()
expand to.

This commit effectively removes a conditional from inside the loop, and
avoids some conditionals when converting the common case of the input
being UTF-8 invariant (ASCII on ASCII platforms).

Prior to this commit, the code did something different the first time
through the loop than the other times.  By hoisting that to pre-loop
initialization, that conditional is removed from each iteration.  That
meant rearranging the loop to be a while(1), and have its exit
conditions in the middle.

All calls to this function from the Perl core pass in a non-empty
string.  But outside calls could conceivably pass an empty one which
could lead to reading outside the buffer.  An extra check is added to
non-core calls, as is already done elsewhere.

This change means that calls from core execute no more conditionals than
the typical:

    if (UTF8_IS_INVARIANT(*s)) {
        code_point = *s;
    }
    else {
        code_point = utf8n_to_uvchr(s, ...)
    }

I'm therefore thinking these can now just be replaced by the simpler

    code_point = utf8n_to_uvchr(s, ...)

without a noticeable hit in performance.  The essential difference is
that the former gets its code point from the string already being
examined, and the latter looks up data in a 450 byte static array that
is referred to constantly, so is likely to be cached.

2 years agobuiltin.c: Fix up 730f927
Karl Williamson [Wed, 2 Feb 2022 01:58:08 +0000 (18:58 -0700)]
builtin.c: Fix up 730f927

That commit got pushed without a needed fix.

2 years agobuiltin.c: Use correct 32bit printing format
Karl Williamson [Wed, 2 Feb 2022 01:58:08 +0000 (18:58 -0700)]
builtin.c: Use correct 32bit printing format

Perl has no convenient way to portably print values that are explicitly
32 bit: I32 and U32.  This is because Configure for some platforms makes
these longs (even if an int would do) and for others they end up being
ints.

The best we can do, without other changes, is use IVdf or UVdf and cast
the values to IV or UV.

2 years agoTest for Issue #19250, assert fail with Debug=>ALL
Yves Orton [Sun, 23 Jan 2022 08:58:54 +0000 (09:58 +0100)]
Test for Issue #19250, assert fail with Debug=>ALL

2 years agoUse sha256 instead of sha1 in release announcement
Michiel Beijen [Tue, 1 Feb 2022 21:30:00 +0000 (22:30 +0100)]
Use sha256 instead of sha1 in release announcement

The last time perl got released, there was this comment:

https://www.nntp.perl.org/group/perl.perl5.porters/2022/01/msg262480.html

> Why use the old ( and somewhat broken ) SHA1 for message digests?

I decided to look into using SHA256;
I notice that the release managers guide gets the SHA1s from the PAUSE
email. So I've made a PR from PAUSE so that they no longer send SHA1s
(or MD5SUMS for that matter) but just SHA256. That change is live
already, see https://github.com/andk/pause/pull/379

So now the next step is to update the perl release documentation to deal
with the new reality that PAUSE mails no longer incluse sha1s!

2 years agoFixup Issue #19350 - Assert error under: use re Debug=>"ALL"
Yves Orton [Sun, 23 Jan 2022 14:55:13 +0000 (15:55 +0100)]
Fixup Issue #19350 - Assert error under: use re Debug=>"ALL"

In 7c932d07cab18751bfc7515b4320436273a459e2 karl changed the regex
parser to not do two passes always, and instead do one if it could.
However in some edge cases it still must do a second past and some of
the info needed for the Debug => "All" would not be available during the
first pass.

This was compounded by S_add_data() validly returning a 0 index for data
that was stored in the data array, which meant that there was no way to
tell the difference between "we dont have the data to call S_add_data()
at all" and "we called S_add_data() and it returned 0", this in turn
would cause the dumping logic to try to access data that was not there,
and misinterpret it as a valid SV, with ensure assert fails or worse
segfaults.

This patch changes S_add_data() so it always returns a non-zero return,
so that the regex debug logic can tell that it shouldnt do a lookup into
the data array. This means create a new "what" type of "%", which is
used SOLELY to populate the ->data[0] and ->what[0] with a dummy entry.

With this done we can add guard statements to places that lookup things
in the data array, if the index is 0 it can not be valid.

2 years agoembed.fnc Fix function return type
Karl Williamson [Tue, 1 Feb 2022 00:17:33 +0000 (17:17 -0700)]
embed.fnc Fix function return type

2 years agoAdd @_ in signatured sub being experimental to perldelta.pod
Paul "LeoNerd" Evans [Mon, 31 Jan 2022 11:38:53 +0000 (11:38 +0000)]
Add @_ in signatured sub being experimental to perldelta.pod

2 years agoPut some wording into perlsub.pod about @_ being discouraged in signatured subs
Paul "LeoNerd" Evans [Wed, 19 Jan 2022 18:16:15 +0000 (18:16 +0000)]
Put some wording into perlsub.pod about @_ being discouraged in signatured subs

2 years agoEmit experimental::snail_in_signatures warnings on uses of @_ (aka "snail") in signat...
Paul "LeoNerd" Evans [Fri, 28 Jan 2022 17:42:21 +0000 (17:42 +0000)]
Emit experimental::snail_in_signatures warnings on uses of @_ (aka "snail") in signatured subs

2 years agoAdd a new 'experimental::snail_in_signatures' warning category
Paul "LeoNerd" Evans [Fri, 28 Jan 2022 17:38:42 +0000 (17:38 +0000)]
Add a new 'experimental::snail_in_signatures' warning category

2 years agoSet the CvSIGNATURE flag on signatured subs
Paul "LeoNerd" Evans [Thu, 20 Jan 2022 19:50:47 +0000 (19:50 +0000)]
Set the CvSIGNATURE flag on signatured subs

2 years agoDefine a CvSIGNATURE flag
Paul "LeoNerd" Evans [Mon, 6 Dec 2021 18:31:34 +0000 (18:31 +0000)]
Define a CvSIGNATURE flag

2 years agoSynch in CPAN-2.33-TRIAL
James E Keenan [Sun, 30 Jan 2022 14:18:07 +0000 (14:18 +0000)]
Synch in CPAN-2.33-TRIAL

For: https://github.com/Perl/perl5/issues/19358.

Used tarball from:
http://ftp.cpan.org/pub/CPAN/authors/id/A/AN/ANDK/CPAN-2.33-TRIAL.tar.gz

2 years agosubroutine redefinitions made with local() shouldn't warn
Tomasz Konojacki [Wed, 26 Jan 2022 23:55:21 +0000 (00:55 +0100)]
subroutine redefinitions made with local() shouldn't warn

The following code will no longer warn:

  use warnings 'redefine';
  sub foo {}
  local *foo = sub{};

The main purpose of local() is to temporarily redefine stuff, so it
doesn't make sense to warn about it.

2 years agoAlso document and unit-test the correct handling of UTF-8
Paul "LeoNerd" Evans [Thu, 27 Jan 2022 11:29:42 +0000 (11:29 +0000)]
Also document and unit-test the correct handling of UTF-8

2 years agoAdd perldelta entry for the four new functions
Paul "LeoNerd" Evans [Thu, 27 Jan 2022 00:54:53 +0000 (00:54 +0000)]
Add perldelta entry for the four new functions

2 years agoMinor docs wording fixes
Paul "LeoNerd" Evans [Thu, 27 Jan 2022 00:46:42 +0000 (00:46 +0000)]
Minor docs wording fixes

2 years agoClarify in docs that sv_eq* don't handle operator overloading; point to the sv_streq...
Paul "LeoNerd" Evans [Thu, 27 Jan 2022 00:33:51 +0000 (00:33 +0000)]
Clarify in docs that sv_eq* don't handle operator overloading; point to the sv_streq* funcs instead

2 years agoDocs clarification that the basic sv_*eq() functions behave like the corresponding...
Paul "LeoNerd" Evans [Thu, 27 Jan 2022 00:27:16 +0000 (00:27 +0000)]
Docs clarification that the basic sv_*eq() functions behave like the corresponding obvious perl code

2 years agoSlight tidying of tests
Paul "LeoNerd" Evans [Thu, 27 Jan 2022 00:25:52 +0000 (00:25 +0000)]
Slight tidying of tests

2 years agoCreate sv_streq() API family, as a stringy copy of the sv_numeq() ones
Paul "LeoNerd" Evans [Thu, 27 Jan 2022 00:24:49 +0000 (00:24 +0000)]
Create sv_streq() API family, as a stringy copy of the sv_numeq() ones

2 years agoHave sv_numeq() respect == overloading unless the SV_SKIP_OVERLOAD flag is passed
Paul "LeoNerd" Evans [Tue, 14 Sep 2021 20:30:42 +0000 (21:30 +0100)]
Have sv_numeq() respect == overloading unless the SV_SKIP_OVERLOAD flag is passed

2 years agoInitial implementation of sv_numeq() and _flags() variant
Paul "LeoNerd" Evans [Sun, 12 Sep 2021 15:03:12 +0000 (16:03 +0100)]
Initial implementation of sv_numeq() and _flags() variant

2 years agoAdd test for experimental::builtin warnings
Dagfinn Ilmari Mannsåker [Sat, 22 Jan 2022 18:28:14 +0000 (18:28 +0000)]
Add test for experimental::builtin warnings

2 years agoWarn about experimental builtins at runtime as well as compile time
Dagfinn Ilmari Mannsåker [Sat, 22 Jan 2022 16:49:37 +0000 (16:49 +0000)]
Warn about experimental builtins at runtime as well as compile time

For when the functions are called via reference or perl4-style &foo syntax.

2 years agoFix bundled .pm files for experimental::builtin warnings
Paul "LeoNerd" Evans [Fri, 21 Jan 2022 18:37:38 +0000 (18:37 +0000)]
Fix bundled .pm files for experimental::builtin warnings

2 years agoFix lib/unicore/mktables for experimental::builtin warnings
Paul "LeoNerd" Evans [Fri, 21 Jan 2022 18:39:15 +0000 (18:39 +0000)]
Fix lib/unicore/mktables for experimental::builtin warnings

2 years agoFix unit tests for experimental::builtin warnings
Paul "LeoNerd" Evans [Fri, 21 Jan 2022 18:37:26 +0000 (18:37 +0000)]
Fix unit tests for experimental::builtin warnings

2 years agoEmit experimental::builtin warnings from the builtin function callchecker
Paul "LeoNerd" Evans [Sat, 18 Dec 2021 22:35:51 +0000 (22:35 +0000)]
Emit experimental::builtin warnings from the builtin function callchecker

2 years agoAdd experimental::builtin warning
Paul "LeoNerd" Evans [Sat, 18 Dec 2021 22:03:20 +0000 (22:03 +0000)]
Add experimental::builtin warning

2 years agoRemove remaining uses of @_ in signatured subs in lib/unicore/mktables
Paul "LeoNerd" Evans [Mon, 24 Jan 2022 13:48:57 +0000 (13:48 +0000)]
Remove remaining uses of @_ in signatured subs in lib/unicore/mktables

2 years agoAdd ceil & floor to builtin
James Raspass [Sat, 22 Jan 2022 11:07:58 +0000 (11:07 +0000)]
Add ceil & floor to builtin

2 years agoregcomp.c: Fix undefined behavior
Karl Williamson [Sun, 23 Jan 2022 22:16:07 +0000 (15:16 -0700)]
regcomp.c: Fix undefined behavior

Spotted by ASAN.  To shift 31 bits in a 32 bit word, it has to be
unsigned.

2 years agoperl.h: Add comments
Karl Williamson [Sun, 23 Jan 2022 15:06:39 +0000 (08:06 -0700)]
perl.h: Add comments

2 years agoAdd '=cut' to silence POD formatting warning
James E Keenan [Fri, 21 Jan 2022 16:56:25 +0000 (16:56 +0000)]
Add '=cut' to silence POD formatting warning

2 years agoUpdate epigraph for 5.35.8
Nicolas R [Thu, 20 Jan 2022 22:58:03 +0000 (16:58 -0600)]
Update epigraph for 5.35.8

2 years ago Bumped Module-CoreList ready for 5.35.9
Nicolas R [Thu, 20 Jan 2022 23:39:07 +0000 (17:39 -0600)]
 Bumped Module-CoreList ready for 5.35.9

2 years agoBump B::OP_private version
Nicolas R [Thu, 20 Jan 2022 23:16:58 +0000 (17:16 -0600)]
Bump B::OP_private version

2 years agoBump the perl version in various places for 5.35.9
Nicolas R [Thu, 20 Jan 2022 23:13:16 +0000 (17:13 -0600)]
Bump the perl version in various places for 5.35.9

2 years agoNew perldelta for 5.35.9
Nicolas R [Thu, 20 Jan 2022 23:05:26 +0000 (17:05 -0600)]
New perldelta for 5.35.9

2 years agoTick off 5.35.8
Nicolas R [Thu, 20 Jan 2022 22:59:13 +0000 (16:59 -0600)]
Tick off 5.35.8

2 years agoAdded 5.35.8 to perlhist v5.35.8
Nicolas R [Thu, 20 Jan 2022 21:17:58 +0000 (14:17 -0700)]
Added 5.35.8 to perlhist

2 years agoUpdate Module::CoreList for 5.35.8
Nicolas R [Thu, 20 Jan 2022 21:13:26 +0000 (14:13 -0700)]
Update Module::CoreList for 5.35.8

2 years agoUpdate perldelta for blead release v5.35.8
Nicolas R [Thu, 20 Jan 2022 18:55:58 +0000 (11:55 -0700)]
Update perldelta for blead release v5.35.8

2 years agoAdjust prediction year for 5.34.1
Nicolas R [Thu, 20 Jan 2022 21:04:07 +0000 (14:04 -0700)]
Adjust prediction year for 5.34.1

2 years agoUpdate Perl copyright for 2022
Nicolas R [Thu, 20 Jan 2022 20:42:40 +0000 (13:42 -0700)]
Update Perl copyright for 2022

2 years agoAdd mailmap entry for Mike
Nicolas R [Thu, 20 Jan 2022 20:39:51 +0000 (13:39 -0700)]
Add mailmap entry for Mike

2 years agoAdd a pod sort sample with function signature
Nicolas R [Tue, 18 Jan 2022 00:08:55 +0000 (17:08 -0700)]
Add a pod sort sample with function signature

GH #19344

Provide a sample for sort using function signature.

2 years agoUpdate bignum to CPAN version 0.64
Nicolas R [Thu, 20 Jan 2022 17:18:59 +0000 (10:18 -0700)]
Update bignum to CPAN version 0.64

    [DELTA]

 * Fix CPAN RT #140470. The pragmas ignored user-specified backend libraries.
   Add tests to verify the fix.

 * Add missing documentation.

2 years agoUpdate Math-BigInt to CPAN version 1.999829
Nicolas R [Thu, 20 Jan 2022 17:21:30 +0000 (10:21 -0700)]
Update Math-BigInt to CPAN version 1.999829

    [DELTA]

 * Improve methods div_scale() and round_mode() so they work better with
   subclasses. This fixes CPAN RT #125430.

 * Make div_scale() accept a Math::Big(Int|Float|Rat) object as input. This
   fixes CPAN RT #140599.

2 years agoAdd perldelta entry for try/catch/finally
Paul "LeoNerd" Evans [Thu, 20 Jan 2022 19:49:12 +0000 (19:49 +0000)]
Add perldelta entry for try/catch/finally

2 years agoImplement correct deparse logic for try/catch/finally
Paul "LeoNerd" Evans [Tue, 18 Jan 2022 21:40:54 +0000 (21:40 +0000)]
Implement correct deparse logic for try/catch/finally

2 years agoEnsure that forbidden control flow messages about finally blocks say "finally" and...
Paul "LeoNerd" Evans [Thu, 13 Jan 2022 17:14:32 +0000 (17:14 +0000)]
Ensure that forbidden control flow messages about finally blocks say "finally" and not "defer"

2 years agoDocument the new try/catch/finally syntax
Paul "LeoNerd" Evans [Thu, 16 Dec 2021 22:13:00 +0000 (22:13 +0000)]
Document the new try/catch/finally syntax

2 years agoImplement and test try/catch/finally syntax
Paul "LeoNerd" Evans [Thu, 16 Dec 2021 22:12:27 +0000 (22:12 +0000)]
Implement and test try/catch/finally syntax

2 years agoAdd op_wrap_finally() convenience function
Paul "LeoNerd" Evans [Thu, 16 Dec 2021 21:43:08 +0000 (21:43 +0000)]
Add op_wrap_finally() convenience function

2 years agoDefine 'finally' keyword
Paul "LeoNerd" Evans [Thu, 16 Dec 2021 18:33:58 +0000 (18:33 +0000)]
Define 'finally' keyword

2 years agoMake sure to rpeep() the body of catch {} blocks
Paul "LeoNerd" Evans [Thu, 20 Jan 2022 14:28:04 +0000 (14:28 +0000)]
Make sure to rpeep() the body of catch {} blocks

2 years agoProvide inclusive names allowlist and denylist
Mike Fulton [Sat, 15 Jan 2022 00:23:47 +0000 (16:23 -0800)]
Provide inclusive names allowlist and denylist

Updated the following files:
 AUTHORS:
  - corrected my email address
 MANIFEST:
  - added new testcases for Locale-Maketext
 dist/Locale-Maketext/ChangeLog:
  - short summary of changes made
 dist/Locale-Maketext/lib/Locale/Maketext.pm:
  - updated the version to 1.30
  - refactored the code to create a common method _include
    called by the allowlist and whitelist methods
    (whitelist is now an alias, deprecated method, for allowlist).
    The _include method now has an internal list called allowlist
    that is updated by calls to _include through whitelist or
    allowlist methods.
  - refactored the code to create a common method _exclude
    called by the denylist and blacklist methods
    (blacklist is now an alias, deprecated method, for denylist).
    The _exclude method now has an internal list called denylist
    that is updated by calls to _exclude through blacklist or
    denylist methods.
 dist/Locale-Maketext/lib/Locale/Maketext.pod:
  - documented allowlist and denylist as new methods
  - added a NOTE for allowlist and denylist indicating that
    they are now the preferred method names to use instead
    of whitelist and blacklist
 dist/Locale-Maketext/t/92_blacklist.t
  - updated the code to have messages in terms of allowlist
    and denylist. Actual code continues to test blacklist
    method.
 dist/Locale-Maketext/t/93_whitelist.t
  - updated the code to have messages in terms of allowlist
    and denylist. Actual code continues to test whitelist
    method.

Created 2 new testcases:

 dist/Locale-Maketext/t/94_denylist.t
  - this testcase is analagous to 92_blacklist.t but calls
    the denylist method instead of the blacklist method.

 dist/Locale-Maketext/t/95_allowlist.t
  - this testcase is analagous to 93_whitelist.t but calls
    the allowlist method instead of the whitelist method.

2 years agoperldelta for empty sort croak (78cc98885ff2800c)
David Mitchell [Wed, 19 Jan 2022 20:46:43 +0000 (20:46 +0000)]
perldelta for empty sort croak (78cc98885ff2800c)

2 years agot/porting/authors.t: Windows fixes
Tomasz Konojacki [Wed, 19 Jan 2022 18:47:39 +0000 (19:47 +0100)]
t/porting/authors.t: Windows fixes

^ is a shell metacharacter in cmd.exe, so it needs to be quoted.

Also, /dev/null doesn't exist on Windows.

2 years agomake a sort with zero args a compile-time err
David Mitchell [Wed, 19 Jan 2022 20:05:28 +0000 (20:05 +0000)]
make a sort with zero args a compile-time err

    @a = sort @empty; # unaffected
    @a = sort;        # now a compile-time error

the main motivation for this is to potentially be able to treat a
colon following the 'sort' keyword as part of the sort expression,
to then be able to add sort attributes at some point, e.g.
    @a = sort :num, 1,2,3;
rather than the colon being seen as part of a ?: conditional.

See http://nntp.perl.org/group/perl.perl5.porters/262425.

2 years agoStop setting console to "con" on non-MSWin systems
E. Choroba [Tue, 18 Jan 2022 17:20:34 +0000 (18:20 +0100)]
Stop setting console to "con" on non-MSWin systems

The condition has existed since eternity but it never made sense.
Only use "con" if $^O eq 'MSWin32'.

Also, remove MSDOS from the comment: it's the last forgotten mention
of the OS in the whole file.

2 years agofix commit calculations in authors porting test
Graham Knop [Wed, 19 Jan 2022 02:07:03 +0000 (03:07 +0100)]
fix commit calculations in authors porting test

For pull requests, the current commit is a merge commit simulated by
github. The first parent will be from blead - anything that has been
commited since the creation of the branch. The second parent will be the
last commit on the branch, which is what we want to test.

The commit range should be all of the commits in the second parent,
excluseding the first parent. We can use HEAD^1 and HEAD^2 for these.
The merge-base does not need to be precomputed, since the .. in the
commit range does that for us.

2 years agoUpdate Win32 to CPAN version 0.58
Chris 'BinGOs' Williams [Wed, 19 Jan 2022 14:00:58 +0000 (14:00 +0000)]
Update Win32 to CPAN version 0.58

  [DELTA]

0.58    [2022-01-17]
        - add Win32::HttpGetFile (thanks to Craig Berry for the implementation
          and Tomasz Konojacki for code review) [PR/30]
        - skip failing Unicode.t on Cygwin because cwd() no longer returns an
          ANSI (short) path there.
        - Fixed test 14,15 of GetFullPathName.t when package is unpacked in a
          top level folder (thanks to Jianhong Feng) [PR/20]

2 years agoUpdate NEXT to CPAN version 0.69
Chris 'BinGOs' Williams [Wed, 19 Jan 2022 13:58:16 +0000 (13:58 +0000)]
Update NEXT to CPAN version 0.69

  [DELTA]

0.69 2022-01-19 NEILB
    - Removed dependency on mro. PR#5 from HAARG++.
    - Only install in perl dirs on older perls with bad load order
      PR#6 from HAARG++.

2 years agoUpdate File-Fetch to CPAN version 1.04
Chris 'BinGOs' Williams [Tue, 18 Jan 2022 23:13:06 +0000 (23:13 +0000)]
Update File-Fetch to CPAN version 1.04

  [DELTA]

1.04        Tue Jan 18 20:46:04 2022

* Resolve test warnings reported in GitHub issue #22
  relating to Github's deprecation and removal of git:// protocol

* Pointed various RFC links in docs to ietf.org

2 years agoz/OS ASCII Enablement: Manage untagged header errno.h by copy & tag
Mike Fulton [Fri, 31 Dec 2021 19:25:41 +0000 (11:25 -0800)]
z/OS ASCII Enablement: Manage untagged header errno.h by copy & tag

   The system headers on z/OS are in EBCDIC, but are untagged. The bi-modal build requires that files be tagged correctly
   so this patch copies the errno.h file (which may be mounted on a read-only file system) to a local file and then tags
   it as IBM-1047 (EBCDIC) so that it can be processed properly. The longer-term fix for this may be to have z/OS tag
   header files as EBCDIC, although this would not be something Perl could rely on for several years.

2 years agoofficially support Visual C++ 2022
Tomasz Konojacki [Sun, 16 Jan 2022 18:35:44 +0000 (19:35 +0100)]
officially support Visual C++ 2022

No code changes are needed.

2 years agoPERL_SET_CONTEXT(t) needs to set PL_current_context from C++ too
Nicholas Clark [Sat, 8 Jan 2022 21:08:19 +0000 (21:08 +0000)]
PERL_SET_CONTEXT(t) needs to set PL_current_context from C++ too

We want to use C11 thread local storage where possible, as its read overhead
is lower. However C++ uses incompatible syntax for TLS, so we have to hide
the variable from C++ extensions, and have the read code "fall back" to the
pthread_getspecific() approach.

However, C++ extensions also need to be able to call PERL_SET_CONTEXT(t) and
have everything still work the same as C extensions. Hence they *also* need
to set PL_current_context - a variable that has to be hidden from them.
Hence change the version of the PERL_SET_CONTEXT macro used by C++
extensions from inline code to a call to Perl_set_context(), and have that
set PL_current_context (when used).

Technically this commit also fixes a bug in that Perl_set_context() is API
and should have been setting PL_current_context since that variable was
first introduced. In practice, likely nothing uses this API, as there is no
code on CPAN that calls it, and the macro PERL_SET_CONTEXT() is much more
prominent.

2 years agoFor C++ extensions, use the pthreads definition of PERL_GET_CONTEXT
Nicholas Clark [Tue, 4 Jan 2022 18:27:17 +0000 (18:27 +0000)]
For C++ extensions, use the pthreads definition of PERL_GET_CONTEXT

Configure probes the C compiler to find out whether it supports C11 thread
local storage, and if found uses this for PERL_SET_CONTEXT/PERL_GET_CONTEXT,
in preference to the pthread_setspecific()/pthread_getspecific() approach.

However, we can come unstuck with XS extensions written in C++, as C++ and C
disagree on the syntax used for thread local storage, meaning that the
working token that Configure probed for C turns out to be a compiler error
on C++.

As Configure doesn't have a way to probe for C++ dialects, we just take the
safe option and do the same as 5.34.0 and earlier - use pthreads on C++.

This commit is minimal because the implementation of PERL_SET_CONTEXT for
C11 thread local storage was already defensively written to *also* call
pthread_setspecific().

2 years agoUpdate File-Fetch to CPAN version 1.02
Chris 'BinGOs' Williams [Tue, 11 Jan 2022 12:21:27 +0000 (12:21 +0000)]
Update File-Fetch to CPAN version 1.02

  [DELTA]

1.02        Fri Jan  7 14:44:34 2022

* wget: use --passive-ftp switch only for ftp scheme

2 years agoEUPXS was updated on CPAN
Chris 'BinGOs' Williams [Tue, 11 Jan 2022 12:20:11 +0000 (12:20 +0000)]
EUPXS was updated on CPAN

2 years agoMake spelling of values for 'FILES' consistent 19336/head
James E Keenan [Sat, 8 Jan 2022 19:40:20 +0000 (19:40 +0000)]
Make spelling of values for 'FILES' consistent

While developing a program which require-s Porting/Maintainers.pl for
the data in %Modules, I noticed that the entries for two modules'
'FILES' key-value pairs were spelled with a trailing slash.  All other
'FILES' KVPs omitted the trailing slash.

For consistency, let's omit the trailing slash.  Once that's done, two
invocations of "./perl -Ilib Porting/makemeta -y" were needed to make
'make test_porting' happy.

2 years agoAdded releasers for next 3 dev releases
Neil Bowers [Sun, 9 Jan 2022 22:00:38 +0000 (22:00 +0000)]
Added releasers for next 3 dev releases

2 years agoAdd date of release of ExtUtils-ParseXS 3.44
Sawyer X [Thu, 6 Jan 2022 23:03:04 +0000 (00:03 +0100)]
Add date of release of ExtUtils-ParseXS 3.44