| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
"layout" is a noun, while "lay out" a verb (somewhat).
|
|
|
|
| |
Fix spelling on various files pertaining to core Perl.
|
|
|
|
|
| |
Else... you'll get something recognizable back last century (e.g., 99 for 1999) , but what currently (123) looks more like https://en.wikipedia.org/wiki/Republic_of_China_calendar (112) than anything anyone else on the planet would understand!
Also, my correction ensures the man page will still be correct after the year 9999!
|
|
|
|
|
|
|
|
|
|
|
|
| |
The comment from Tony Cook
https://github.com/Perl/perl5/issues/20373#issuecomment-1524256091
made me realize that this function doesn't fully work. It was added as
public API earlier in the 5.37 series, but we don't want it making it
into a stable release. This commit renames it so that the original name
will no longer work, but POSIX.xs can still, by changing to use the new
name.name
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Manually messing around with Z<> and E<nbsp> just ends up looking weird
in some formatters. See for example
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033649>.
Use POD's built-in support for numbered lists instead. (Also, add the
missing "." after some numbers in the first list.)
Fixes #20997.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Make wording consistent
Foobar
|
| |
|
|
|
|
| |
In a list, only the final item has an 'and'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
state file
Currently we only store state if we are running parallel tests, so if
you run the tests in series we do not store data on how long they took,
and we can't use that information in a follow up parallel test run.
We also do not allow the state file to be customized to be outside of
the repo, so git clean -dfx wipes it. This means you can't keep your
test data over time, which can be a bit annoying.
We also currently construct the state object twice during setup,
resulting in two (useless) warnings when the state file is missing,
which also doubles the time to set up the tests because the yaml file
gets read twice, and not very efficiently either.
This patch changes the logic so that we initialize the state object only
once during startup, and we use the state file if we are going to run
tests, parallel or not, provided the user does not explicitly disable it
(see below). The order that tests are run is affected only when the
tests are run in parallel.
It also allows the user to specify where the state file should live,
with the $ENV{PERL_TEST_STATE_FILE} environment variable, which can be
set to 0 or the empty string to disable use of the state file if needed.
We also take care to silence the warning about an empty state file,
except in the case where the user has overriden the file name with the
$ENV{PERL_TEST_STATE_FILE}.
Lastly this patch disables loading the state data /at all/, when
the dump_tests option is invoked. There is no need nor point to
load the state data when we are simply going to dump out the list
of tests we will run.
|
|
|
|
|
|
|
|
|
|
| |
- remove trailing spaces
- add hyperlink to "caller" in perlfunc
- add hyperlink to $^H in description of %^H
- change "pointers to objects" to "references to objects"
- change "semantic" to "semantics"
- reword "useful for implementation of pragmas" as "useful for
implementing pragmas"
|
| |
|
| |
|
| |
|
|
|
|
| |
Also spell check and remove empty sections.
|
|
|
|
| |
Also trim some whitespace from perlvar.pod
|
|
|
|
|
|
| |
We use U16 for various internal logic related to parens. If we
exceed this count stuff is going to go silently wrong. Might as
well throw a proper error during compilation to detect this.
|
|
|
|
|
|
| |
Multiple deprecation types that are not scheduled for removal in a
specific version were not listed. Also now that we have deprecation
subcategories we should specify them in the docs.
|
|
|
|
| |
It was incorrectly documented as going away in 5.40
|
|
|
|
| |
This was missed when smartmatch was deprecated.
|
|
|
|
|
| |
This also fixes the version_downgrade to show the correct version that
version downgrades will be removed in.
|
|
|
|
|
| |
This category applies to attempts to goto the internals of a block
construct.
|
|
|
|
|
|
| |
Some delimiters are considered deprecated because in the future they
will be used as part of a paired delimiter. This adds a new category
for these cases.
|
|
|
|
|
|
|
| |
deprecation category
This category is about use of apostrophe as a package separator, eg
for things like "Test::More::isn't()".
|
|
|
|
|
|
| |
This category is only used in the regex engine, we should be able
to disable it specifically, as it seems like we will never actually
remove demove support for the things it warns about.
|
|
|
|
|
| |
Instead of using a generic warnings category switch to fine grained
control.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we seem to lack a way to have a subcategory under deprecated.
It seems reasonable to me that people might want to disable a specific
subcategory warning while leaving the rest in place. This patch allows
that. Note that both
no warnings "deprecated";
and
no warnings "deprecated::smartmatch";
work to disable the warning. Deprecated warnings shouldn't be "all or
nothing", they should be specific and targetted.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This defines a new magic hash C<%{^HOOK}> which is intended to be used for
hooking keywords. It is similar to %SIG in that the values it contains
are validated on set, and it is not allowed to store something in
C<%{^HOOK}> that isn't supposed to be there. Hooks are expected to be
coderefs (people can use currying if they really want to put an object
in there, the API is deliberately simple.)
The C<%{^HOOK}> hash is documented to have keys of the form
"${keyword}__${phase}" where $phase is either "before" or "after"
and in this initial release two hooks are supported,
"require__before" and "require__after":
The C<require__before> hook is called before require is executed,
including any @INC hooks that might be fired. It is called with the path
of the file being required, just as would be stored in %INC. The hook
may alter the filename by writing to $_[0] and it may return a coderef
to be executed *after* the require has completed, otherwise the return
is ignored. This coderef is also called with the path of the file which
was required, and it will be called regardless as to whether the require
(or its dependencies) die during execution. This mechanism makes it
trivial and safe to share state between the initial hook and the coderef
it returns.
The C<require__after> hook is similar to the C<require__before> hook
however except that it is called after the require completes
(successfully or not), and its return is ignored always.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function SAVEDESTRUCTOR_X() (save_destructor_x) can be used to
execute a C function at the end of the current psuedo-block. Prior to
this patch there was no "mortal" equivalent that would execute at the
end of the current statement. We offer a collection of functions which
are intended to free SV's at either point in time, but only support
callbacks at the end of the current pseudo-block.
This patch adds two such functions, "mortal_destructor_sv" which can be
used to trigger a perl code reference to execute at the end of the
current statement, and "mortal_svfunc_x" which can be used to trigger an
SVFUNC_t C function at the end of the current statement.
Both functions differ from save_destructor_x() in that instead of
supporting a void pointer argument they both require their argument to
be some sort of SV pointer. The Perl callback function triggered by
"mortal_destructor_sv" may be provided no arguments, a single argument
or a list of arguments, depending on the type of argument provided to
mortal_destructor_sv(): when the argument is a raw AV (with no SV ref
wrapping it), then the contents of the AV are passed in as a list of
arguments. When the argument is anything else but NULL, the argument is
provided as a single argument, and when it is NULL the perl function is
called with no arguments.
Both functions are implemented on top of a mortal SV (unseen by the
user) which has PERL_MAGIC_destruct magic associated with it, which
triggers the destructor behavior when the SV is freed.
Both functions are provided with macros to match the normal SAVExx()
API, with MORTALDESTRUCTOR_SV() wrapping mortal_destructor_sv() and
MORTALSVFUNC_X() wrapping mortal_svfunc_x().
The heart of this logic cribbed from Leon Timmermans' Variable-OnDestruct.
See the code at:
https://metacpan.org/dist/Variable-OnDestruct/source/lib/Variable/OnDestruct.xs#L6-17
I am very grateful to him for his help on this. Any errors or omissions
in this code are my fault, not his.
|
|
|
|
|
|
| |
https://github.com/Perl/perl5/issues shows the list of open issues,
whereas https://github.com/Perl/perl5/issues/new/choose is where someone
can create a new ticket.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
_close() on an fd calls CloseHandle(), which is illegal if the fd
contains a socket handle.
We previously worked around this by having our own close(), which called
closesocket() before calling _close()
(e601c439adce167078ac7b49550c0418ace86f94).
Amusingly, the author of that solution thought it's just a temporary
workaround:
/*
* close RTL fd while respecting sockets
* added as temporary measure until PerlIO has real
* Win32 native layer
* -- BKS, 11-11-2000
*/
To make it thread-safe, we had to manipulate the internals of file
descriptors, which kept changing
(b47a847f6284f6f98ad7509cf77a4aeb802d8fce).
Unfortunately, the C runtime has been rewritten and it no longer exposes
them at all. We had to disable the thread-safety fix in Visual C++ 2015
builds (1f664ef5314fb6e438137c44c95cf5ecdbdb5e9b). It also wouldn't work
with MinGW configured to use UCRT.
This commit introduces a new solution: we inject a socket-aware version
of CloseHandle() into the C runtime library. Hopefully, this will be
less fragile.
This also fixes a few issues that the original solution didn't:
- Closing a busy pipe doesn't cause a deadlock (fixes #19963)
- _dup2 properly closes an overwritten socket (fixes #20920)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This exposes the "last successful pattern" as a variable that can be
printed, or used in patterns, or tested for definedness, etc. Many regex
magical variables relate to PL_curpm, which contains the last successful
match. We never exposed the *pattern* directly, although it was
implicitly available via the "empty pattern". With this patch it is
exposed explicitly. This means that if someone embeds a pattern as a
match operator it can then be accessed after the fact much like a qr//
variable would be.
@ether asked if we had this, and I had to say "no", which was a shame as
obviously the code involved isn't very complicated (the docs from this
patch are far larger than the code involved!). At the very least
this can be useful for debugging and probably testing. It can also
be useful to test if the /is/ a "last successful pattern", by checking
if the var is defined.
|