79963 Commits

Author SHA1 Message Date
Leon Timmermans
05112e5eac Make local $h{$k} remove previously non-existing key from shared hashes 2024-05-30 20:33:31 +02:00
Karl Williamson
1a2e8e708a t/harness: Fix grammar in comment 2024-05-18 11:21:19 -06:00
David Mitchell
d16fb3cef2 perldelta: add PERL_RC_STACK
This is a final summary of the state of the new ref-counted stack
facility at the 5.40.0 release: and is intended to be added to the
5.40.0 perldelta, to replace (rather than than be in addition to) any
  earlier mentions of PERL_RC_STACK in the 5.39.2 and .6 perldeltas.
2024-05-18 11:07:16 +01:00
Lukas Mai
643108fc9c perlfunc/stat: fix description of S_ENFMT and S_IFMT
S_ENFMT properly belongs to the group of permission bits (like
setuid/setgid), not file types. On systems that have it (like AIX), it
can be set/cleared with chmod(). (In fact, it usually shares its value
with S_ISGID because enforced locking is signaled by the combination of
a non-executable file with the setgid bit set.)

S_IFMT($mode) directly gives you one of the file types (S_IFREG,
S_IFDIR, etc). You don't need to bit-and it further (especially not with
the S_IS* functions), contrary to what the comment claims. (The
confusion likely stems from the C side of things, where you'd do `mode &
S_IFMT` to extract the file type from the mode bits, leading to code
like `(mode & S_IFMT) == S_IFDIR`. But even then you could write
`S_ISDIR(mode)` without any bit mask trickery.)

Most of the symbols in the "S_IF* constants" section don't start with
"S_IF", so change to "S_I* constants" everywhere.

Most of the symbols in the "S_IF* functions" section don't start with
"S_IF" (with the sole exception of S_IFMT, which is only a function in
Perl; the C macro is a constant).
(Historical note: This section label used to make more sense because it
documented S_IFMODE and S_IFMT functions, but the former was just a typo
for S_IMODE.)
2024-05-17 23:48:41 +02:00
Elvin Aslanov
2fc32c2024 perlbook.pod: Fix few leftovers
The "Safari" reference redirects to oreilly.com anyway.

It is also renamed:

https://en.wikipedia.org/wiki/O%27Reilly_Media#O'Reilly_Online_Learning_(formerly_Safari_Books_Online)
2024-05-17 07:45:46 -06:00
Dan Book
430d3646c5 perlsub: correct confusing references to local in my docs
The docs for lexical variable declarations referenced 'local' as a mechanism to declare global variables in a couple instances, which is incorrect. 'local' only localizes global variables, it doesn't create or declare them in the common case where strict 'vars' is in effect.
2024-05-17 07:42:05 -06:00
rwp0
e3f226d5c6 Fix HTTP and Books links
Update some obsolete Perl book URLs.  Convert some HTTP links to HTTPS.
Wrap links in `L<>`.

Committer: Resolve merge conflicts in pod/perllocale.pod.

For: https://github.com/Perl/perl5/pull/22186
2024-05-15 20:10:13 -04:00
Karl Williamson
bcedd586de perllocale: Update for 5.40 state of affairs
This makes corrections, and additions
2024-05-15 17:01:24 -06:00
James E Keenan
2a2fbe60b3 INSTALL: threads and ithreads currently synonymous
As suggested by Sevan Janiyan in GH #21886.
2024-05-12 21:49:37 -04:00
Lukas Mai
8cacb84717 Fcntl: add module documentation 2024-05-09 07:11:39 +02:00
James E Keenan
1e43922428 POSIX/t/wrappers.t: One-character typo 2024-05-05 17:22:34 -04:00
Graham Knop
9fd1426176 remove underscore from VERSION in podlators
When using versions with underscores, best practice is to remove the
underscore on a later line, to allow using the version as a number when
accessing the variable directly.
2024-05-04 22:05:44 +02:00
Tony Cook
20fe138296 hints/netbsd.sh: prevent noise when checking for --whole-archive
https://www.nntp.perl.org/group/perl.perl5.porters/2024/04/msg268141.html
2024-05-04 13:39:10 -04:00
James E Keenan
a9f5317a19 Update location of further documentation
Fixes GH #22181; thanks to djerius.
2024-05-03 18:19:22 -04:00
Tony Cook
0d9e3bc6db perly LSTOPSUB: prevent a double op free between parse stack and CV
The reeproducer resulted in the "block" OP being both on the parser
stack and attacked to the CV.  If an error occurred while parsing the
rest of the list operator clean up would release the OP as attached
to the CV, and the same OP on the parse stack, resulting in a double
free.

It's unclear to me whether bison is intended to support modifying
the parse stack entry like this, but it appears to work here.

Fixes #21724
2024-05-02 16:28:18 +01:00
Tony Cook
6fafc50424 Revert "testsuite.yml: workaround cygwin base address conflict in 5.39.10"
This reverts commit c635fa2209aa81381fc45f5e89f5b16144056521.

With the 5.39.11 version bump there's no longer any risk of this collision.
2024-05-02 08:46:24 +10:00
Lukas Mai
04d2040ce4 perldeprecation: clean up
- Remove duplicate sections: File::Glob::glob, bare { in regexes, code
  points above 0xFF in string bitwise ops

  These were repeated for different perl versions, but none of the other
  sections list deprecations and removal separately (e.g. "Passing
  malformed strings was deprecated in Perl 5.18, and became fatal in
  Perl 5.26" only appears under Perl 5.26; the deprecation is not listed
  separately under Perl 5.18).

- Fix some typos (e.g. "ballanced")

- Fix (?) some grammar/punctuation

  Also use past tense to describe removed functions.

- Fix some POD markup (C< > around variables, L< > for modules)
2024-04-30 18:13:57 +02:00
Karl Williamson
6691533900 Update pod for Perl_form() and kin
This fixes GH #22170, and includes several corrections.
2024-04-30 08:12:40 -06:00
Tony Cook
ed87f9270c hints/dragonfly.sh: actually disable the POSIX 2008 locale API
ae3e9dd0b was intended to disable this API, due to a leak in the
DragonflyBSD implementation, but the wrong macro was used, which
I missed in review.

Use the right macro.
2024-04-30 09:53:20 +10:00
Paul "LeoNerd" Evans
d330c0a013 Prepare Module::CoreList for 5.39.11 2024-04-28 12:47:42 +01:00
Paul "LeoNerd" Evans
0bb06e1f8e Bump version to 5.39.11 2024-04-28 11:53:33 +01:00
Paul "LeoNerd" Evans
9d71dbb721 New perldelta for 5.39.11 2024-04-28 11:43:19 +01:00
Paul "LeoNerd" Evans
6777c2fea1 epigraphs.pod: add perl 5.39.10 2024-04-28 09:49:29 +00:00
Chris 'BinGOs' Williams
2986a769bc Toss a coin to your Witcher 2024-04-27 20:33:02 +01:00
Paul "LeoNerd" Evans
cf487e8ab3 Merge branch 'release-5.39.10' into blead 2024-04-27 19:26:36 +00:00
Paul "LeoNerd" Evans
c46c2bea6f Add new release to perlhist.pod v5.39.10 2024-04-27 16:04:06 +00:00
Paul "LeoNerd" Evans
5388c93264 update perldelta for 5.39.10 2024-04-27 16:04:06 +00:00
Paul "LeoNerd" Evans
2caf5dd638 Update Module::CoreList for 5.39.10 2024-04-27 15:04:37 +00:00
Lukas Mai
4780f193cb perlsub: update wording around usage of & 2024-04-27 15:47:27 +01:00
Paul "LeoNerd" Evans
abc5e0f912 Delete the CORE/prevailing_version key from the hint hash inside string eval so perl code doesn't get to see it 2024-04-27 15:44:06 +01:00
Paul "LeoNerd" Evans
f4a8839228 Store PL_prevailing_version in the frozen hinthash around a string-eval op
We need to save the value of PL_prevailing_version at the time the eval
op was compiled, so it can be put in place during the running code.

Ideally we'd do something more robust, like change the OP_ENTERVAL op
class into UNOP_AUX, so that the aux vector can store additional
information like the version number and perhaps the frozen hints hash.

In practice it is far too close to the 5.40 release to contemplate such
a change now, so this is a less intrusive but hackier change to achieve
the same aim.

See also
  https://github.com/Perl/perl5/issues/22121
2024-04-27 15:44:06 +01:00
Paul "LeoNerd" Evans
cf4cf3087f cpan/IO-Compress - Update to version 2.212
2.212 27 April 2024

      * no functional changes
2024-04-27 14:36:44 +00:00
Paul "LeoNerd" Evans
4f42f2c8b8 cpan/Compress-Raw-Zlib - Update to version 2.212
2.212 27 April 2024

      * no functional changes
2024-04-27 14:30:22 +00:00
Paul "LeoNerd" Evans
c455df6f58 cpan/Compress-Raw-Bzip2 - Update to version 2.212
2.212 27 April 2024

      * no functional changes
2024-04-27 14:13:07 +00:00
Paul "LeoNerd" Evans
fb87e56f2c cpan/IO-Compress - Update to version 2.211
2.211 6 April 2024

      * version 2.211
        Sat Apr 6 14:14:55 2024 +0100
        1276339652e8df49a29facd9ee1ae41d9c7dc994
2024-04-27 10:43:45 +00:00
Paul "LeoNerd" Evans
02f4e0dbfc cpan/Compress-Raw-Zlib - Update to version 2.211
2.211 6 April 2024

      * version 2.211
        Sat Apr 6 14:17:42 2024 +0100
        f14a09ae54eb45c7904aa0b1c22ff3314f8d18a1
2024-04-27 10:35:47 +00:00
Paul "LeoNerd" Evans
3c9665d5d2 cpan/Compress-Raw-Bzip2 - Update to version 2.211
2.211 6 April 2024

    * version 2.211
      Sat Apr 6 14:18:21 2024 +0100
      f0af7da12a9bdb3860965aab1ad57bca2f5004dc
2024-04-27 10:32:09 +00:00
Paul "LeoNerd" Evans
cf08fff556 cpan/Test-Simple - Update to version 1.302199
1.302199  2024-04-25 15:05:00+01:00 Europe/Lisbon

    - Minor fixes
2024-04-27 10:27:11 +00:00
Paul "LeoNerd" Evans
7bca205d7f cpan/Test2-Suite - Update to version 0.000162
0.000162  2024-04-25 14:57:23+01:00 Europe/Lisbon

    - Fix #292 and #270
2024-04-27 10:17:54 +00:00
Paul "LeoNerd" Evans
ffa64b2b85 cpan/Socket - Update to version 2.038
2.038   2024-04-15
        [CHANGES]
         * Add extra TCP_ and IPV6_ constants for Linux (RT143712)

        [BUGFIXES]
         * Account for newer Solaris behaviour on AF_UNIX address length
           (RT152866)
2024-04-27 10:00:40 +00:00
Paul "LeoNerd" Evans
06115c53f3 cpan/experimental - Update to version 0.032
0.032     2024-04-25 22:30:41+01:00 Europe/Lisbon
          - Add the newly-stable features to stable.pm - extra_paired_delimiters, const_attr, for_list
2024-04-27 09:48:38 +00:00
Dagfinn Ilmari Mannsåker
6c180ea44d pod_lib.pl: Remove obsolete exclusion of README.micro
README.micro was removed with the rest of microperl in commit
12327087bbec7f7feb3121a687442efe210e9dfc, but this reference was
missed.
2024-04-26 16:34:48 +01:00
Karl Williamson
0fe4872019 Don't output msg for harmless use of unsupported locale
This fixes GH #21562

Perl doesn't support all possible locales.  Locales that remap elements
of the ASCII character set or change their case pairs won't work fully,
for example.  Hence, some Turkish locales arent supported because
Turkish has different behavior in regard to 'I' and 'i' than other
locales that use the Latin alphabet.

The only multi-byte locales that perl supports are UTF-8 ones (and there
actually is special handling here to support Turkish).  Other multi-byte
locales can be dangerous to use, possibly crashing or hanging the Perl
interpreter.  Locales with shift states are particularly prone to this.

Since perl is written in C, there is always an underlying locale.  But
most C functions don't look at locales at all, and the Perl interpreter
takes care to call the ones that do only within the scope of 'use
locale' or for certain function calls in the POSIX:: module that always
use the program's current underlying locale.

Prior to this commit, if a dangerous locale underlied the program at
startup, a warning to that effect was emitted, even if that locale never
gets accessed.

This commit changes things so that no warning is output until and if the
dangerous underlying locale is actually attempted to be used.

Pre-existing code also deferred warnings about locales (like the Turkish
ones mentioned above) that aren't fully compatible with perl.  So it was
a simple matter to just modify this code a bit, and add some extra
checks for sane locales being in effect
2024-04-26 09:23:07 -06:00
Paul "LeoNerd" Evans
ed97e9af9b Move full list of extra_paired_delimiters characters out of feature.pm into pod/perlop.pod 2024-04-26 15:04:14 +01:00
Tomasz Konojacki
7a2df067a3 podlators: load PerlIO before trying to use its functions
Cherry-picked from https://github.com/rra/podlators/pull/28

Since it's a cherry-pick, podlators was marked as CUSTOMIZED and its
version was bumped.

Fixes #21841
2024-04-25 16:33:48 +02:00
H.Merijn Brand
404e97f797 /\=/ does not require \ even in older awk 2024-04-25 12:26:50 +02:00
Tony Cook
0598e47f33 perldelta for 6b628002d8 2024-04-24 10:26:29 +10:00
Tony Cook
122500c227 regcomp_trie: prevent wordlen value not used warning
This occurs with clang-17, and possibly other versions:

regcomp_trie.c:667:13: warning: variable 'wordlen' set but not used [-Wunused-but-set-variable]
  667 |         U32 wordlen      = 0;         /* required init */
      |             ^

This happens because while the first loop in Perl_make_trie calculates
wordlen, mostly via the TRIE_READ_CHAR macro, that calculated value
isn't used.

The later loops do use the value of wordlen via the TRIE_HANDLE_WORD()
macro.

Unfortunately the use in TRIE_READ_CHAR() means we can't remove
this first definition, so suppress the warning.
2024-04-24 09:50:31 +10:00
Tony Cook
5b2c91c3c5 regcomp_study.c: merged value only used under -DDEBUGGING
For a non-debugging build this would warn with clang 17:

regcomp_study.c:1067:9: warning: variable 'merged' set but not used [-Wunused-but-set-variable]
 1067 |     U32 merged = 0;
      |         ^
2024-04-24 09:50:31 +10:00
Tony Cook
c37e28edf7 allow porting/diag.t to detect messages from XSUBs in class.c
and briefly document the undocumented messages it found.

Note that the "Odd number of arguments" message isn't suppressible,
I do not know if that is by design:

  $ ./perl -Ilib -Mfeature=class -e 'no warnings; class C { field $x:param; } C->new("x")'
  Odd number of arguments passed to "C" constructor at -e line 1.

Discovered when porting/diag.t didn't warn about my new message
in the fix for #22159
2024-04-24 09:48:53 +10:00