This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
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

2 years agoUpdate the README to describe ASCII and EBCDIC builds
Mike Fulton [Fri, 31 Dec 2021 21:44:02 +0000 (13:44 -0800)]
Update the README to describe ASCII and EBCDIC builds

 Rewrite of the readme file to bring it up to date and to document the
 various ways Perl can now be built and used on z/OS.

2 years agoAdd missing aliases for \p{Present_In}
Karl Williamson [Wed, 5 Jan 2022 16:00:53 +0000 (09:00 -0700)]
Add missing aliases for \p{Present_In}

\p{Present_In} is a Perl extension of the Unicode Age property, added
because knowing the exact Unicode version in which a code point became
assigned is rarely what you want; much more frequently you want to know
if the code point exists in the version or not.  (Since this extension
was added, Unicode changed their language to declare that the Age
property should be interpreted in pattern matching, not as described,
but as Perl's Present_In is.  But  I chose to not change Age, to avoid
backwards compatibility issues, and this way, a coder can choose which
thing s/he wanted.)

Unicode typically has synonyms (aliases) for each value a property can
tak on, so \p{Age=6.1} and \p{Age=V61_1} mean the same thing.

Prior to this commit, neither \p{Present_In=1_1} nor \p{Present_In=NA}
worked.

2 years agomktables: Add variable for clarity
Karl Williamson [Wed, 5 Jan 2022 15:51:38 +0000 (08:51 -0700)]
mktables: Add variable for clarity

This uses a new variable whose name reflects its usage, making the code
easier to understand.

2 years agoPod::Html: improve all tests
Michiel Beijen [Thu, 30 Dec 2021 11:54:11 +0000 (12:54 +0100)]
Pod::Html: improve all tests

"use warnings;" in all tests.  Remove emacs identifiers.  Change tabs to
spaces in tests.

For: https://github.com/Perl/perl5/pull/19304

2 years agoUpdate Changes log for ExtUtils::ParseXS:
Sawyer X [Tue, 4 Jan 2022 15:30:17 +0000 (16:30 +0100)]
Update Changes log for ExtUtils::ParseXS:

I've walked the history and grabbed changes to the code itself, not the
perlxs et. al. pod files.

2 years agoHash::Util::FieldHash: improve test suite
Michiel Beijen [Sun, 26 Dec 2021 10:31:39 +0000 (11:31 +0100)]
Hash::Util::FieldHash: improve test suite

 - do not count tests:
    - use done_testing
    - put tests requiring threading in their own subtests so we can
      skip_all
 - smaller improvements: use strict & warnings everywhere, tabs >>
   spaces

2 years agodist/Time-HiRes/t/stat.t: Provide descriptions for all tests 19322/head
James E Keenan [Tue, 4 Jan 2022 00:18:13 +0000 (00:18 +0000)]
dist/Time-HiRes/t/stat.t: Provide descriptions for all tests

Convert 'print' to 'Test::More::note' in stat.t and t/Watchdog.pm.
Require Test More 0.84 to get 'note' function per feedback from Tony
Cook in https://github.com/Perl/perl5/pull/19322.

2 years agodoio.c: White-space, comment only
Karl Williamson [Sun, 2 Jan 2022 01:45:35 +0000 (18:45 -0700)]
doio.c: White-space, comment only

2 years agoAdd missing fcn return declaration
Karl Williamson [Sun, 2 Jan 2022 01:43:42 +0000 (18:43 -0700)]
Add missing fcn return declaration

This was introduced by 1c267c880abb4d52f0dc23c70636b5f2e80253be.

2 years agoNeed to remove ASCII tags on copied compiled executables for z/OS ASCII
Mike Fulton [Fri, 31 Dec 2021 21:55:37 +0000 (13:55 -0800)]
Need to remove ASCII tags on copied compiled executables for z/OS ASCII

 Untag compiled executables (perl and the .so files) after they are
 copied with File::copy because File::copy is marking them as CCSID 819
 (ASCII). The longer term fix for this could be to provide a syscopy on
 z/OS which would perform a _cp_ which on z/OS copies the tag
 information as part of the copy.

2 years agoz/OS ASCII needs file descriptors on pipes tagged as ASCII
Mike Fulton [Fri, 31 Dec 2021 22:00:56 +0000 (14:00 -0800)]
z/OS ASCII needs file descriptors on pipes tagged as ASCII

 Add code to change the file descriptor on the file descriptors opened from
 ``Perl_my_popen_list`` and ``Perl_my_popen`` so that the CCSID of the file
 descriptor is 819. This change is only when the code is built for
 ASCII ``#if (__CHARSET_LIB == 1)`` on z/OS ``#if defined(OEMVS)``.

2 years agoEnable z/OS to run with '-e' option for runtests
Mike Fulton [Fri, 31 Dec 2021 22:08:31 +0000 (14:08 -0800)]
Enable z/OS to run with '-e' option for runtests

 Change this code so that the unset of MAKEFLAGS is protected because,
 on z/OS, unset will return non-zero if the variable is not set and this
 then causes the shell to fail because it is being run with _-e_. This
 change is only required for z/OS but is harmless to have on all
 platforms.

2 years agoProvide asciiopen and asciiopen3 for z/OS ASCII I/O
Mike Fulton [Fri, 31 Dec 2021 21:50:32 +0000 (13:50 -0800)]
Provide asciiopen and asciiopen3 for z/OS ASCII I/O

 - Provide an _asciiopen_ and _asciiopen3_ pair of functions for opening
   files on z/OS. These services do a standard open and then, if the
   open is successful, update the CCSID of the file descriptor to 819
   (ASCII) iff the oflag has ``O_CREAT`` set (e.g. a file is being
   created).  We could consider printing out a warning if a file is
   untagged - right now this will _work correctly_ if the file in
   encoded as ASCII (CCSID 819) but will fail if the file is EBCDIC.

 - Provide a wrapper _Perl_mkstemp_cloexec_ which not only creates a
   temporary file using mkstemp but will also tag the file as CCSID 819.
   The tagging is only performed if ``__CHARSET_LIB == 1``, i.e. the
   code is compiled with -qascii.

 - Define _PerlIO_open_ and _PerlLIO_open3_ as _asciiopen_ and
   _asciiopen3_ respectively, when the code is built for ASCII ``#if
   (__CHARSET_LIB == 1)`` on z/OS ``#if defined(OEMVS)``.

2 years agonostdio should test for z/OS (i.e. OEMVS) not EBCDIC
Mike Fulton [Fri, 31 Dec 2021 22:04:36 +0000 (14:04 -0800)]
nostdio should test for z/OS (i.e. OEMVS) not EBCDIC

2 years agoSpecify PERL_USE_SAFE_PUTENV when configuring ASCII z/OS builds
Mike Fulton [Fri, 31 Dec 2021 21:15:43 +0000 (13:15 -0800)]
Specify PERL_USE_SAFE_PUTENV when configuring ASCII z/OS builds

The Perl code expects that the ``environ`` global variable can be
re-allocated to new storage and then have entries added and removed from
it. This isn't supported by z/OS when in Bi-Modal mode and so
_PERL_USE_SAFE_PUTENV_ macro is defined to use the _env_ services to
manipulate ``environ`` instead of doing so directly. It is not clear if
it is valid to re-allocate storage for the ``environ`` global variable
or not, although it is worth pursuing with the z/OS development team as
a longer-term potential fix.

2 years agoFix problem in makefile for z/OS 64-bit builds
Mike Fulton [Fri, 31 Dec 2021 23:24:34 +0000 (15:24 -0800)]
Fix problem in makefile for z/OS 64-bit builds

  This change fixes a bug where the value of _use64bitall_ was
  expected to be nothing or something, but in fact, the proper
  test is for ``define|true|[yY]*``.

2 years agoAdd AUTHORS entry for Mike Fulton
Karl Williamson [Sat, 1 Jan 2022 18:47:12 +0000 (11:47 -0700)]
Add AUTHORS entry for Mike Fulton

And make this entry the more public email address, moving the existing
more private one to checkAUTHORS

2 years agoFix builtin typo in descrip_mms.template
Craig A. Berry [Fri, 31 Dec 2021 19:48:34 +0000 (13:48 -0600)]
Fix builtin typo in descrip_mms.template

The one-letter macro for the file extension of an object file is
an oh not a zero.

2 years agoTie::SubstrHash: rewrite tests to use Test::More
Michiel Beijen [Sun, 19 Dec 2021 09:23:02 +0000 (10:23 +0100)]
Tie::SubstrHash: rewrite tests to use Test::More

These tests were still handrolling TAP output. I've dragged the tests
into this century by porting them to Test::More.

For: https://github.com/Perl/perl5/pull/19288

2 years agoReplace bareword filehandle with a lexical scalar:
Sawyer X [Tue, 28 Dec 2021 12:57:48 +0000 (13:57 +0100)]
Replace bareword filehandle with a lexical scalar:

Bareword filehandles are bad and this module should really remove
this one.

I'm also bumping the version to a stable one because why not.

For: https://github.com/Perl/perl5/pull/19302

2 years agoChange pack U behavior for EBCDIC
Karl Williamson [Thu, 16 Dec 2021 21:30:36 +0000 (14:30 -0700)]
Change pack U behavior for EBCDIC

This effectively reverts 3ece276e6c0.

It turns out this was a bad idea to make U mean the non-native official
Unicode code points.  It may seem to make sense to do so, but broke
multiple CPAN modules which were using U the previous way.

This commit has no effect on ASCII-platform functioning.

2 years agocharnames.pm: Avoid pack U
Karl Williamson [Sat, 10 Jul 2021 22:37:37 +0000 (16:37 -0600)]
charnames.pm: Avoid pack U

This is because the behavior of pack U is changing in the next commit,
and this is cleaner anyway.  The conversion functions are optimized out
on ASCII platforms.

2 years agoMerge branch 'patch-1' into blead
James E Keenan [Sun, 26 Dec 2021 20:34:33 +0000 (20:34 +0000)]
Merge branch 'patch-1' into blead

2 years agoExtUtils-ParseXS fix plan/skip in 002-more.t 19300/head
François Perrad [Sun, 26 Dec 2021 19:28:14 +0000 (20:28 +0100)]
ExtUtils-ParseXS fix plan/skip in 002-more.t

The commit https://github.com/Perl/perl5/commit/2647863031762b1897841364c638c3727bc043f1 has added 2 tests in 002-more.t, the plan was updated from 30 to 32.
But the corresponding skip counter was missing.

2 years agoFix misspellings in documentation. Correct spelling of name to 'De
Ivan Panchenko [Sat, 25 Dec 2021 23:14:58 +0000 (00:14 +0100)]
Fix misspellings in documentation. Correct spelling of name to 'De
Morgan'.

Committer: Ivan Panchenko is now a Perl author

For: https://github.com/Perl/perl5/pull/19298

2 years agoDocument and test command-line switch '-?'
James E Keenan [Fri, 12 Nov 2021 23:55:04 +0000 (23:55 +0000)]
Document and test command-line switch '-?'

2 years agoReplace 'slave' with 'client'
James E Keenan [Thu, 3 Jun 2021 12:22:16 +0000 (12:22 +0000)]
Replace 'slave' with 'client'

This commit moves us a step forward on eliminating 'master/slave' terminology.

Its scope is limited to those files within the Perl 5 core distribution which
are not CPAN-upstream.  Within that scope, we leave untouched the use of the
term 'slave' in epigraphs and other literary quotations and its use in data
coming from outside sources (e.g., Unicode code points).

Increment $VERSION in lib/perl5db.pl.  Revisions per rjbs feedback.

For: https://github.com/Perl/perl5/pull/19227

2 years agosv_upgrade: c99 compound literals to initialize xpvav/xpvhv
Richard Leach [Thu, 9 Dec 2021 22:38:51 +0000 (22:38 +0000)]
sv_upgrade: c99 compound literals to initialize xpvav/xpvhv

For both the AV and HV cases, the new body is Zero()ed but then various
struct members are set to non-zero values. Now that we support parts of
c99, it seems more efficient to use compound literals to initailize the
struct members.

With gcc v8.3.0, the compiled function is smaller by 25 instructions.
sv.o is slightly smaller, but the final perl binary size is unchanged.

2 years agosv_upgrade: remove redundant AvALLOC(sv) = 0
Richard Leach [Thu, 9 Dec 2021 22:25:38 +0000 (22:25 +0000)]
sv_upgrade: remove redundant AvALLOC(sv) = 0

xav_alloc is a member of the xpvav struct. The instance modified
here would have been Zero()ed several lines previously, so both
sides of this if() branch should be no-ops.

With gcc 8.3.0 the compiled function is about 6 instructions smaller.

2 years agouse is_deeply instead of eq_ Test::More functions
Michiel Beijen [Sat, 18 Dec 2021 11:10:15 +0000 (12:10 +0100)]
use is_deeply instead of eq_ Test::More functions

the eq_set, eq_hash, and eq_array functions in Test::More are
discouraged to use, and is_deeply is recommended. Ref:

https://metacpan.org/pod/Test::More#Discouraged-comparison-functions

The reason for this is that, if the tests fail, is_deeply has much
better diagnostics.

The other thing is that is_deeply is a test function directly, where
eq_hash and such need to be wrapped inside ok(). This is easy to forget
-- proof of this is in Benchmark.t, where we had this code, that did not
test anything:

    eq_set([keys %$got], [qw(Foo Bar Baz)], 'should be exactly three objects');

It is now replaced by:

    is_deeply([sort keys %$got], [sort qw(Foo Bar Baz)], 'should be exactly three objects');

this commit replaces all usage of eq_set, eq_hash, and eq_array in lib/
and ext/ for tests that use Test::More.

One small exception is where a negated test is used; Test::More does not
have is_not_deeply() or such. Test2 has `isnt()` for this, but that is
not in core. In those cases, we still keep using the eq_ operators.