This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
8 hours agoMerge branch 'hydahy/fix-gh19249' into blead blead
James E Keenan [Tue, 30 Nov 2021 23:19:05 +0000 (23:19 +0000)]
Merge branch 'hydahy/fix-gh19249' into blead

For: p.r. https://github.com/Perl/perl5/pull/19251;
issue: https://github.com/Perl/perl5/issues/19249

8 hours agofix pod error in sv.c. Closes #19249 19251/head
Richard Leach [Tue, 30 Nov 2021 22:41:00 +0000 (22:41 +0000)]
fix pod error in sv.c. Closes #19249

14 hours agobuiltin.c: Fix C++ compilation errors
Dagfinn Ilmari Mannsåker [Tue, 30 Nov 2021 16:07:34 +0000 (16:07 +0000)]
builtin.c: Fix C++ compilation errors

C++ does not allow `goto` across initalisations of variables that are
in scope at the label, so just get rid of the `goto`.

An alternative would be to start a new scope after the first `goto`,
so that the variables aren't in scope any more at the label, but I
think this is neater.

45 hours agoAdd a builtin:: namespace, with true/false/isbool
Paul "LeoNerd" Evans [Sat, 20 Nov 2021 16:40:59 +0000 (16:40 +0000)]
Add a builtin:: namespace, with true/false/isbool

This finishes the perl-visible API required for RFC 0008
  https://github.com/Perl/RFCs/blob/master/rfcs/rfc0008.md

It also begins the "builtin::" namespace of RFC 0009
  https://github.com/Perl/RFCs/blob/master/rfcs/rfc0009.md

2 days agonewSVpvn_flags().. is more efficient than sv_2mortal(newSVpvn(..))
Richard Leach [Tue, 23 Nov 2021 23:35:58 +0000 (23:35 +0000)]
newSVpvn_flags().. is more efficient than sv_2mortal(newSVpvn(..))

The same holds for newSVpvs* wrappers around newSVpvn* functions.

2 days agonewSVpvn_flags(x, .. ,SVs_TEMP) more efficient than sv_2mortal(newSVpv(x,0))
Richard Leach [Wed, 24 Nov 2021 19:10:05 +0000 (19:10 +0000)]
newSVpvn_flags(x, .. ,SVs_TEMP) more efficient than sv_2mortal(newSVpv(x,0))

6 days agoAdd a phase_name() macro.
Felipe Gasper [Thu, 5 Aug 2021 20:01:44 +0000 (16:01 -0400)]
Add a phase_name() macro.

6 days agoAlso C<codeword> quote "defer" and "goto"
Paul "LeoNerd" Evans [Tue, 23 Nov 2021 20:49:22 +0000 (20:49 +0000)]
Also C<codeword> quote "defer" and "goto"

6 days agoQuote the word "defer" in exception messages about control flow
Paul "LeoNerd" Evans [Tue, 23 Nov 2021 18:04:19 +0000 (18:04 +0000)]
Quote the word "defer" in exception messages about control flow

7 days agoForbid using 'goto' to jump into a 'defer' block because everything will break when...
Paul "LeoNerd" Evans [Mon, 22 Nov 2021 21:58:33 +0000 (21:58 +0000)]
Forbid using 'goto' to jump into a 'defer' block because everything will break when it's done

8 days agoupdate perldsc examples to be strict compliant
Graham Knop [Mon, 22 Nov 2021 16:51:57 +0000 (17:51 +0100)]
update perldsc examples to be strict compliant

Where possible, update perldsc examples to use lexical variables, to be
strict compliant. Earlier code in this document specifically discusses
differences with strict, but the examples aren't really related to
anything about non-lexical variables, so they should be updated to work
with modern standards.

Some parts of the examples have not been updated because they are using
variables that are implicitly meant to come from some an outside source.

8 days agoadd missing brace in perldsc hash of hashes example
Graham Knop [Sun, 21 Nov 2021 13:18:57 +0000 (14:18 +0100)]
add missing brace in perldsc hash of hashes example

8 days agoFixup Corelist.pm
Richard Leach [Mon, 22 Nov 2021 13:21:25 +0000 (13:21 +0000)]
Fixup Corelist.pm

8 days agoPrepare Module::Corelist for 5.35.7
Richard Leach [Mon, 22 Nov 2021 12:42:20 +0000 (12:42 +0000)]
Prepare Module::Corelist for 5.35.7

10 days agoBump the perl version in various places for 5.35.7
Richard Leach [Sun, 21 Nov 2021 01:30:23 +0000 (01:30 +0000)]
Bump the perl version in various places for 5.35.7

10 days agonew perldelta for 5.35.7
Richard Leach [Sun, 21 Nov 2021 00:59:20 +0000 (00:59 +0000)]
new perldelta for 5.35.7

10 days agoTick off 5.35.6 from release schedule
Richard Leach [Sun, 21 Nov 2021 00:50:33 +0000 (00:50 +0000)]
Tick off 5.35.6 from release schedule

10 days agoAdd epigraph for 5.35.6
Richard Leach [Sun, 21 Nov 2021 00:49:57 +0000 (00:49 +0000)]
Add epigraph for 5.35.6

10 days agoadd new release to perlhist v5.35.6
Richard Leach [Sat, 20 Nov 2021 16:59:33 +0000 (16:59 +0000)]
add new release to perlhist

10 days agoUpdate perldelta for 5.35.6 release
Richard Leach [Sat, 20 Nov 2021 16:59:02 +0000 (16:59 +0000)]
Update perldelta for 5.35.6 release

10 days agoUpdate Module::CoreList for 5.35.6
Richard Leach [Sat, 20 Nov 2021 15:55:47 +0000 (15:55 +0000)]
Update Module::CoreList for 5.35.6

10 days agoUpdate AUTHORS list for 5.35.6
Richard Leach [Sat, 20 Nov 2021 15:36:59 +0000 (15:36 +0000)]
Update AUTHORS list for 5.35.6

11 days agot/op/pack.t: Get it to pass under 'make minitest' 19231/head
James E Keenan [Fri, 19 Nov 2021 22:44:23 +0000 (22:44 +0000)]
t/op/pack.t: Get it to pass under 'make minitest'

During preparations for release of perl-5.35.6 we noticed that
t/op/pack.t was failing during 'make minitest', though passing under
'make test'.  Certain tests require Math::BigInt, which in turn now
requires Scalar::Util.  The latter is not available under miniperl.  So
we skip certain tests.

Also, Math::BigInt is now under cpan/, not dist/.

Insert one 'note' so that we can see where we are in the file.  Minor
whitespace improvements.

11 days agoUpdate HTTP::Tiny to v0.080
Richard Leach [Fri, 19 Nov 2021 22:43:32 +0000 (22:43 +0000)]
Update HTTP::Tiny to v0.080

0.080     2021-11-05 08:15:46-04:00 America/New_York

    - No changes from 0.079-TRIAL.

0.079     2021-11-04 12:33:43-04:00 America/New_York (TRIAL RELEASE)

    [FIXED]

    - Fixed uninitialized value warnings on older Perls when the
      REQUEST_METHOD environment variable is set and CGI_HTTP_PROXY
      is not.

11 days agoMerge branch 'blead' of https://github.com/Perl/perl5 into blead
Richard Leach [Fri, 19 Nov 2021 21:39:32 +0000 (21:39 +0000)]
Merge branch 'blead' of https://github.com/Perl/perl5 into blead

11 days agoUpdate bignum, Math::BigInt, Math::BigInt::FastCalc, and Math::BigRat
Richard Leach [Fri, 19 Nov 2021 21:37:48 +0000 (21:37 +0000)]
Update bignum, Math::BigInt, Math::BigInt::FastCalc, and Math::BigRat

bignum
======

0.63 2021-10-08

 * This version instroduces no changes to the Perl modules, only the
tests.

 * Remove tests that don't work on old Perls and that were actually
testing
   Math::Big(Int|Float|Rat) more than big(int|num|rat).

 * Skip tests that don't work on older versions of Perl.

 * Remove Perl v5.10.0 as dependency. This distribution is compatible
with
   Perls    back to at least v5.6.1, although some functionality
   (e.g., nesting the pragmas) requires more recent versions of Perl.

0.62 2021-10-03

 * Add support for multiple options in import(), so that one can use,
e.g.,

    use bignum accuracy => 20, lib => "GMP";

 * Make sure the bigrat pragma always returns Math::BigRat objects.

 * Make the "trace" option work as indended, or at least according to
what I
   believe is the intention.

 * Improve documentation. Fix typos, improve wording, add more examples
etc.

0.61 2021-10-01

 * Improve documentation related to floating point literals.

 * Skip tests that fail due to Perl's broken handling of floating point
   literals before v5.32.0.

0.60 2021-09-28

 * Separate the bigint, bignum, and bigrat pragmas.

   - The bigint pragma now converts every numeric constant that
represents an
     integer to a Math::BigInt object. Non-integers are converted to
     Math::BigInt NaNs. With the previous behaviour, only some numeric
     constant integers were converted to a Math::BigInt.

   - The bignum pragma now converts every numeric constant to a
Math::BigFloat
     object.

   - The bigrat pragma now converts every numeric constant to a
Math::BigRat
     pragma.

   The pragmas no longer activate upgrading and downgrading. The
upgrading and
   downgrading must now be activated explicitly. The rationale behind
   deactivating it by default is that can cause infinite looping where
objects
   bounce back and forth between different classes. Explicitly
requesting a
   specific class doesn't always work either, because the object might
be
   automatically upgraded or downgraded to a different class.

   Only one pragma can be used at a time in a given scope. Enabling one
pragma
   disables the others in the same scope.

 * Implementat working version of "no bigint", "no bignum", and "no
bigrat".
   Previously, the upgrading and downgrading activated by, e.g., "use
bigint"
   was not deactivated by "no bigint".

 * Sync behaviour with the Math-BigInt distribution.

Math::BigInt
============

1.999827 2021-10-03

 * Improve error message for missing library argument.

 * Skip tests that don't work on older Perls. Also skip tests that
compare
   floating point numbers.

1.999826 2021-10-01

 * Improve documentation related to floating point literals.

 * Skip tests that fail due to Perl's broken handling of floating point
   literals before v5.32.0.

1.999825 2021-09-28

 * Make Math::BigInt accept integers regardless of whether they are
written as
   decimal, binary, octal, or hexadecimal integers or decimal, binary,
octal,
   or hexadecimal floating point number.

 * When numeric constants are overloaded (with the ":constant" option)
in
   Math::BigInt, every numeric constant that represent an integer is
converted
   to an object regardless of how it is written. All finite non-integers
are
   converted to a NaN.

 * When numeric constants are overloaded (with the ":constant" option)
in
   Math::BigFloat, every numeric constant is converted to an object
regardless
   of how it is written.

 * Add method from_dec() (cf. from_bin(), from_oct(), and from_hex()).
It is
   like new() except that it does not accept anything but a string
   representing a finite decimal number.

1.999824 2021-09-20

 * Don't allow mixing math libraries. Use the first backend math library
that
   is successfully loaded, and ignore any further attempts at loading a
   different backend library. This is a solution to the re-occurring
problem
   of using objects using different math libraries.

 * Add missing documentation.

 * Miscellaneous minor improvements.

Math::BigInt::FastCalc
======================

0.5012 2021-09-28

 * Sync test files with Math-BigInt.

0.5011 2021-09-20

 * Sync test files with Math-BigInt.

 * Add missing documentation.

 * Make the test files only print to the standard error when there is an
   actual error.

 * Miscellaneous changes and updates to author and release test files.

Math::BigRat
============

0.2620 2021-10-03

 * Skip tests that don't work on older Perls. Also skip tests that
compare
   floating point numbers.

0.2619 2021-10-01

 * Correct the handling of Inf and NaN in numify().

 * Improve constant overloading. When numeric constants are overloaded
   (with the ":constant" option) in Math::BigRat, every numeric constant
   is converted to an object regardless of how it is written.

0.2618 2021-09-28

 * Add new method binv() for the inverse.

 * Add new method dparts(), which returns the integer part and fraction
part
   of a number. For example, 9/4 is split into 2 and 1/4. This method is
   equivalent to the Math::BigInt and Math::BigFloat methods with the
same
   name.

 * Improve blog(). Handle cases $x->blog($b) where the numerator of $x
   and/or $b is 1 as special.

 * Sync tests with Math-BigInt.

12 days agoMerge branch 'openstrike-blead' into blead
James E Keenan [Thu, 18 Nov 2021 12:33:33 +0000 (12:33 +0000)]
Merge branch 'openstrike-blead' into blead

12 days agoPOD breakage in lib/warnings.pm
Pete Houston [Mon, 15 Nov 2021 14:56:41 +0000 (14:56 +0000)]
POD breakage in lib/warnings.pm

An unescaped right angle bracket was resulting in a malformed code snippet in warnings.pm

This tiny PR escapes that character and thus fixes the rendering.

regen/warnings.pl corrected and regenerated; version bumped.

Pete Houston is now a Perl Author.

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

13 days agoAdditional feedback 19230/head
James E Keenan [Wed, 17 Nov 2021 14:10:53 +0000 (14:10 +0000)]
Additional feedback

13 days agoUpdate per feedback
James E Keenan [Wed, 17 Nov 2021 13:57:30 +0000 (13:57 +0000)]
Update per feedback

13 days agoObituary for David H Adler
James E Keenan [Wed, 17 Nov 2021 13:00:19 +0000 (13:00 +0000)]
Obituary for David H Adler

2 weeks agoperldelta for 0cdbe216286, 9bce496f83cb, 9c913148860
Tony Cook [Mon, 15 Nov 2021 00:49:25 +0000 (11:49 +1100)]
perldelta for 0cdbe2162869bce496f83cb9c913148860

2 weeks agocorrect the comment distinguishing between threaded/unthreaded cop macros
Tony Cook [Thu, 21 Oct 2021 03:19:49 +0000 (14:19 +1100)]
correct the comment distinguishing between threaded/unthreaded cop macros

2 weeks agoAdd CopFILEAVn() and use it when cleaning up COP pointers
Tony Cook [Thu, 21 Oct 2021 03:16:54 +0000 (14:16 +1100)]
Add CopFILEAVn() and use it when cleaning up COP pointers

On threaded builds CopFILEAV() calls gv_fetchfile(), which always
created the *{"::_<filenamehere"} glob, so the attempted clean up
here could recreate the glob, even if it has already been removed
when cleaning up a string eval.

To avoid this, add CopFILEAVn() that never creates the glob,
nor the AV so that the clean up never adds new objects.

This change makes the check for PL_phase unnecessary, but that check
is much cheaper than the call for gv_fetchfile_flags() that the
macro hides, so retain the check.

2 weeks agodon't try to clean up the COP pointer during global destruction
Tony Cook [Thu, 21 Oct 2021 02:51:17 +0000 (13:51 +1100)]
don't try to clean up the COP pointer during global destruction

At this point there should be no further debugging code trying to
use the COP pointer.

On threaded builds the call to CopFILEAV() could cause a segmentation
fault, since during late destruction gv_fetchfile() could return
NULL, which the threaded version of CopFILEAV() would blindly call
GvAV() on.

2 weeks agoremove cop addressed from saved lines when the cop is freed
Tony Cook [Wed, 20 Oct 2021 04:36:44 +0000 (15:36 +1100)]
remove cop addressed from saved lines when the cop is freed

This could cause a bad read and write when the debugger tried to
set a breakpoint on the line.

Fixed #19198

2 weeks agodocument the DebugWrap class used internally to perl5db.t
Tony Cook [Wed, 20 Oct 2021 04:33:31 +0000 (15:33 +1100)]
document the DebugWrap class used internally to perl5db.t

saves me having to find the difference between "output" and
"contents" each time I write a debugger test

2 weeks agoallow DebugWrap to take the test code as an argument
Tony Cook [Wed, 20 Oct 2021 04:31:44 +0000 (15:31 +1100)]
allow DebugWrap to take the test code as an argument

This increases the locality of the code being tested to the test and
avoids littering the tree with little test files.

3 weeks agoUnencrypted git protocol no longer supported by github.com
James E Keenan [Tue, 2 Nov 2021 19:24:09 +0000 (19:24 +0000)]
Unencrypted git protocol no longer supported by github.com

Reference: https://github.blog/2021-09-01-improving-git-protocol-security-github/

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

4 weeks agoMerge branch 'features-for-5-36' into blead
Ricardo Signes [Tue, 2 Nov 2021 18:23:45 +0000 (14:23 -0400)]
Merge branch 'features-for-5-36' into blead

4 weeks agoperldelta: update feature bundle changes for bareword_filehandles 19184/head
Ricardo Signes [Sat, 30 Oct 2021 19:22:21 +0000 (15:22 -0400)]
perldelta: update feature bundle changes for bareword_filehandles

4 weeks agofeature.pm: remove bareword_filehandles from :5.36
Ricardo Signes [Sat, 30 Oct 2021 19:20:52 +0000 (15:20 -0400)]
feature.pm: remove bareword_filehandles from :5.36

4 weeks agofeature updates: tweaks from code review
Ricardo Signes [Sat, 30 Oct 2021 18:48:51 +0000 (14:48 -0400)]
feature updates: tweaks from code review

4 weeks agoperldelta: note changes to feature bundle
Ricardo Signes [Sat, 16 Oct 2021 23:08:51 +0000 (19:08 -0400)]
perldelta: note changes to feature bundle

4 weeks agoperlfunc: note that bareword open is now often forbidden
Ricardo Signes [Sat, 16 Oct 2021 22:54:24 +0000 (18:54 -0400)]
perlfunc: note that bareword open is now often forbidden

4 weeks agofeature: remove indirect and multidimensional in v5.36
Ricardo Signes [Sat, 9 Oct 2021 21:12:31 +0000 (17:12 -0400)]
feature: remove indirect and multidimensional in v5.36

4 weeks agoRemove missed mention of perldos POD document in plan9/mkfile
Dagfinn Ilmari Mannsåker [Tue, 2 Nov 2021 18:14:56 +0000 (18:14 +0000)]
Remove missed mention of perldos POD document in plan9/mkfile

4 weeks agoRemove AT&T UWIN support
Dagfinn Ilmari Mannsåker [Mon, 27 Jul 2020 13:31:25 +0000 (14:31 +0100)]
Remove AT&T UWIN support

UWIN is a UNIX compatibility layer for Windows.  It was last released
in 2012 and has been superseded by Cygwin these days.

4 weeks agoRemove DOS/DJGPP support
Dagfinn Ilmari Mannsåker [Thu, 16 Jul 2020 16:32:16 +0000 (17:32 +0100)]
Remove DOS/DJGPP support

DJGPP is a port of the GNU toolchain to 32-bit x86 systems running DOS.
The last known attempt to build Perl on it was on 5.20, which only got
as far as building miniperl.

4 weeks agoOne character spelling error
James E Keenan [Tue, 2 Nov 2021 17:45:38 +0000 (17:45 +0000)]
One character spelling error

4 weeks agobump $GDBM_File::VERSION
Tony Cook [Mon, 1 Nov 2021 23:03:23 +0000 (10:03 +1100)]
bump $GDBM_File::VERSION

4 weeks agogdbm: Define error codes; provide the global $gdbm_errno variable.
Sergey Poznyakoff [Mon, 11 Oct 2021 15:58:44 +0000 (15:58 +0000)]
gdbm: Define error codes; provide the global $gdbm_errno variable.

* ext/GDBM_File/GDBM_File.pm: Export gdbm error codes.
Improve documentation.
* ext/GDBM_File/GDBM_File.xs (BOOT): Define the GDBM_File::gdbm_errno
variable.
(gdbm_errno): Return a value usable both in numeric and string
contexts.
* ext/GDBM_File/Makefile.PL: Define gdbm error codes.
* Document GDBM_* constants used with tie().

4 weeks agopp_system: safe to switch in sv_setpvn_fresh here
Richard Leach [Fri, 28 May 2021 01:00:17 +0000 (02:00 +0100)]
pp_system: safe to switch in sv_setpvn_fresh here

4 weeks agopp_match: newSVpvn_flags now more efficient than sv_newmortal + sv_setpvn.
Richard Leach [Wed, 26 May 2021 23:40:27 +0000 (00:40 +0100)]
pp_match: newSVpvn_flags now more efficient than sv_newmortal + sv_setpvn.

4 weeks agosv.c: use Perl_sv_grow_fresh & Perl_sv_setvpn_fresh
Richard Leach [Wed, 26 May 2021 17:01:44 +0000 (18:01 +0100)]
sv.c: use Perl_sv_grow_fresh & Perl_sv_setvpn_fresh

4 weeks agosv.c: add Perl_sv_grow_fresh & Perl_sv_setvpn_fresh
Richard Leach [Wed, 26 May 2021 17:00:11 +0000 (18:00 +0100)]
sv.c: add Perl_sv_grow_fresh & Perl_sv_setvpn_fresh

4 weeks agoRegen Configure and friends after backports
H.Merijn Brand [Fri, 29 Oct 2021 17:42:38 +0000 (19:42 +0200)]
Regen Configure and friends after backports

4 weeks agorelease schedule: neilb to handle 2021-12
Ricardo Signes [Fri, 29 Oct 2021 14:22:06 +0000 (10:22 -0400)]
release schedule: neilb to handle 2021-12

5 weeks agoMerge branch 'fix-grammar' into blead
James E Keenan [Sat, 23 Oct 2021 23:59:36 +0000 (23:59 +0000)]
Merge branch 'fix-grammar' into blead

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

5 weeks agolib/diagnostics.pm remove obscure wording in POD
Robert Rothenberg [Fri, 22 Oct 2021 11:57:27 +0000 (12:57 +0100)]
lib/diagnostics.pm remove obscure wording in POD

The text "While apparently a whole nuther program" is too informal
and too obscure for non-Native English speakers.

It is also a misspelling of "whole nother" [1].

[1] https://www.merriam-webster.com/dictionary/whole%20nother

Committer: Robert Rothenberg is now a Perl author.

Increment $VERSION in lib/diagnostics.pm.

5 weeks agoPrepare Module::Corelist for 5.35.6
Leon Timmermans [Thu, 21 Oct 2021 21:04:31 +0000 (23:04 +0200)]
Prepare Module::Corelist for 5.35.6

5 weeks agoBump version to 5.35.6
Leon Timmermans [Thu, 21 Oct 2021 20:44:17 +0000 (22:44 +0200)]
Bump version to 5.35.6

5 weeks agonew perldelta for 5.35.6
Leon Timmermans [Thu, 21 Oct 2021 20:17:26 +0000 (22:17 +0200)]
new perldelta for 5.35.6

5 weeks agoTick off 5.35.5 from release schedule
Leon Timmermans [Thu, 21 Oct 2021 20:12:08 +0000 (22:12 +0200)]
Tick off 5.35.5 from release schedule

5 weeks agoAdd epigraph for 5.35.5
Leon Timmermans [Thu, 21 Oct 2021 20:10:03 +0000 (22:10 +0200)]
Add epigraph for 5.35.5

5 weeks agoAdd 5.35.5 to perlhist v5.35.5
Leon Timmermans [Thu, 21 Oct 2021 18:05:51 +0000 (20:05 +0200)]
Add 5.35.5 to perlhist

5 weeks agoUpdate perldelta for 5.35.5 release
Leon Timmermans [Thu, 21 Oct 2021 18:05:13 +0000 (20:05 +0200)]
Update perldelta for 5.35.5 release

5 weeks agoUpdate Module::CoreList for 5.35.5
Leon Timmermans [Wed, 20 Oct 2021 21:39:27 +0000 (23:39 +0200)]
Update Module::CoreList for 5.35.5

5 weeks agoinline.h: _BitScanForward64 is available only on 64-bit architectures
Tomasz Konojacki [Wed, 20 Oct 2021 14:51:58 +0000 (16:51 +0200)]
inline.h: _BitScanForward64 is available only on 64-bit architectures

Fixes #19205

5 weeks agoinline.h: remove superfluous Visual C++ version checks
Tomasz Konojacki [Wed, 20 Oct 2021 14:47:45 +0000 (16:47 +0200)]
inline.h: remove superfluous Visual C++ version checks

We no longer support Visual C++ 2012 and older.

5 weeks agoRevert "Introduce a "declaration after statement" into inline.h"
Leon Timmermans [Wed, 20 Oct 2021 19:39:44 +0000 (21:39 +0200)]
Revert "Introduce a "declaration after statement" into inline.h"

This reverts commit 632ce96a35d784df9e43bc8ad87b4e8f1f24a590.

Sereal hasn't been fixed yet to deal with the fallout of this change,
so we postpone this change for a later moment

5 weeks agoAdd dropping old MSVC++ (pre-VC12) to perldelta
Leon Timmermans [Wed, 20 Oct 2021 19:39:27 +0000 (21:39 +0200)]
Add dropping old MSVC++ (pre-VC12) to perldelta

5 weeks agoPerl_newHVhv should use share_hek_hek() instead of share_hek_flags()
Nicholas Clark [Sun, 17 Oct 2021 08:41:19 +0000 (08:41 +0000)]
Perl_newHVhv should use share_hek_hek() instead of share_hek_flags()

share_hek_hek() manipulates the shared HEK's reference count directly,
without needing to find it in the shared string table. It was added after
Perl_newHVhv() was implemented, and no-one noticed that it could be used
there.

5 weeks agoFix the build and tests when NODEFAULT_SHAREKEYS is defined
Nicholas Clark [Sat, 16 Oct 2021 18:06:44 +0000 (18:06 +0000)]
Fix the build and tests when NODEFAULT_SHAREKEYS is defined

Defining this macro causes newHV() to create hashes without shared hash key
scalars. The default is that hashes are created with shared hash keys.

5 weeks agoPerl_newHVhv() did not correctly copy hashes with non-shared keys
Nicholas Clark [Sat, 16 Oct 2021 07:52:56 +0000 (07:52 +0000)]
Perl_newHVhv() did not correctly copy hashes with non-shared keys

It created a hash built with non-shared keys, but left the "shared keys"
flag set on the hash.

This hasn't been spotted in 20 years, which shows just how much we use
hashes with unshared keys.

5 weeks agohv_delete_common() must not call GvAV() on a non-GV
Nicholas Clark [Tue, 12 Oct 2021 07:14:30 +0000 (07:14 +0000)]
hv_delete_common() must not call GvAV() on a non-GV

hv_delete_common() must update isa magic stash records when *ISA is deleted
(see commit 6146d9e1c87d449f)

However, it's only valid to use the macro GvAV() on an SV that is a GV.
Previously the code was not checking this, hence if someone deliberately
manipulated the symbol table to first store something other than a typeglob,
and then delete that entry from the symbol table, then (at best) an
assertion would fail, at worst illegal memory accesses.

Do this by moving the check for `SvTYPE(sv) == SVt_PVGV` up to the if() that
governs both code blocks.

Note that you could only trigger this bug by running code that manipulates
symbol tables directly. Compilation of Perl code would not hit it, nor could
user-controlled data in executing Perl programs, unless the programs both
contain code to manipulate symbol tables, and permit unvalidated user data
to reach those code paths.

(Such programs are likely insecure already, as their control flow can be
subverted by user controlled data without requiring any interpreter bugs.)

5 weeks agoop.c: use %zd to format PADOFFSET values
Dagfinn Ilmari Mannsåker [Tue, 19 Oct 2021 15:51:05 +0000 (16:51 +0100)]
op.c: use %zd to format PADOFFSET values

PADOFFSET is SSize_t, so %lu is wrong even if long and SSize_t are the
same size.

6 weeks agoAdd NetWare removal to perlport
Leon Timmermans [Tue, 19 Oct 2021 23:14:25 +0000 (01:14 +0200)]
Add NetWare removal to perlport

6 weeks agoAdd nick@i3.procura.nl to mailmap
Leon Timmermans [Tue, 19 Oct 2021 23:13:07 +0000 (01:13 +0200)]
Add nick@i3.procura.nl to mailmap

6 weeks agoUpdate Encode to 3.16
Leon Timmermans [Tue, 19 Oct 2021 21:04:03 +0000 (23:04 +0200)]
Update Encode to 3.16

6 weeks agoUpdate Scalar-List-Util to 1.60
Leon Timmermans [Tue, 19 Oct 2021 20:58:43 +0000 (22:58 +0200)]
Update Scalar-List-Util to 1.60

6 weeks agoUpdate experimental to 0.025
Leon Timmermans [Tue, 19 Oct 2021 20:54:30 +0000 (22:54 +0200)]
Update experimental to 0.025

6 weeks agoUpdate Test-Simple to 1.302188
Leon Timmermans [Tue, 19 Oct 2021 20:47:16 +0000 (22:47 +0200)]
Update Test-Simple to 1.302188

6 weeks agoRemove old MSVC++ (pre-VC12) support from Windows Makefiles
Steve Hay [Thu, 14 Oct 2021 16:37:08 +0000 (17:37 +0100)]
Remove old MSVC++ (pre-VC12) support from Windows Makefiles

Also remove the Platform SDK 2003 SP1/R2 64-bit compiler since (having just
tried it) it no longer builds perl because it doesn't allow mixed code and
declarations.

Also remove mention of the Windows SDK since it doesn't appear to contain
the compiler or linker any more. This page says that the VC++ 2010 compiler
and linker were included in the Windows 7 SDK but then makes no mention of
it for the Windows 8 SDK:
https://docs.microsoft.com/en-us/previous-versions/visualstudio/windows-sdk/ff660763(v=vs.110)
The page notes that it is no longer being updated, but the whole of the
C:\Program Files (x86)\Windows Kits folder on my system (which contains
8.0, 8.10 and 10) does not contain any cl.exe or link.exe.

I've re-worded some of the if/else conditions in the makefiles to pick out
earlier versions rather than later versions. Thus, the current versions
become the "else" case, which means that the next version of Visual C++ is
more likely to work without requiring any changes.

6 weeks agodon't overwrite the faked up type details for hv-with-aux
Tony Cook [Mon, 18 Oct 2021 22:12:00 +0000 (09:12 +1100)]
don't overwrite the faked up type details for hv-with-aux

CID 340472

6 weeks ago`for my($k, $v) (%hash)` should not be a syntax error
Nicholas Clark [Fri, 15 Oct 2021 19:59:34 +0000 (19:59 +0000)]
`for my($k, $v) (%hash)` should not be a syntax error

No-one had thought to test for this explicitly. After all, both
`for my $foo ...` and `for my$foo ...` are valid syntax, so tweaking the
C lexer code to add an optional '(' should work, surely?

The problem was that, *as was*, the lexer code didn't "accept" those two
syntax variants the way the comments would suggest.

`for my $foo ...` was treated as

1) we saw 'my '
2) we saw the dollar sign
3) success!

but `for my$foo ...` was treated as

0) we didn't see 'my ' or 'our '
1) we saw the literal string 'my' which is valid as a package name
2) we saw the dollar sign
3) success!

ie some sort of mangled variant of `for my Dog $spot ...` without 'my'

*but* as the lexer was happy with what it saw, it returned that the input
stream was valid for a "for" token, and control continues to the grammar.
The grammar, of course, didn't make these mistakes, so parsed everything
properly and built the correct optree.

(And, if presented with `for Dog $spot (...)` the grammar wouldn't match,
so all invalid code was correctly rejected)

However, all this came unstuck with `for my($k` because that didn't
mis-tokenise as some crazy package name 'my(', so it reported a syntax error.

Hence rewrite yyl_foreach() to actually tokenise everything correctly.

"Correctly", to be clear, is bug-for-bug compatible with the current emergent
behaviour for various corner cases for "parses and runs" vs "syntax error".

We don't always report identical error messages for certain syntax errors,
where the precise message reported was itself emergent behaviour from the
bugs in the previous implementation.

6 weeks agofor CORE::my $var (...) {} is legal syntax, hence test it
Nicholas Clark [Mon, 18 Oct 2021 13:16:40 +0000 (13:16 +0000)]
for CORE::my $var (...) {} is legal syntax, hence test it

We had tests for CORE::state, but not CORE::my or CORE::our. It happens that
they are all legal syntax, but seemingly more be accident than design. They
are only accepted by yyl_foreach() as a quirk of the current implementation.

Note that for my Dog $spot (...) {} is legal, but not CORE::my. our Dog is
legal, CORE::our is not. Neither state Dog nor CORE::state are legal. These
are all emergent behaviour of the parser - do not take these tests as
"correct", merely as verifying that current behaviour doesn't change unless
we intended it to.

6 weeks agoadd customized entries for the latest Memoize changes
Tony Cook [Mon, 18 Oct 2021 03:44:48 +0000 (14:44 +1100)]
add customized entries for the latest Memoize changes

6 weeks agoFix Memoize tests, where GDBM_File is involved
Sergey Poznyakoff [Fri, 15 Oct 2021 12:41:29 +0000 (15:41 +0300)]
Fix Memoize tests, where GDBM_File is involved

* cpan/Memoize/t/errors.t: Use GDBM_NEWDB as the flags argument
when tying to GDBM_File.
* cpan/Memoize/t/tie_gdbm.t: Likewise.

6 weeks agoperlop - clarify that hyphens are interpreted literally in tr with single quotes
Dan Book [Sun, 17 Oct 2021 21:59:44 +0000 (17:59 -0400)]
perlop - clarify that hyphens are interpreted literally in tr with single quotes

6 weeks agoinstall libgdbm and libdb in GitHub Actions
Tomasz Konojacki [Wed, 13 Oct 2021 12:50:29 +0000 (14:50 +0200)]
install libgdbm and libdb in GitHub Actions

This ensures that DB_File and GDBM_File will be built and tested.

6 weeks agodisable LeakSanitizer in GitHub Actions
Tomasz Konojacki [Fri, 15 Oct 2021 17:45:20 +0000 (19:45 +0200)]
disable LeakSanitizer in GitHub Actions

It randomly fails with a fatal error for no apparent reason.

Fixes #19189

6 weeks agoMerge branch 'pp_iter' into blead
Ricardo Signes [Fri, 15 Oct 2021 13:42:23 +0000 (09:42 -0400)]
Merge branch 'pp_iter' into blead

6 weeks agoPod improvements suggested by Matthew Horsfall 18925/head
Nicholas Clark [Wed, 22 Sep 2021 10:58:00 +0000 (10:58 +0000)]
Pod improvements suggested by Matthew Horsfall

6 weeks agofor my ($foo,,, $bar) { ... } should parse as ($foo, $bar)
Nicholas Clark [Thu, 16 Sep 2021 09:19:25 +0000 (09:19 +0000)]
for my ($foo,,, $bar) { ... } should parse as ($foo, $bar)

Multiple commas between the lexicals in the list shouldn't change the
parsing.

6 weeks agoTest next, continue and redo with n-at-a-time for loops
Nicholas Clark [Wed, 15 Sep 2021 20:06:53 +0000 (20:06 +0000)]
Test next, continue and redo with n-at-a-time for loops

6 weeks agoNote why this if block in pp_iter is empty
Nicholas Clark [Wed, 15 Sep 2021 17:47:32 +0000 (17:47 +0000)]
Note why this if block in pp_iter is empty

6 weeks agoperldelta for n-at-a-time for loops.
Nicholas Clark [Tue, 22 Jun 2021 05:27:28 +0000 (05:27 +0000)]
perldelta for n-at-a-time for loops.

6 weeks agon-at-a-time for loops now warn by default (as 'experimental::for_list').
Nicholas Clark [Mon, 21 Jun 2021 20:29:13 +0000 (20:29 +0000)]
n-at-a-time for loops now warn by default (as 'experimental::for_list').

6 weeks agoAdd a new warning experimental::for_list.
Nicholas Clark [Mon, 21 Jun 2021 19:34:29 +0000 (19:34 +0000)]
Add a new warning experimental::for_list.