This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
James E Keenan [Sun, 22 Aug 2021 23:50:13 +0000 (23:50 +0000)]
Porting/core-cpan-diff: Remove '--binary' on *BSDs
Other things being equal, Porting/core-cpan-diff defaults to passing '-u
--binary' to the 'diff' command. It turns out that, though '--binary'
is not a *documented* option for GNU diff, it is present in the source
code (rjbs research in
https://github.com/Perl/perl5/pull/19027#issuecomment-
898901007). The
'--binary' option clearly does *not* work on FreeBSD and probably
doesn't work on other *BSDs. On those systems, running the program
spews more than 80,000 lines of error output.
Code revised to remove '--binary' on *BSDs. Documentation adjusted.
For https://github.com/Perl/perl5/pull/19027
James E Keenan [Mon, 23 Aug 2021 01:48:14 +0000 (01:48 +0000)]
Merge branch 'pod-html-refactoring-5-of-5' into blead
James E Keenan [Sun, 15 Aug 2021 14:30:02 +0000 (14:30 +0000)]
Pod::Html: correct line dropped in
13f1edeb52
As noted by @Grinnz in
https://github.com/Perl/perl5/pull/19050#discussion_r688968921.
James E Keenan [Sun, 15 Aug 2021 14:20:32 +0000 (14:20 +0000)]
Pod::Html: remove debugging artifact
As noted by @Grinnz in https://github.com/Perl/perl5/pull/19050#discussion_r688969025.
James E Keenan [Sun, 15 Aug 2021 14:14:41 +0000 (14:14 +0000)]
Pod::Html: remove debugging artifact
As noted by @Grinnz in
https://github.com/Perl/perl5/pull/19050#discussion_r688969538.
James E Keenan [Sat, 14 Aug 2021 15:41:42 +0000 (15:41 +0000)]
Pod::Html: assign directly to array ref
This restores the thrust of
c0ac28175b, which got zapped when resolving
merge conflicts.
James E Keenan [Sun, 22 Aug 2021 23:22:45 +0000 (23:22 +0000)]
Pod-Html: remove commented-out code
Make use of Exporter consistent.
James E Keenan [Thu, 18 Mar 2021 19:18:14 +0000 (19:18 +0000)]
Introduce $self->{Pages}
htmldir3.t: 3rd test unit is now expected to fail. So now the test file
demonstrates that the unit fails whether it's placed before the second
unit or after.
Signed-off-by: James E Keenan <jkeenan@cpan.org>
James E Keenan [Thu, 18 Mar 2021 18:57:02 +0000 (18:57 +0000)]
Move $output into the object
Correct dropped variable declaration.
Signed-off-by: James E Keenan <jkeenan@cpan.org>
James E Keenan [Thu, 18 Mar 2021 18:04:20 +0000 (18:04 +0000)]
Replace _save_pages() with _transform()
_save_pages() is a Pod::Simple::Search method which takes two specific
arguments. From the point of view of making Pod-Html OO, it was
problematic because (a) it used a variable ($Podroot) defined outside of
its scope and (b) it assigned to a variable (%Pages) defined outside of
its scope. It was therefore resistant to encapsulation.
Experimentation showed that if we use the return value of
Pod::Simple::Search::survey(), we could parse that hashref using what
was the guts of _save_pages() and assign explicitly to %Pages.
TODO: Move %Pages within the Pod::Html object. Handle $object
properly.
Signed-off-by: James E Keenan <jkeenan@cpan.org>
Remove merge conflict marks, commented-out code, as noted by rjbs in
https://github.com/Perl/perl5/pull/19050#discussion_r693559914.
James E Keenan [Thu, 18 Mar 2021 12:21:55 +0000 (12:21 +0000)]
Convert 3 more subroutines to method calls
refine_parser(); feed_tree_to_parser(); write_file()
Signed-off-by: James E Keenan <jkeenan@cpan.org>
James E Keenan [Thu, 18 Mar 2021 12:14:33 +0000 (12:14 +0000)]
Turn 3 more internal subroutines into method calls
identify_input(); parse_input_for_podtree(); set_Title_from_podtree();
Signed-off-by: James E Keenan <jkeenan@cpan.org>
James E Keenan [Thu, 18 Mar 2021 12:04:00 +0000 (12:04 +0000)]
Have generate_cache() use object
Still have to deal with %Pages being outside the object.
Signed-off-by: James E Keenan <jkeenan@cpan.org>
James E Keenan [Thu, 18 Mar 2021 12:01:39 +0000 (12:01 +0000)]
Make get_cache(), cache_key() and load_cache() use object
Signed-off-by: James E Keenan <jkeenan@cpan.org>
James E Keenan [Thu, 18 Mar 2021 11:53:11 +0000 (11:53 +0000)]
File::Spec::Unix is not needed within package Pod::Html
It's only needed within Pod::Simple::XHTML::LocalPodLinks, so let's
remove it from the first package.
Signed-off-by: James E Keenan <jkeenan@cpan.org>
James E Keenan [Thu, 18 Mar 2021 00:05:33 +0000 (00:05 +0000)]
Start to make Pod::Html object-oriented.
For the time being, at least, we'll have pod2html() call a constructor.
All subs up through refine_globals have been turned into method calls.
Signed-off-by: James E Keenan <jkeenan@cpan.org>
James E Keenan [Mon, 12 Jul 2021 12:14:36 +0000 (12:14 +0000)]
Increment $VERSION to 1.33 in all .pm files
Dan Book [Wed, 4 Aug 2021 19:55:35 +0000 (15:55 -0400)]
perlfunc 'ref' and UNIVERSAL: document isa operator alternative
Karl Williamson [Sat, 14 Aug 2021 18:53:43 +0000 (12:53 -0600)]
isUTF8 DFA: change while {} to do {} while;
This saves a conditional in many cases. Core Perl doesn't call this
on an empty string, so the first test that it is empty is redundant.
We can't guarantee this for non-core calls, so the conditional is made
explicit for them.
Karen Etheridge [Sat, 21 Aug 2021 17:33:07 +0000 (10:33 -0700)]
update the range of versions we support and do not support
Karl Williamson [Sat, 21 Aug 2021 17:17:18 +0000 (11:17 -0600)]
Rmv redundant API info for isUTF8_char_flags
This resolves GH #19069
Karen Etheridge [Sat, 21 Aug 2021 16:20:49 +0000 (09:20 -0700)]
add epigraph for 5.35.3
Aristotle Pagaltzis [Sat, 21 Aug 2021 11:30:36 +0000 (13:30 +0200)]
Text-Tabs+Wrap: Sync with CPAN version 2021.0814
Chris 'BinGOs' Williams [Sat, 21 Aug 2021 10:06:12 +0000 (11:06 +0100)]
Here be corelist
Nicholas Clark [Sat, 21 Aug 2021 06:48:25 +0000 (06:48 +0000)]
Before filling the lookup hash for opcode names, pre-expand it.
We know the size needed (about 400 entries), so doing this saves several
automatic resizes when populating it.
Nicholas Clark [Fri, 20 Aug 2021 20:31:24 +0000 (20:31 +0000)]
Delete Perl_ptr_table_clear, marked as deprecated since v5.14.0
Karen Etheridge [Sat, 21 Aug 2021 03:38:24 +0000 (20:38 -0700)]
make way for 5.35.4
Karen Etheridge [Sat, 21 Aug 2021 03:30:02 +0000 (20:30 -0700)]
tick off release 5.35.3
Karen Etheridge [Sat, 21 Aug 2021 02:54:44 +0000 (19:54 -0700)]
add new release to perlhist
Karen Etheridge [Sat, 21 Aug 2021 02:36:54 +0000 (19:36 -0700)]
finalize perldelta
Karen Etheridge [Sat, 21 Aug 2021 02:11:49 +0000 (19:11 -0700)]
Update Module::CoreList for 5.35.3
Karen Etheridge [Sat, 21 Aug 2021 01:56:19 +0000 (18:56 -0700)]
update AUTHORS
Karen Etheridge [Sat, 21 Aug 2021 01:17:23 +0000 (18:17 -0700)]
more perldelta updates
Karl Williamson [Sat, 21 Aug 2021 01:55:35 +0000 (19:55 -0600)]
perlop: Fix indented here-doc empty line description
This bug was introduced by
c275db86a9.
Spotted by Karen Etheridge
Karen Etheridge [Sat, 21 Aug 2021 01:00:30 +0000 (18:00 -0700)]
add some missing perldelta entries
Karen Etheridge [Fri, 20 Aug 2021 23:58:28 +0000 (16:58 -0700)]
collapse 3 whitespace to 2
Karen Etheridge [Fri, 20 Aug 2021 23:57:57 +0000 (16:57 -0700)]
fix pod markup
Neil Bowers [Sat, 14 Aug 2021 21:11:13 +0000 (22:11 +0100)]
Added my choice of epigraph for 5.35.2
Nicholas Clark [Wed, 18 Aug 2021 19:31:38 +0000 (19:31 +0000)]
perldelta for sort.pm becoming a no-op.
Also fix a typo in sort's Pod.
David Golden [Tue, 17 Aug 2021 01:44:29 +0000 (21:44 -0400)]
Add top-level Code of Conduct document
This commit adds a top-level file that points readers to the actual
Standards of Conduct in perlpolicy.pod. It also makes a point to
distinguish between what the Perl Steering Council is responsible for
and what other community groups are responsible for.
Richard Leach [Tue, 10 Aug 2021 22:30:09 +0000 (23:30 +0100)]
pp_defined: modify OP_DEFINED paths to use TOPs and RETSETs
Tony Cook [Tue, 17 Aug 2021 04:31:12 +0000 (14:31 +1000)]
perldelta updates
also sort the module entries.
Tony Cook [Tue, 17 Aug 2021 04:30:11 +0000 (14:30 +1000)]
bump $Time::HiRes::VERSION
for the Makefile.PL change
Leon Timmermans [Mon, 16 Aug 2021 15:07:35 +0000 (17:07 +0200)]
Perldelta that «use v5.35» enables warnings
Karl Williamson [Sat, 7 Aug 2021 23:24:08 +0000 (17:24 -0600)]
mktables: Generate =head1 NAME line in Name.pm
All .pm files are supposed to have this line. So far this hasn't been
necessary for this file, but future commits will require it.
Ben Cornett [Sun, 11 Jul 2021 15:22:22 +0000 (15:22 +0000)]
Document v5.35 warnings-on-by-default
Asher Mancinelli [Fri, 23 Apr 2021 16:17:33 +0000 (10:17 -0600)]
Test new warnings enabled by default
Asher Mancinelli [Fri, 23 Apr 2021 16:17:09 +0000 (10:17 -0600)]
Add asher mancinelli to AUTHORS
Leon Timmermans [Sun, 28 Mar 2021 16:13:08 +0000 (18:13 +0200)]
Enable warnings on «use v5.35»
Max Maischein [Sat, 14 Aug 2021 20:35:02 +0000 (22:35 +0200)]
Add "run makedepend in parallel" to perldelta
Karl Williamson [Thu, 1 Jul 2021 00:21:16 +0000 (18:21 -0600)]
Add utf8_to_utf16
Karl Williamson [Thu, 1 Jul 2021 00:27:12 +0000 (18:27 -0600)]
Improve utf16_to_utf8_reversed()
Instead of destroying the input by first swapping the bytes, this calls
a base function with the order to use. The non-reverse function is
changed to call the base function with the non-reversed order.
James E Keenan [Fri, 13 Aug 2021 21:39:09 +0000 (21:39 +0000)]
lib/unicore/mktables: correct sub signatures in 2 locations
Then, re-run regen/mk_invlists.pl and regen/regcharclass.pl and commit
changes in headers.
Karl Williamson [Sat, 7 Aug 2021 13:38:54 +0000 (07:38 -0600)]
Simplify utf16_to_utf8()
A previous commit has simplified uvoffuni_to_utf8_flags() so that it is
hardly more than the code in this function. So strip out the code and
replace it by a call to uvoffuni_to_utf8_flags().
James E Keenan [Sat, 14 Aug 2021 15:08:04 +0000 (15:08 +0000)]
Merge branch 'pod-html-refactoring-4-of-5' into blead
James E Keenan [Tue, 10 Aug 2021 22:20:32 +0000 (22:20 +0000)]
Pod::Html::Util: small documentation changes
In part suggested by rjbs code review.
James E Keenan [Tue, 10 Aug 2021 21:59:07 +0000 (21:59 +0000)]
Pod::Html: assign directly to array ref
... rather than to the array which is referenced. (Corrected response
to rjbs comment in
https://github.com/Perl/perl5/pull/18977#discussion_r671734180)
James E Keenan [Mon, 12 Jul 2021 00:28:11 +0000 (00:28 +0000)]
Pod-Html: Simplify the sub which processes options
Pod::Html::Util::parse_command_line() was doing too much. It should
wrap around GetOptions(), call the usage() routine if needed, then
return a hashref of options to its caller.
Its caller -- Pod::Html::pod2html() -- should do the heavy lifting
involved in processing the options and inserting the data into the
globals hashref.
Hence, we rename Pod::Html::Util::parse_command_line to
Pod::Html::Util::process_command_line() and simplify its functionality.
In lib/Pod/Html.pm we import process_command_line(), call it and pass
its return value onto a new subroutine, process_options(), that
populates $globals.
Document Pod::Html::Util subroutines.
Karl Williamson [Thu, 1 Jul 2021 18:31:26 +0000 (12:31 -0600)]
utf8.c: Rmv #undef
This is unnecessary in a .c file, and the code it referred to has been
moved away.
Karl Williamson [Wed, 30 Jun 2021 21:43:46 +0000 (15:43 -0600)]
utf8.c: Use macros instead of reinventing them
Karl Williamson [Fri, 2 Jul 2021 00:48:10 +0000 (18:48 -0600)]
utf8.c: Refactor is_utf8_char_helper()
Now that the DFA is used by the only callers to this to eliminate the
need to check for e.g., wrong continuation bytes, this function can be
refactored to use a switch statement, which makes it clearer, shorter,
and faster.
The name is changed to indicate its private nature
Karl Williamson [Fri, 25 Jun 2021 19:09:08 +0000 (13:09 -0600)]
Make macro isUTF8_CHAR_flags an inline fcn
This makes it use the fast DFA for this functionality.
Karl Williamson [Fri, 2 Jul 2021 00:47:45 +0000 (18:47 -0600)]
is_utf8_valid_partial_char_flags: Use DFA
The DFA macro for determining if a sequence is valid UTF-8 was
deliberately made general enough to accommodate this use-case, in which
only a partial character is acceptable. Change the code to use the DFA.
The helper function's name is changed to indicate it is private
Karl Williamson [Wed, 30 Jun 2021 20:13:35 +0000 (14:13 -0600)]
utf8.c: Rmv EBCDIC dependency
There are new macros that suffice to make the determination here.
Karl Williamson [Wed, 30 Jun 2021 19:45:12 +0000 (13:45 -0600)]
utf8.c: Rmv an EBCDIC dependency
This is now generated by regcharclass.pl
James E Keenan [Fri, 13 Aug 2021 22:47:44 +0000 (18:47 -0400)]
Check off 5.35.2 in release schedule
Ricardo Signes [Fri, 13 Aug 2021 22:23:01 +0000 (18:23 -0400)]
perldelta: make note of "switch" leaving the v5.36 bundle
James E Keenan [Fri, 13 Aug 2021 21:23:03 +0000 (21:23 +0000)]
Leon Timmermans [Fri, 13 Aug 2021 01:48:42 +0000 (03:48 +0200)]
Make new makedepend logic compatible with bsd make
It used pattern rules, which are a gnu make feature that isn't supported
by bsd makes (and probably other makes)
For: https://github.com/Perl/perl5/pull/19047
TAKAI Kousuke [Wed, 11 Aug 2021 13:38:50 +0000 (22:38 +0900)]
Storable.xs: Fix a (possible) typo in byte-masking expression.
The containing function (Sntohl) seems to be never compiled because
<perl.h> always defines HAS_NTOHL, so no visible change is expected.
Max Maischein [Mon, 28 Dec 2020 12:00:49 +0000 (13:00 +0100)]
WIP: Run `makedepend` in parallel by using `make`
This moves the per-file loop body of `makedepend` into a separate
file named `makedepend_file` and then uses `make` to launch
the `makedepend_file` processes for each target potentially in parallel.
This reduces the time for
time sh ./makedepend MAKE=make cflags
from 5 seconds to 2 seconds with MAKEFLAGS=-j8
Karl Williamson [Wed, 11 Aug 2021 13:41:07 +0000 (07:41 -0600)]
mktables: Change "null string" to "empty string"
The latter phrase makes more sense
Karl Williamson [Wed, 11 Aug 2021 13:50:30 +0000 (07:50 -0600)]
mktables: Add, fix comments
Karl Williamson [Wed, 11 Aug 2021 13:46:14 +0000 (07:46 -0600)]
mktables: Fix debugging issues
Commit
4fe9356b250 changed the signatures on subroutines, and didn't do
these correctly. The result was that perl would croak when using the
mktables debugging facility.
H.Merijn Brand [Wed, 11 Aug 2021 11:22:46 +0000 (13:22 +0200)]
Regen Configure and Glossary after backport of xlocale.h addition
Tony Cook [Thu, 24 Jun 2021 04:49:55 +0000 (14:49 +1000)]
only #include <xlocale.h> when it is actually needed
This header was originally only needed for builds on darwin and
FreeBSD, but was being included whenever it was detected.
This has caused problems when what was an internal header was
removed (from glibc) and in general wasn't needed anyway.
On FreeBSD only localeconv_l() requires xlocale.h, so we test
specifically for that.
James E Keenan [Sat, 24 Jul 2021 14:14:54 +0000 (14:14 +0000)]
installhtml: new location for imports of helper functions
As reported by sisyphus in
https://www.nntp.perl.org/group/perl.perl5.porters/2021/07/msg260930.html
Bump $Pod::Html::VERSION.
James E Keenan [Tue, 3 Aug 2021 17:29:29 +0000 (17:29 +0000)]
Pod-Html: document new location for utility functions
... along with guidance on changes in perl-5.38.
Pod::Html::Util: caution on use of these subroutines outside core. For
perl-5.36, these three utility functions will still be importable from
Pod::Html, but thereafter they will only be importable from
Pod::Html::Util. (They are simply imported and re-exported per
suggestion from Graham Knop in GH 19036.
Also, (i) add explicit tests for anchorify() and relativize_url() based
on how they are used in 'installhtml'; (ii) conduct these tests imported
from both Pod::Html::Util (permanently) and Pod::Html (during perl-5.36
only).
For: https://github.com/Perl/perl5/pull/19036
Tony Cook [Wed, 7 Jul 2021 05:20:39 +0000 (15:20 +1000)]
Provide a simple API for testing features enabled
Inspired by discussion in #p5p.
This calls caller() itself rather than taking hints and hints_hash
parameters so if we end up adding an extra hints word callers won't
need to adjust their code.
Tony Cook [Mon, 2 Aug 2021 02:04:34 +0000 (12:04 +1000)]
Time-HiRes: handle $Config{d_various} correctly
The Time::HiRes Makefile.PL checks %Config for a variety of symbols
to attempt to probe for them without having to perform its own
compilation/run to probe for them. This is useful for cross
compilation, since the Time::HiRes probes don't appear to handle
probing on a remote system as the Configure probes do.
A few of these probes didn't set the appropriate -DTIME_HIRES_XXX
symbol on the compilation command-line, fix that.
Ricardo Signes [Mon, 9 Aug 2021 17:15:48 +0000 (13:15 -0400)]
Upgraded Encode from 3.10_01 to 3.12
Karl Williamson [Sat, 7 Aug 2021 20:16:37 +0000 (14:16 -0600)]
perlop: Clarify indented here-doc rules
Ricardo Signes [Mon, 9 Aug 2021 12:26:36 +0000 (08:26 -0400)]
Merge branch 'encode-cve-fix' into blead
Ricardo Signes [Mon, 9 Aug 2021 12:14:05 +0000 (08:14 -0400)]
Encode.pm: apply a local patch for CVE-2021-36770
I expect Encode to see a new release today.
Without this fix, Encode::ConfigLocal can be loaded from a path relative
to the current directory, because the || operator will evaluate @INC in
scalar context, putting an integer as the only value in @INC.
Karl Williamson [Sat, 7 Aug 2021 22:47:24 +0000 (16:47 -0600)]
mktables: Fix table output
Commit
4fe9356b250 changed the signatures on subroutines, and didn't do
this one correctly. The result was that the comments in the generated
files had duplicate text and were slightly garbled.
Karl Williamson [Sat, 7 Aug 2021 20:50:13 +0000 (14:50 -0600)]
regcomp.c: White-space only
Karl Williamson [Wed, 2 Jun 2021 01:29:29 +0000 (19:29 -0600)]
regcomp.c: Add comment; fix comment
The flagp parameter currently can only be used to pass values up, not
down.
Karl Williamson [Tue, 1 Jun 2021 01:44:03 +0000 (19:44 -0600)]
regcomp.c: Initialize a variable
to silence some compilers that were warning
Karl Williamson [Thu, 21 May 2020 17:40:24 +0000 (11:40 -0600)]
regcomp.c: Save a value instead of re-calling fcn
This variable will be used in future commits in more places, so compute
it just once.
Karl Williamson [Thu, 21 May 2020 17:39:48 +0000 (11:39 -0600)]
regcomp.c: Add a clearer mnemonic
Karl Williamson [Thu, 21 May 2020 17:30:13 +0000 (11:30 -0600)]
regcomp.c: Move some code to within a block
This code is irrelevant unless the condition of the block immediately
before it is TRUE, so move it to within that block.
Karl Williamson [Sat, 2 May 2020 13:06:57 +0000 (07:06 -0600)]
regcomp.c: Consolidate duplicate code
Karl Williamson [Mon, 31 May 2021 23:12:21 +0000 (17:12 -0600)]
regcomp.c: S_optimize_regclass() return 0 if fail
Based on a comment from @hvds, I think it better if this function return
an impossible node value if it didn't find a node to use.
Karl Williamson [Tue, 18 May 2021 18:04:37 +0000 (12:04 -0600)]
regcomp.c: Add some branch predictors
Karl Williamson [Tue, 18 May 2021 18:05:11 +0000 (12:05 -0600)]
regcomp.c: Move some code out of unlikely #ifdef
Spotted by Hugo van der Sanden. Doing this caused it to attempt to be
compiled, and showed a typo.
Karl Williamson [Sat, 7 Aug 2021 20:14:07 +0000 (14:14 -0600)]
perlfunc: Fix typo
Karl Williamson [Sun, 9 May 2021 21:02:00 +0000 (15:02 -0600)]
utf8.c: Rename formal param to static fcn
The new mname is more mnemonic
Karl Williamson [Sat, 7 Aug 2021 20:07:20 +0000 (14:07 -0600)]
regexec.c: Add comment
Karl Williamson [Sun, 6 Jun 2021 14:16:34 +0000 (08:16 -0600)]
handy.h: Fix internal macro
I found this reading code. The macro is supposed to check for something
not being in the ASCII range, but instead checked that the input is
invariant under UTF-8. These concepts evaluate to the same thing on
ASCII platforms, but differently on EBCDIC ones. The calls to this
macro are such that there isn't a bug that surfaces here, but the code
generated is slightly different, and it should be fixed to prevent any
future issues.
Karl Williamson [Sun, 25 Jul 2021 01:24:54 +0000 (19:24 -0600)]
regexec.c: Refactor macro to generalize it
This is in preparation for a somewhat different use to be added.