| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ebcfa0534 changed stat.t to avoid using TEST as the stat target, since
it is read by other test scripts. But with the initial stat() in the
BEGIN block perl is still reading the script for compilation, which
will update the access time. Since the system clock usually didn't
tick another second between the first and second stats, the test
usually succeeded, but occasionally the clock would tick, and the test
would fail.
Moved the stat() out of the BEGIN block to avoid that.
As a check I temporarily added a 2 second sleep after the initial
stat to ensure we didn't have a similar problem to that will
allowed this to pass most of the time.
|
| |
|
|
|
|
|
|
| |
lib/File/stat.t compares two stat calls on t/TEST against each
other, but other tests read t/TEST, modifying its access time,
causing rare random failures in stat.t in parallel tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds (?^...) to signify to use the default regex modifiers for the
cluster or embedded pattern-match modifier change. The major purpose of
this is to simplify regex stringification, so that "^" is output in
place of "-xism". As a result, the stringification will not change in
the future when new regex modifiers are added, so tests, etc. that rely
on a particular stringification will have to change now, but never
again.
Code that needs to work properly with both old- and new-style regexes
can use something like the following:
# Accept both old and new-style stringification
my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '^' : '-xism';
This construct is Ben Morrow's idea.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's was intended as a temporary namespace only, and we really don't want to
ship it in any release until we've figured out what it should really look like.
This reverts commit 05c0d6bbe3ec5cc9af99d105b8648ad02ed7cc95,
"add sv_reftype_len() and make sv_reftype() be a wrapper for it"
commit 792477b9c2e4c75cb03d07bd6d25dc7e1fdf448e,
"create the "mauve" temporary namespace for things like reftype"
commit 8df6b97c1de8326d50ac9c8cae4bf716393b45bb,
"mauve.t needs access to %Config, make sure it's available"
commit cfe9162d0d593cd12a979c73df82c7509b324343,
"use more efficient sv_reftype_len() interface"
and commit 47b13905e23c2a72acdde8bb4669e25e5eaefec4
"add more tests to lib/mauve.t so it tests also that mauve::reftype can return "LVALUE""
There's a `mauve' branch still containing all the code for the temporary mauve
namespace. That should be used to work on it until it's mostly ready to be
released, and only then merged to blead. Alternatively, it should be deleted if
another way to provide mauve's features in the core is found.
|
| |
|
| |
|
|
|
|
| |
[perl #76138].
|
|
|
|
|
| |
until this change code calling "warnings::register->import" was
confused by &warnings::register existing.
|
| |
|
| |
|
|
|
|
| |
Also regenerate lib/warnings.pm from that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. &warnings::register is added as the public mechanism for adding
new warning categories, rather than warnings::register::import
knowing about warnings's internals
2. warnings::register::import is updated to use &warnings::register
3. warnings::register::import can take a list of subcategories
The upshot is that you can now write:
package MyTool;
use warnings::register qw(io typos);
warnings::warnif('MyTool::io', $message);
...and tools that register new warnings categories do not need to cargo cult
code from warnings/register.pm
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This makes a qw(...) list literal a distinct token type for the
parser, where previously it was munged into a "(",THING,")" sequence.
The change means that qw(...) can't accidentally supply parens to parts
of the grammar that want real parens. Due to many bits of code taking
advantage of that by "foreach my $x qw(...) {}", this patch also includes
a hack to coerce qw(...) to the old-style parenthesised THING, emitting
a deprecation warning along the way.
|
|
|
|
|
|
|
| |
Commit 8f776eae73090661 turned out to be a bit optimistic with
"should be capable of running in parallel", as the temporary files and
modules written out by the various test scripts have clashing names.
Hence run each test a private subdirectory.
|
|
|
|
| |
This makes sure the fix for RT#74404 is working.
|
|
|
|
|
| |
This change is analogous to bc3707112523ba7a in Tie::Scalar, but with far fewer
tests.
|
| |
|
|
|
|
|
| |
Some literals (e.g. q'abc') don't set the UTF8 flag for pure ASCII literals.
Others (e.g. -abc) do. This should be consistent.
|
|
|
|
|
| |
Some literals (e.g. q'abc') don't set the UTF8 flag for pure ASCII literals.
Others (e.g. -abc) do. This should be consistent.
|
|
|
|
| |
return "LVALUE"
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Scalar::Util::reftype(), refaddr() and blessed() are all a bit
less useful than they could be as they all return C<undef> when
their argument is not a reference. While this is logical, it also
means that using these routines has to be guarded, and normally
guarded in such a way that the internal logic is called twice.
Additionally these routines are quite commonly used and having to
load an additional DLL and XS code every program is inefficient.
Therefore we introduce the "mauve" namespace for to hold the "fixed"
equivalents, this namespace is /always/ loaded (like the 're' or 'utf8'
namespaces), and thus these routines can be accessed easily at any time.
We also provide a new module wrapper in t/lib which allows these
routines to be exported into other namespaces if the user so chooses.
At Jesse's request I have included weaken() and as it seemed logical to
do so I have also added isweak().
Once we have a good name for the namespace we can s/mauve/whatever/g
|
|
|
|
|
|
|
|
|
|
| |
The first time mktables is run on a clean directory, mktables.lst is
non-existent. Rather than warn on this common occurrence, just assume
it is ok, and continue. The point of the warning was to point out a
potential problem. But it occurs so often that people have gotten
inured (habituated) to it, and it has lost all effectiveness. Better to
not output it, and have any problems show up as repeated rebuilds that
will annoy enough to be dealt with.
|
|
|
|
|
|
|
|
|
| |
As the unique() function is called with either a list of strings or a list of
objects, and all objects stringify to distinct values, there is no behaviour
difference between using object stringification and object address for a
"seen" hash. There is, however, an 8% run time difference :-)
Devel::NYTProf strikes again.
|
|
|
|
|
| |
This avoids repeating the lexical's name, whilst retaining the tight scope of
no overloading.
|
|
|
|
|
| |
Using pack 'J', $addr; instead of 0 + $addr; reduces run time by about 1%,
according to my benchmarking.
|
|
|
|
|
|
|
|
|
| |
In write(), don't concatenate all the lines to one scalar to print them, as
it takes fewer ops and less memory to pass print a list of values.
die if the print or close return errors, and don't print the success message
until the file is successfully closed.
Refactor make_property_test_script() to use write().
|
|
|
|
|
|
| |
In the inside-out object lookup code, strive for consistency, by always writing
0 + $ref with no spaces. No need to use 0+$ref as the arguments to == as it
will force numeric context.
|
|
|
|
|
| |
I never understood this comment until it bit me. Based on my new-found
experience, I've expanded it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[perl #76872] showed a case where code like the following, run under -d,
would cause $DB::sub to get set:
$tainted_expression && func()
The tainted expression sets PL_tainted, so calling func() under -d, which
sets $DB::sub, causes it to get tainted.
Consequently any further sub calls would set PL_tainted while getting the
old value of $DB::sub (and cause the new value to be tainted too), and if
the sub was XS, then its code would be executed with PL_tainted set.
It isn't an issue with perl subs as the first nextstate op resets
PL_tainted.
|
| |
|
|
|
|
|
| |
It hasn't seen many changes since 5.13.3, but it was changed slightly in the
docs, and cmpVERSION.pl kindly asked me to bump the verion even for that.
|
|
|
|
|
|
| |
22afb09b13a6dc17f20388991422fdbe6166e3ed
As is() doesn't stringify its arguments anymore we have to.
|
|
|
|
|
|
|
|
|
| |
Feature Changes
* is() and others will no longer stringify its arguments before
comparing. Overloaded objects will make use of their eq
overload rather than their "" overload. This can break tests of
impolitely string overloaded objects. DateTime prior to 0.54 is
the biggest example.
|
|
|
|
|
|
| |
If "use charnames ()" are the only usages of this pragma in a program,
it fails due to the pragma's import method not getting called. This
fixes that.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Actually, this tweaks the amount of testing of characters whose names are
algorithmically determinable, most of which are CJK characters.
This patch changes the testing to test not 1% of them, but to test 1 in
each block, no matter what the block size. We really don't need to test
many of these to be confident the algorithm is working.
It also adds some comments to clarify what happens if one tweaks the
block size.
|
|
|
|
| |
This is an important message. Better not to wrap it.
|
|
|
|
|
|
|
|
| |
Somehow an empty line got inserted at the end of the file, and got
interpreted as 0's which caused the test for NULL to fail. This guards
against that.
I removed the empty line, but I'm not sure git has picked that up.
|
|
|
|
| |
Don't calculate our own seed
|
| |
|
| |
|
|\
| |
| |
| |
| | |
Conflicts:
pod/perl5133delta.pod
|
| |
| |
| |
| |
| |
| |
| |
| | |
Now that charnames can handle algorithmically determinable character
names, change mktables to put all such into the algorithms it generates
for charnames to use. For historical reasons, they had been placed in
the large main table. This patch shortens that table by approximately
1000 names, which should speed up everything.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch causes \N{}, vianame, and viacode to know the names of all
Unicode code points. Previously the names that are algorithmically
determinable were not handled. These include the Hangul syllables and
many CJK characters.
It simply adds using the routines that mktables inserts into Name.pl
that handle these characters. mktables generates these algorithms from
data in the Unicode data base. The routines have been there since
11/2009 in anticipation of this change, but have been unused until now.
They probably have not been reviewed thoroughly.
The major change to this is the .t file. Now that all code points are
understood, the .t tests them all. But this would take too long each
time, so it tests a random sample. If there is a failure, the seed is
output so that the test can be reproduced. This idea came from Michael
Schwern, and is the same he uses in Test::Sims. Various parameters
about the sampling are easily adjustable.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I realized after the last commit that it might be faster to use a trie
when there are multiple scripts that a letter could be in, instead of
searching the table for each script. When there were 6 possible scripts
and the letter was found in the final one, the speed-up was a factor of
5. This also simplified things. The list of scripts can be stored as a
string like A|B|C instead of a stringified array, and the code just gets
simpler.
Also, there were complications to the code to keep from zapping the
input name, just in case it was needed for an error message. But I
realized that instead of using a shift to get the name, just copy it
from $_[0], and on the error leg that needs the original, it still is in
$_[0]. If a user-defined alias is to a character name to lookup and
that one is invalid, we want to output the invalid one, so a further
variable, $save_input is used to hold it
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The :short option which looks like "greek:letter" is just a special case
of the option where a list of possible scripts is set up in the pragma
call. In this case, greek is the single script to look up. It also
turns out that, contrary to the prior code, :short is effectively
mutually exclusive of checking through that list of scripts. That is,
"greek:letter" didn't match in the :short option, it won't match any
script option either because ':' is not a legal character in a name. So
there is no need to execute both. I refactored the code to do an if
then else because of this.
And they both use the same complicated regex that I may have to change
in future patches. So I refactored the code to use the same re
Finally, I added a goto to eliminate a test.
|
| |
| |
| |
| | |
It makes more sense to me in light of patches coming up.
|
| |
| |
| |
| | |
It was getting painful to have tabs, so change to expand them to blanks
|