This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
John Lightsey [Tue, 25 Aug 2020 21:00:52 +0000 (16:00 -0500)]
Make security warnings in the Safe and Opcode modules more direct.
The current "no warranty" text warning against the use of Safe or
Opcode for "security purposes" is somewhat ambiguous. These modules
are not effective sandboxing mechanisms for evaluating untrusted
perl code and should not be used in that manner.
Safe and Opcode are, at best, hardening measures that could be used
in combination with operating system level sandboxing of the perl
interpreter.
John Lightsey [Tue, 25 Aug 2020 20:49:05 +0000 (15:49 -0500)]
Document the security team's processes and practices
Add a new perlsecpolicy POD file with detailed descriptions
of the security team's vulnerability remediation workflow and
the criteria used to distinguish security issues from other
types of bugs.
This also switches the team's public contact address to
perl-security@perl.org, and updates the security contact
information shown in github's issue interface.
Karl Williamson [Sun, 6 Sep 2020 03:45:54 +0000 (21:45 -0600)]
perlapi: Consolidate sv_dec-ish entries
Karl Williamson [Sun, 6 Sep 2020 19:10:02 +0000 (13:10 -0600)]
Use macro instead of its expansion
We already have a macro that expands to what this code does; it's
clearer to use it.
Karl Williamson [Sat, 5 Sep 2020 18:13:50 +0000 (12:13 -0600)]
perlapi: Consolidate sv_set[inu]v-ish entries
Karl Williamson [Sun, 6 Sep 2020 18:52:28 +0000 (12:52 -0600)]
perlapi: Fix poor wording in MUTABLE_PTR
H.Merijn Brand [Mon, 7 Sep 2020 12:26:35 +0000 (14:26 +0200)]
Missing update
I need this to auto-happen :)
H.Merijn Brand [Mon, 7 Sep 2020 12:24:28 +0000 (14:24 +0200)]
Comment for L_R_TZSET now correctly added to config_h.SH
Karl Williamson [Mon, 7 Sep 2020 02:26:08 +0000 (20:26 -0600)]
regen podguts after mg_vtable.pl changes
Caused in
eb0444cb23a8ec47ef18d5aa33ec88aa5e71b7e8
Ricardo Signes [Mon, 7 Sep 2020 00:38:52 +0000 (20:38 -0400)]
perlop: put the stringy bitwise ops in precedence table
Ricardo Signes [Mon, 7 Sep 2020 00:30:36 +0000 (20:30 -0400)]
perldesc: replace circumfix with postfix dereference
...and what an odd one, this!
Ricardo Signes [Mon, 7 Sep 2020 00:29:53 +0000 (20:29 -0400)]
perldsc: eliminate unnecessary call to keys()
A hash in scalar context now evalutes to its key count, meaning that
(%h1 <=> %h2) is equivalent to, but shorter than, (keys %h1 <=> keys
%h2). I have dropped calls to keys() in this code to make it clearer.
(This commit may be controversial, as in some places scalar(@arr) is
being used with the suggestion that it provides values.)
Ricardo Signes [Mon, 7 Sep 2020 00:28:20 +0000 (20:28 -0400)]
perldsc: slightly tweak examples for clarity
Ricardo Signes [Mon, 7 Sep 2020 00:28:02 +0000 (20:28 -0400)]
perldsc: remove suggestion of more docs coming someday
Ricardo Signes [Mon, 7 Sep 2020 00:27:40 +0000 (20:27 -0400)]
perldsc: remove the reference to using -w
Ricardo Signes [Mon, 7 Sep 2020 00:25:23 +0000 (20:25 -0400)]
perldsc: in general, prefer postfix to circumfix dereference
In all (or almost all) cases, postfix dereferencing is simpler to read
and write. This makes it the better choice for teaching new Perl
programmers.
I have left in reference to circumfix deref, but mostly to acknowledge
that it exists, not to suggest its use.
Ricardo Signes [Mon, 24 Aug 2020 01:30:35 +0000 (21:30 -0400)]
perlretut: make example code pass under strict
Ricardo Signes [Mon, 24 Aug 2020 01:30:21 +0000 (21:30 -0400)]
language docs: replace one pointless use of circumfix deref
Ricardo Signes [Mon, 24 Aug 2020 01:30:06 +0000 (21:30 -0400)]
language docs: prefer postfix deref in numerous places
Karl Williamson [Mon, 7 Sep 2020 02:26:08 +0000 (20:26 -0600)]
regen/mg_vtable.pl: Fix perlapidoc display
This wasn't generating the right thing
Karl Williamson [Sun, 6 Sep 2020 00:04:39 +0000 (18:04 -0600)]
perlapi: Clarify croak_no_modify()
Karl Williamson [Sat, 5 Sep 2020 23:51:45 +0000 (17:51 -0600)]
perlapi: Consolidate some nocontext fcns with their main fcn
Karl Williamson [Thu, 18 Jun 2020 09:05:37 +0000 (03:05 -0600)]
mg.c: Use SvTRUE instead of sv_true
The former is preferred. This was the only sv_true() use in the core.
Karl Williamson [Tue, 16 Jun 2020 22:42:47 +0000 (16:42 -0600)]
Clarify branch prediction in SvTRUE
Karl Williamson [Sat, 29 Aug 2020 19:35:29 +0000 (13:35 -0600)]
embed.fnc: Mark pad_setsv as core-only
You are supposed to access this functionality through PAD_SETSV
Karl Williamson [Thu, 27 Aug 2020 21:22:22 +0000 (15:22 -0600)]
perlapi: Clarify SV Handling
Karl Williamson [Thu, 27 Aug 2020 20:05:19 +0000 (14:05 -0600)]
perlapi: Display PERL_VERSION_xy better
Now that we have the tools to show these as a whole list, do so
Karl Williamson [Thu, 27 Aug 2020 15:42:01 +0000 (09:42 -0600)]
Document mini_mktime
Karl Williamson [Thu, 27 Aug 2020 13:41:39 +0000 (07:41 -0600)]
Document INT16_C, etc
Karl Williamson [Thu, 27 Aug 2020 12:58:25 +0000 (06:58 -0600)]
Change docs display for PERL_UNUSED_foo
These should have a semicolon after each in their usage
Karl Williamson [Thu, 27 Aug 2020 12:57:28 +0000 (06:57 -0600)]
Document PERL_UNUSED_DECL
Karl Williamson [Thu, 27 Aug 2020 12:56:05 +0000 (06:56 -0600)]
Document cPERLscope
Karl Williamson [Wed, 26 Aug 2020 22:46:16 +0000 (16:46 -0600)]
README.os2: Fix pod link typo
Karl Williamson [Wed, 22 Jul 2020 22:43:11 +0000 (16:43 -0600)]
Remove redundant documentation
Now that we can get automatic links in perlapi, remove the redundant
stripped-down documentation that goes there in favor of the better
documentation in perlcall.
Karl Williamson [Wed, 22 Jul 2020 23:18:31 +0000 (17:18 -0600)]
embed.fnc: Add text to comment
Karl Williamson [Wed, 22 Jul 2020 22:46:57 +0000 (16:46 -0600)]
Document vload_module
Karl Williamson [Wed, 22 Jul 2020 22:07:45 +0000 (16:07 -0600)]
Note that some dump constant flags are not public
One of these is no longer used; the others have synonyms that are
public. None are used in cpan
Karl Williamson [Wed, 22 Jul 2020 12:34:35 +0000 (06:34 -0600)]
embed.fnc: Mark several regex helpers as Core only
These are for internal regex use.
Karl Williamson [Sat, 18 Jul 2020 13:27:48 +0000 (07:27 -0600)]
Document several warner() fcns
Karl Williamson [Sat, 5 Sep 2020 22:40:17 +0000 (16:40 -0600)]
autodoc: Avoid a loop iteration
Initializing everything with the first elements values allows us to not
look at that element again. Previously, only somethings were so
initialized.
Karl Williamson [Sat, 5 Sep 2020 22:37:22 +0000 (16:37 -0600)]
autodoc: Properly take into account pTHX
Before this patch, it wasn't considering the thread context when
deciding whether two forms of similar functions had the same signature
or not; hence not displaying things when it should have.
Karl Williamson [Sat, 5 Sep 2020 21:30:25 +0000 (15:30 -0600)]
mg.h: White-space only
Karl Williamson [Sat, 5 Sep 2020 21:29:57 +0000 (15:29 -0600)]
Document whichsig and kin
Karl Williamson [Sat, 5 Sep 2020 21:19:46 +0000 (15:19 -0600)]
autodoc: Correctly display some function signatures
The code wasn't properly showing signatures when the function was a
subsidiary one in an entry containing multiple functions, and the
function's signature was specified in embed.fnc
Karl Williamson [Sat, 5 Sep 2020 21:35:22 +0000 (15:35 -0600)]
porting/known_pod_issues.dat: Note vsprintf() exists
Karl Williamson [Sat, 5 Sep 2020 18:01:51 +0000 (12:01 -0600)]
Document sv_vcatpvfn
Consolidate it with sv_vcatpvfn_flags
Karl Williamson [Sat, 5 Sep 2020 15:39:38 +0000 (09:39 -0600)]
autodoc: Fix for win32.
This platform has config.h located in a different place
Thanks to Christian Walde for testing this
Karl Williamson [Sat, 5 Sep 2020 17:02:01 +0000 (11:02 -0600)]
embed.fnc: Note pregcomp/pregexec are now documented
This silences a warning from autodoc.pl.
Spotted by James Keenan
Karl Williamson [Thu, 27 Aug 2020 20:41:09 +0000 (14:41 -0600)]
Document MUTABLE_PTR, MUTABLE_AV, ...
Karl Williamson [Sat, 18 Jul 2020 13:15:40 +0000 (07:15 -0600)]
Document PL_hexdigit
Karl Williamson [Sun, 28 Jun 2020 18:57:34 +0000 (12:57 -0600)]
sv.c: Change flags param on two fcns from I32 to U32
This is so the parameter types for sv_2pv_flags and sv_pvn_force_flags
are indistinguishable from similar functions, and can be passed as a
function pointer in a future commit.
It doesn't generally make sense to have a flags variable signed anyway.
Karl Williamson [Sat, 29 Aug 2020 20:05:17 +0000 (14:05 -0600)]
Remove regexec_flags from public API
This should only be called as part of a regex engine, and hence is not
an API function.
Karl Williamson [Sat, 29 Aug 2020 18:36:30 +0000 (12:36 -0600)]
perlapi: Add some links, wrap C<...>
Karl Williamson [Thu, 27 Aug 2020 21:29:15 +0000 (15:29 -0600)]
perlreapi: Wrap a function name in C<>
Karl Williamson [Thu, 27 Aug 2020 20:04:18 +0000 (14:04 -0600)]
perlapi: Don't show a return type for __ASSERT_
Karl Williamson [Thu, 27 Aug 2020 16:15:07 +0000 (10:15 -0600)]
Change formal parameter name of gv_fetchpv*
This is a flags parameter, not a particular single flag
Karl Williamson [Thu, 27 Aug 2020 15:44:05 +0000 (09:44 -0600)]
Note for Devel::PPPort HvNAME_get, HvNAMELEN_get
Karl Williamson [Thu, 27 Aug 2020 15:33:43 +0000 (09:33 -0600)]
perlcall: Add some C<>
Karl Williamson [Thu, 27 Aug 2020 15:29:52 +0000 (09:29 -0600)]
perlapi: Don't display usage for PL_errgv
Karl Williamson [Thu, 27 Aug 2020 15:26:55 +0000 (09:26 -0600)]
perlapi: capitalize 'op'
Karl Williamson [Thu, 27 Aug 2020 15:23:19 +0000 (09:23 -0600)]
perlapi: deprecate pack_cat() (a mathoms func)
Karl Williamson [Thu, 27 Aug 2020 15:17:59 +0000 (09:17 -0600)]
Change formal parameter name of gv_autload4
The name was completely irrelevant to what it is
Karl Williamson [Thu, 27 Aug 2020 15:09:46 +0000 (09:09 -0600)]
Document IN_PERL_(RUN|COMPILE)TIME
Karl Williamson [Thu, 27 Aug 2020 13:53:30 +0000 (07:53 -0600)]
perlapi: XS_EXTERNAL is preferred over plain XS
Karl Williamson [Thu, 27 Aug 2020 13:49:37 +0000 (07:49 -0600)]
perlapi: XS, XS_EXTERNAL do take a parameter
Karl Williamson [Thu, 27 Aug 2020 13:05:11 +0000 (07:05 -0600)]
Improve docs for PERL_foo_MAX/MIN
This puts these in the new sections of perlapi, and makes them display
better.
Karl Williamson [Thu, 27 Aug 2020 12:51:58 +0000 (06:51 -0600)]
Fixup docs for LIKELY/UNLIKELY
Karl Williamson [Thu, 27 Aug 2020 12:42:33 +0000 (06:42 -0600)]
Fix docs for STMT_START,END,BRACE_GROUPS
Karl Williamson [Sat, 29 Aug 2020 20:21:35 +0000 (14:21 -0600)]
perlguts: Rmv unneeded meta apidoc line
These instructions to apidoc are actually not relevant, because the pod
they were trying to control is verbatim, hence not looked at.
Karl Williamson [Thu, 27 Aug 2020 21:31:04 +0000 (15:31 -0600)]
perlreguts: Note pregcomp/regexec are documented here
Karl Williamson [Thu, 27 Aug 2020 21:00:41 +0000 (15:00 -0600)]
perlguts: Fix grammar
Karl Williamson [Thu, 27 Aug 2020 20:59:26 +0000 (14:59 -0600)]
perlguts: Note that UVXf is mentioned
This particular format had been omitted
Karl Williamson [Thu, 27 Aug 2020 13:10:22 +0000 (07:10 -0600)]
UTF8fARG,UTF8f are documented in perlguts
Karl Williamson [Wed, 22 Jul 2020 22:40:01 +0000 (16:40 -0600)]
perlguts: Note that various SAVEfoo macros are documented
Karl Williamson [Wed, 22 Jul 2020 22:38:05 +0000 (16:38 -0600)]
perlguts: Note existence of SAVEI8, I16, BOOL
Karl Williamson [Sat, 29 Aug 2020 17:46:39 +0000 (11:46 -0600)]
embed.fnc: 'ref' is not an API function
In fact is only accessible to 3 .c files, all in core.
Karl Williamson [Thu, 27 Aug 2020 20:41:53 +0000 (14:41 -0600)]
perlapi: Improve display of isFOO
The character classification macro variants are now presented as a list
Karl Williamson [Sat, 5 Sep 2020 05:42:54 +0000 (23:42 -0600)]
Fix bytes_from_utf8_loc() pod
I didn't mean to apply
8505db87404436956f86e54885cacd73840801c0 just
yet, but having done so, there is a change required in a link
Karl Williamson [Fri, 4 Sep 2020 23:20:59 +0000 (17:20 -0600)]
perlapi: Consolidate some references to perlguts
Karl Williamson [Fri, 28 Aug 2020 12:50:29 +0000 (06:50 -0600)]
perlapi: Turn some references to mg_[gs]et into links
Karl Williamson [Thu, 27 Aug 2020 20:09:28 +0000 (14:09 -0600)]
perlapi: Display toFOO better
The character case change macro variants are now displayed all
together
Karl Williamson [Sat, 29 Aug 2020 19:45:48 +0000 (13:45 -0600)]
Make bytes_from_utf8_loc() internal
And add it to perlintern, and fix grammar in its pod
Karl Williamson [Sun, 16 Aug 2020 12:35:04 +0000 (06:35 -0600)]
regen/warnings.pl: Move some hidden pod
This is a long list of warning categories which doesn't print, but
exists to indicate to downstream tools, such as Devel::PPPort that these
categories exist and are documented. Move them to the end of the file
so as to make the meat of things flow better.
Karl Williamson [Sun, 16 Aug 2020 12:32:41 +0000 (06:32 -0600)]
Document packWARN.?
Karl Williamson [Sun, 16 Aug 2020 12:31:31 +0000 (06:31 -0600)]
regen/warnings.pl: Collapse closely related pod
Having separate entries for ckWARN ... ckWARN4 just clutters things
up. Instead fairly recent extensions to our API generation mechanism
allows these to be variants in a single entry.
Karl Williamson [Mon, 31 Aug 2020 22:43:53 +0000 (16:43 -0600)]
perlapi: Consolidate PERL_MAGIC_foo entries
Karl Williamson [Fri, 4 Sep 2020 22:13:57 +0000 (16:13 -0600)]
Merge branch 'autodoc update' into blead
This series of commits updates autodoc to generate a more complete and
improved perlapi/perlintern
A major change is the ability to group multiple items in one entry. We
have many cases where there are slightly different takes on essentially
the same functionality, such as handling magic or not. All can be
grouped in the same entry, and only their differences noted. This make
is easier to add new pod when adding a new variant, and it means a more
concise .pod file, with the user not having to jump from entry A that is
listed as similar to entry B, which in turn may even currently say it is
similar to entry C.
The elements in config.h are now included in perlapi, most in new
sections.
I posted an example of these changes in p5p and got zero comments, so am
pushing as it is now. It is easy to add new sections and to move items
to different ones than they currently are in.
This commit series doesn't actually do any consolidation of entries;
merely enables the ability to do so. Patches for doing this will come
over time, and hopefully by multiple members of the community.
Karl Williamson [Wed, 2 Sep 2020 16:39:30 +0000 (10:39 -0600)]
autodoc: Update comments to reflect new behavior
Karl Williamson [Thu, 3 Sep 2020 23:41:32 +0000 (17:41 -0600)]
autodoc.pl: Regularize perlintern handling
Karl Williamson [Sat, 29 Aug 2020 19:33:54 +0000 (13:33 -0600)]
autodoc.pl: Add missing semi-colon
Karl Williamson [Wed, 2 Sep 2020 16:55:47 +0000 (10:55 -0600)]
Update embed.fnc to document autodoc changes
Karl Williamson [Wed, 26 Aug 2020 22:42:40 +0000 (16:42 -0600)]
autodoc: Add section name checking
In the past a section could just spring into existence. This adds a
check that it is one of the known ones, so typos won't create a screwed
up perlapi. If a new section is needed, just add it to the list of
valid ones.
Karl Williamson [Wed, 26 Aug 2020 22:15:37 +0000 (16:15 -0600)]
autodoc: Display list of sections near top
This would enable someone to more quickly organize their search
Karl Williamson [Wed, 26 Aug 2020 23:47:31 +0000 (17:47 -0600)]
Reorganize perlapi
This uses a new organization of sections that I came up with. I asked
for comments on p5p, but there were none.
Karl Williamson [Wed, 26 Aug 2020 23:40:28 +0000 (17:40 -0600)]
Change some =head1 to apidoc_section lines
apidoc_section is slightly favored over head1, as it is known only to
autodoc, and can't be confused with real pod.
Karl Williamson [Wed, 26 Aug 2020 22:07:42 +0000 (16:07 -0600)]
autodoc: Don't output empty section
But warn when one encountered.
Karl Williamson [Tue, 1 Sep 2020 23:47:44 +0000 (17:47 -0600)]
autodoc: Revise display of apidoc elements
This heavily refactors the code that outputs each api element.
Indentation is cut to 1 space, as anything more doesn't matter much
visually, or at all in html displays, and this gives more geography on a
line.
More importantly, multiple items sharing the same pod within the same
element are displayed prettier.
xxx 1 indent f display
Karl Williamson [Wed, 26 Aug 2020 19:08:03 +0000 (13:08 -0600)]
autodoc: Add config.h to what is documented
config.h is now parsed, and the results intermixed into perlapi.
Karl Williamson [Wed, 26 Aug 2020 18:23:07 +0000 (12:23 -0600)]
autodoc: Add section footers in this file
Previously, there were no section footers
This commit doesn't actually add any of these; just accepts and handles
any future ones.
Karl Williamson [Wed, 26 Aug 2020 18:17:47 +0000 (12:17 -0600)]
autodo: Enclose elements with C<...>
This make all-caps ones look better