| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes this problem :
$ perl -le' sub foo($) { print "foo" }; foo $_, exit'
foo
$ perl -le' sub foo(\$) { print "foo" }; foo $_, exit'
Too many arguments for main::foo at -e line 1, at EOF
Execution of -e aborted due to compilation errors.
for all those prototypes:
*
\sigil
\[...]
;$
;*
;\sigil
;\[...]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When porting/makerel runs, all files copied into the directory for the
tarball have the executable bit stripped and then only a specific set of
files have the executable bit restored.
There are many files in the repo that have the executable bit set in the
repo that will be stripped. So that the state of files in the repo is
as close as possible to the state of files in the release tarball, the
executable bit has been stripped from such files.
In one recent case, a file added from a dual-life module needed the
executable bit set. Because it had the bit in the repo but was
not listed in makerel to get an executable bit, tests using it
passed in the repo and failed in the tarball.
This commit refactors the list into a new file, Porting/exec-bit.txt
and add tests to detect a mismatch between files listed there
and actual executable bits in the repo.
|
|
|
|
|
|
| |
Test that __PACKAGE__ propagates into string eval correctly. Test that
__LINE__ is correct. Test that goto into and out of package blocks
works correctly.
|
|
|
|
|
|
| |
OPs relating to the package name and version were subject to double
freeing during error recovery from an incomplete package block. Fixed by
using the op_latefree mechanism to shift the op free time.
|
|
|
|
|
|
| |
Package block syntax limits the scope of the package declaration to the
attached block. It's cleaner than requiring the declaration to come
inside the block.
|
|
|
|
|
|
|
| |
This reverts commit 1183a10042af0734ee65e252f15bd820b7bbe686.
Zefram asked me to revert this as he's going to be doing something more
pluggable
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some improvements to the deprecation added in commit
6fb472bab4fadd0ae2ca9624b74596afab4fb8cb:
- warning message includes the word "deprecated"
- warning is in "syntax" category as well as "deprecated"
- more systematic tests
- dot detected more efficiently by incorporation into existing switch
- small doc rewording
- avoid the warning in t/op/taint.t
|
|
|
|
|
|
|
|
| |
This reverts commit f71d6157c7933c0d3df645f0411d97d7e2b66b2f.
Revert "Add new error "Can't use keyword '%s' as a label""
This reverts commit 28ccebc469d90664106fcc1cb73d7321c4b60716.
|
|
|
|
|
| |
'.' needs to remain in @INC because the test also loads comp/hints.aux
at compile time too.
|
| |
|
| |
|
|
|
|
|
| |
The package VERSION syntax isn't strictly an op, but it needs to use several
features that aren't yet tested at the time that tests in t/comp are run.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Authors: John Peacock, David Golden and Zefram
The goal of this mega-patch is to enforce strict rules for version
numbers provided to 'package NAME VERSION' while formalizing the prior,
lax rules used for version object creation. Parsing for use() is
unchanged.
version.pm adds two globals, $STRICT and $LAX, containing regular
expressions that define the rules. There are two additional functions
-- version::is_strict and version::is_lax -- that test an argument
against these rules.
However, parsing of strings that might contain version numbers is done
in core via the Perl_scan_version function, which may be called during
compilation or may be called later when version objects are created by
Perl_new_version or Perl_upg_version.
A new helper function, Perl_prescan_version, has been added to validate
a string under either strict or lax rules. This is used in toke.c for
'package NAME VERSION' in strict mode and by Perl_scan_version in lax
mode. It matches the behavior of the verison.pm regular expressions,
but does not use them directly.
A new test file, comp/packagev.t, validates strict and lax behaviors of
'package NAME VERSION' and 'version->new(VERSION)' respectively and
verifies their behavior against the $STRICT and $LAX regular
expressions, as well. Validating these two implementation should help
ensure they each work as intended.
Other files and tests have been modified as necessary to support these
changes.
There is remaining work to be done in a few areas:
* documenting all changes in behavior and new functions
* determining proper treatment of "," as decimal separators in
various locales
* updating diagnostics for new error messages
* porting changes back to the version.pm distribution on CPAN,
including pure-Perl versions
|
|
|
|
|
| |
Unsurprisingly, the nature of the bug is that I accidentally changed
the logic of one of the several types of space skipping. Fix attached.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> If your perl has -Dmad, the following program crashes:
>
> $ bleadperl -we '$x="x" x 257; eval "for $x"'
> *** glibc detected *** bleadperl: double free or corruption (!prev): 0x0000000001dca670 ***
Change 6136c704 changed S_scan_ident from:
e = d + destlen - 3;
to:
register char * const e = d + destlen + 3;
where e is used to mark the end of the buffer, this meant that the
various buffer end checks allowed the various buffers supplied
S_scan_ident to overflow.
Attached is a fix, various tests with fencepost checks on different
identifier lengths, and the specific case mentioned in the ticket.
Tony
Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
|
| |
|
|
|
|
| |
This fixes [perl #70884] : use VERSION in BLOCK without semicolon -> syntax error
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tim Bunce wrote:
>The primary issue is the off-by-one error in the array indexing.
There's a bit more to it than that. The indexing was off-by-one for
*some* places that process a new line, but correct for others, so the
saved source as a whole was mangled rather than simply offset. Also,
there were some redundant calls to update_debugger_info(), so some lines
got saved twice, in some cases off-by-one for one saving and not for
the other. The saved source is, therefore, hopelessly broken in 5.11.2.
Attached patch fixes the source saving. Includes a new test, which works
through all reachable places that source lines get saved. This should
close RT #70804.
-zefram
|
|
|
|
| |
Aded details on the bug it fixes to the tests.
|
|
|
|
|
| |
(Updated by Jesse Vincent to put the test in comp rather than a new
toplevel test directory)
|
|
|
|
| |
become void context. Fixes problem with require not always being in scalar context.
|
| |
|
| |
|
| |
|
|
|
|
| |
Easier said than done.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Treat any (and all) octects after the BOM (or all, if there was no BOM) as
initial read data for the filter, and call it to convert them to the first
line, reading more if necessary. This correctly handles the "problem" that
UTF-16LE read as a line, on the assumption that it's ASCII/ISO-8859-*/UTF-8/etc
will be truncated after the first octect of the "\n\0" pair that is "\n"
encoded as UTF-16LE. This fixes bug #69678.
Read from the upstream filter in block mode, rather than line mode.
|
|
|
|
| |
Tests in t/comp/ are too early to rely on pragmata working.
|
|
|
|
| |
Tests in t/comp/ are too early to rely on pragmata working.
|
| |
|
|
|
|
| |
Removes the FAILED for test 22 on Win32.
|
| |
|
|
|
|
|
|
|
|
| |
And it's a good thing since the skip infrastructure was pulled
out from under us with 6b077bebea000af2a5477d50d7604bab33ee75c2.
The Win32 TODO probably still doesn't work and will need to be
implemented locally without the require of test.pl.
|
|
|
|
| |
Emit TAP directly.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ideally tests in t/comp wouldn't use require, as require isn't tested yet, but
this test really needs runperl(), and really wants to live in t/comp/hints.t,
so place it at the end, so that any catestrophic failure only fails the last
test. We don't use any other functionality of t/test.pl
This test uses hard-coded test numbers, but I'm not convinced that it would be
correct to re-write it to use an automatically incrementing counter, as that
wouldn't fail in an obvious fashion if some compile-time blocks ran out of
order. What we have *will* fail in an informative fashion if compile time
blocks do not run correctly.
|
|
|
|
| |
Emit TAP directly.
|
|
|
|
| |
Emit TAP directly.
|
|
|
|
| |
Emit TAP directly.
|
|
|
|
| |
Emit TAP directly.
|
|
|
|
| |
Emit TAP directly.
|
| |
|
|
|
|
| |
Emit TAP directly.
|
| |
|
| |
|