| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
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!
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Make wording consistent
Foobar
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Remove the duplicate "the" introduced in 0de69e372d3baf843522c30d8711b6513c2a472b
|
| |
|
|
|
|
|
|
|
| |
- Specifically calls out the possible invocations
- Breaks out the specific use cases and why to use them
- Notes the things to avoid and why in clearer language
- Update .mailmap so that tests all pass
|
|
|
|
| |
Also removes a comment which is duplicated.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
As noted by Eugen Konkov in https://github.com/Perl/perl5/issues/20560.
|
|
|
|
| |
A brief note pointing people at the feature manpage.
|
|
|
|
| |
Note what happens if a fraction, and add markup.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nested BEGIN blocks can cause us to segfault by exhausting
the C stack. Eg:
perl -le'sub f { eval "BEGIN { f() }" } f()'
will segfault. This adds a new interpreter var PL_eval_begin_nest_depth
to keep track of how many layer of eval/BEGIN we have seen, and a new
reserved variable called ${^MAX_NESTED_EVAL_BEGIN_BLOCKS} which can be
used to raise or lower the limit. When set to 0 it blocks BEGIN entirely,
which might be useful from time to time.
This fixes https://github.com/Perl/perl5/issues/20176
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This env var can be used to trigger a repeatable run of a script which
calls C<srand()> with no arguments, either explicitly or implicitly
via use of C<rand()> prior to calling srand(). This is implemented in
such a way that calling C<srand()> with no arguments in forks or
subthreads (again explicitly or implicitly) will receive their own seed
but the seeds they receive will be repeatable.
This is intended for debugging and perl development performance testing,
and for running the test suite consistently. It is documented that the
exact seeds used to initialize the random state are unspecified, and
that they may change between releases or even builds. The only guarantee
provided is that the same perl executable will produce the same results
twice all other things being equal. In practice and in core testing we
do expect consistency, but adding the tightest set of restrictions on
our commitments seemed sensible.
The env var is ignored when perl is run setuid or setgid similarly to
the C<PERL_INTERNAL_RAND_SEED> env var.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If one needs to temporarily "capture" the output of C<print>, for example
as part of a unit test, the classic "obvious" approach has been to use
C<select> before and afterwards, to set a different default output handle
and the restore the previous handle.
If one is already in the mindset of C<select>, it might not be obvious
that C<local *STDOUT> is alternative way to achieve the underlying goal,
and might be clearer and more robust. Hence add it as a suggestion in the
C<select> documentation.
For: https://github.com/Perl/perl5/pull/19225; reconciling different
approaches developed by @nwc10 and @leonerd.
|
|
|
| |
The MODE argument was renamed to MASK in 5.6, but later verbiage was added that calls it MODE again. Change the reference to MASK for consistency.
|
|
|
|
|
|
|
| |
In particular the sticky bit may or may not be set by the system
mkdir() implementation.
Fixes #12082
|
|
|
|
| |
lost in the earlier reärrangement
|
| |
|
| |
|
|
|
|
| |
Also add more wording
|
| |
|
|
|
|
|
|
|
|
| |
The central doc change is in perlsec.pod. This not only explains
that you can build a perl that doesn't support taint,
but shows how you can check whether your perl supports taint or not.
The other doc changes are mainly to note that taint might not
be supported, and to refer the reader to perlsec for more details.
|
| |
|
| |
|
|
|
|
| |
rather than encoding.pm
|
|
|
|
|
|
|
| |
This reverts commit 8b03aeb95ab72abdb2fa40f2d1196ce42f34708d.
This is causing BBC breakage, and its unimport and grey zone enough that
we can pick it up in 5.37 when we have more time to deal with it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We produce all kinds of warnings if someone opens a scalar reference
that is undef. Prior to this we handled write operations ok, at
least in blead, but read operations would produce a plethora of
warnings. To me this analogous to treating an undef var as hash
and trying to read from it, we autovivify the undef var to be
a hash. So in this case we should just "autovivify" the referenced
scalar to be an empty string.
Eg. before this patch:
./perl -Ilib -wle'open my $fh,"+>", \(my $v); my @x=<$fh>; print 0+@x'
Use of uninitialized value $fh in <HANDLE> at -e line 1.
Use of uninitialized value $fh in <HANDLE> at -e line 1.
Use of uninitialized value $fh in <HANDLE> at -e line 1.
Use of uninitialized value $fh in <HANDLE> at -e line 1.
Use of uninitialized value $fh in <HANDLE> at -e line 1.
Use of uninitialized value $fh in <HANDLE> at -e line 1.
Use of uninitialized value $fh in <HANDLE> at -e line 1.
0
After it:
./perl -Ilib -wle'open my $fh,"+>", \(my $v); my @x=<$fh>; print 0+@x'
0
|
|
|
|
|
|
| |
GH #19344
Provide a sample for sort using function signature.
|
|
|
|
|
|
|
|
|
|
| |
This effectively reverts 3ece276e6c0.
It turns out this was a bad idea to make U mean the non-native official
Unicode code points. It may seem to make sense to do so, but broke
multiple CPAN modules which were using U the previous way.
This commit has no effect on ASCII-platform functioning.
|
| |
|
| |
|
| |
|
| |
|