| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This adds a new function to sv.c, sv_ref, which is a nul-and-UTF8
clean version of sv_reftype. pp_ref now uses that.
sv_ref() not only returns the SV, but also takes in an SV
to modify, so we can say both sv_ref(TARG, obj, TRUE); and
sv = sv_ref(NULL, obj, TRUE);
|
|
|
|
|
| |
Some tests in t/uni/bless.t are TODO, as ref() isn't
clean yet.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Not really useful yet, since named methods aren't correctly
flagged; that is to access a \x{30cb} method, you'd need
to do something like Obj->${\"\x{30cb}"}.
Committer’s note: I’m also including one piece of the ‘gv.c and
pp_ctl.c warnings’ patch so that the newly-added tests in this
commit pass.
|
| |
|
|
|
|
|
|
|
| |
Basically t/op/gv.t with UTF-8 names. A vast majority of
the tests currently fail and are marked as TODO; Minus for
failures related to prototypes, these will start working
in the following commits.
|
|
|
|
|
|
|
|
| |
newXS was merged into newXS_flags; added a line in the docs
recommeding using that instead.
newCONSTSUB got a _flags version, which generates the CV in
the right glob if passed the UTF-8 flag.
|
| |
|
|
|
|
|
|
|
|
| |
This causes podcheck to only analyze non-zero length files that we can
read and are plain files or symbolic links.
Perhaps symbolic links should be skipped as well. In the current blead,
experimenting with doing that made no difference.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Module::Build’s tests create a file named something like
cpan/Module-Build/MB-rrWnCs8O/Simple/bin/foo.PL
during testing, causing dual-life.t to fail when testing in
parallel.
This commit adds that to the list of exceptions, but since the
exact name can vary, it changes the exception list into a
regular expression.
|
|
|
|
|
|
|
|
|
|
|
| |
dual-life.t makes sure all dual-lifed scripts make their way into
utils/ during make.
ExtUtils::Install creates a test script in
dist/ExtUtils-Install/t/Big-Dummy/bin/program during testing.
dual-life.t should skip anything containing /t/, to avoid failing
erroneously.
|
| |
|
|
|
|
| |
I believe that the new wording is clearer than the older, which I wrote.
|
|
|
|
|
|
|
| |
The Unicode properties are defined only on Unicode code points. In the
past, this meant all property matches would fail for non-Unicode code
points. However, starting with 5.15.1 some properties do succeed. This
restores the previous behavior.
|
|
|
|
|
|
|
|
| |
Having PL_parser->error_count set to non-zero when utf8_heavy.pl tries
to do() one of its swashes results in ‘Compilation error’ being placed
in $@ during the do, even if it was successful. This patch sets the
error_count to 0 before calling SWASHNEW, to prevent that. It uses
SAVEI8, to make sure it is restored on scope exit.
|
|
|
|
|
|
|
|
|
| |
In Configure, check whether _NSGetExecutablePath() can be used to find the
absolute pathname of the executable. If so, set usensgetexecutablepath in
config.sh and USE_NSGETEXECUTABLEPATH in config.h. If this is set, then use
this approach in S_set_caret_X() to canonicalise $^X as an absolute
path. This approach works on OS X, and possible on other platforms that
use dyld.
|
|
|
|
|
|
|
|
|
|
| |
In Configure, check whether sysctl() and KERN_PROC_PATHNAME can be used
to find the absolute pathname of the executable. If so, set
usekernprocpathname in config.sh and USE_KERN_PROC_PATHNAME in config.h.
If this is set, then use this approach in S_set_caret_X() to canonicalise
$^X as an absolute path. This approach works on (at least) FreeBSD, and
doesn't rely on the /proc filesystem existing, or /proc/curproc/file being
present.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
16acebfd4bd4723d refactored parts of t/op/pwent.t and enabled warnings.
The refactoring was not the cause - the previous t/op/pwent.t code would
warn if run with -w.
On OS X (and presumably any other platform where the test processes the
output of /usr/bin/dscl), where a user does not have a real name, dscl does
not output a corresponding line, and as a result the test's processing code
had undef in a data structure. The implicit conversion of this to an empty
string was correct for the test to pass, but generates a warning when
warnings are enabled. Hence disable this specific warning for the minimal
scope where the conversion is wanted behaviour.
|
|
|
|
|
|
|
| |
As noted in the comments in the code for this commit, VMS builds
add a '.com' suffix to scripts and utilities and hence their names don't
match what is in podcheck's db. This canonicalizes such names
back to what the db is expecting.
|
| |
|
|
|
|
|
|
|
|
|
| |
This reverts most of commit df80274d3278c640a5e0fbf3982950bb5ca9d7bc
and uses a different method to exclude .PL files, suggested by Nicholas
Clark.
It uses the MANIFEST to find such files and then excludes them based on
the full path name.
|
|
|
|
|
| |
I think its clearer to put the subroutine call in each line of
initialization
|
|
|
|
|
| |
The only change is to move a block of code around. This is to prepare
for future commits
|
|
|
|
|
| |
This is to prepare for future commits, to avoid a warning message
about prototype checking
|
| |
|
| |
|
|
|
|
|
| |
Some test platforms don't like unexpected output without the comment
prefix character
|
|
|
|
|
|
|
|
| |
Add TAP generation and a --tap option to Porting/checkcfgvar.pl.
In checkcfgvar.t, document its purpose, and the likely way to fix the
problems that it has flagged up. This is a prototype before adding similar
instructions to the other t/porting tests.
|
|
|
|
|
|
| |
Previously it had custom code to change directory to the top of the source
tree, and to convert the library paths to absolute. TestInit has common code
for this.
|
|
|
|
|
| |
It's a croak(), not a warning, so doesn't really belong in lib/warnings.t
[This also implicitly fixes the wrong expected output of 69dc7e4bdb8e397c]
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This test was relying on a bug in require that causes it to use what-
ever I/O layers are active in require‘s *caller* when opening a file
[perl #96008].
This rewrites the test using the example in ticket #75722.
Since it no longer has anything to do with open.pm, it is now in
t/lib/warnings/perlio.
|
|
|
|
|
|
|
|
|
|
| |
This will probably not be used, but ought to be here for complete-
ness’ sake.
Method lookup needs to trigger the autovivification of coresubs.
Since it does not use gv_fetchpvn_flags, the coresub-autovification is
now in a separate static function, so that both standard gv lookup and
method lookup can share it.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
If a module whose upstream is cpan has the same NAME as a module that
isn't, that is a problem that should be warned about, as we shouldn't be
shipping two identically named modules, even if one is not under Perl
core's control. (If two cpan modules have the same name, it is a
problem as well, but not anything we can do anything about, so warn only
when cpan warnings are enabled.)
|
|
|
|
|
| |
In some situations previously, case was not important in the sort order;
this extends that to all situations.
|
| |
|
|
|
|
|
|
| |
This is in preparation for Unicode 6.1, which has blank lines in the
.txt file that fold_grind reads. The line that strips off comments did
not work on plain null lines.
|
|
|
|
|
|
|
| |
Commit f50383f58 made the ‘HeVAL(entry) = &PL_sv_placeholder;’ in the
hash-element-deletion code unconditional. In doing so, it put it
after the if/else statement containing the SvREFCNT_dec. So the freed
SV was visible in the hash to destructors called by SvREFCNT_dec.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When smartmatch is about to start, to avoid calling get-magic (e.g.,
FETCH methods) more than once, it copies any argument that has
get-magic.
Tainting uses get-magic to taint the expression. Calling mg_get(sv)
on a tainted scalar causes PL_tainted to be set, causing any scalars
modified by sv_setsv_flags to be tainted. That means that tainting
magic gets copied from one scalar to another.
So when smartmatch tries to copy the variable to avoid repeated calls
to magic, it still copies taint magic to the new variable.
For $scalar ~~ @array (or ~~ [...]), S_do_smartmatch calls itself
recursively for each element of @array, with $scalar (on the suppos-
edly non-magical copy of $scalar) on the left and the element on
the right.
In that recursive call, it again does the get-magic check and copies
the argument. Since the copied of a tainted variable on the LHS is
magical, it gets copied again. Since the first copy is a mortal
(marked TEMP) with a refcount of one, the second copy steal its
string buffer.
The outer call to S_do_smartmatch then proceeds with the second ele-
ment of @array, without realising that its copy of $scalar has lost
its string buffer and is now undefined.
So these produce incorrect results under -T (where $^X is ‘perl’):
$^X =~ ["whatever", undef] # matches
$^X =~ ["whatever", "perl"] # fails
This problem did not start occurring until this commit:
commit 8985fe98dcc5c0af2fadeac15dfbc13f553ee7fc
Author: David Mitchell <davem@iabyn.com>
Date: Thu Dec 30 10:32:44 2010 +0000
Better handling of magic methods freeing the SV
mg_get used to increase the refcount unconditionally, pushing it on to
the mortals stack. So the magical copy would have had a refcount of
2, preventing its string buffer from being stolen. Now it has a ref-
erence count of 1.
This commit solves it by adding a new parameter to S_do_smartmatch
telling it that the variable has already been copied and does not even
need to be checked. The $scalar~~@array case sets that parameter for
the recursive calls. That avoids the whole string-stealing problem
*and* avoids extra unnecessary SVs.
|
|
|
|
| |
to teach it
|
|
|
|
|
|
| |
t/TEST is usually a regular file, but not always. For example, if one is
building using a symlink forest (eg ./Configure -Dmksymlinks) then it will
be a symlink.
|
| |
|
| |
|
|
|
|
|
| |
When a link to a module is unknown, it is better to use the --add_link
option to podcheck.t and not the --regen option
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here is some suspicious code in Perl_my_lstat_flags:
if (SvROK(sv) && isGV_with_GP(SvRV(sv)) && ckWARN(WARN_IO)) {
Perl_warner(aTHX_ packWARN(WARN_IO), "Use of -l on filehandle %s",
GvENAME((const GV *)SvRV(sv)));
return (PL_laststatval = -1);
}
The behaviour differs depending on whether warnings are enabled.
That -1 turns into undef in pp_ftlink. So we get an undef return
value with warnings on, but a file test on a file name otherwise.
In 5.6.2, -l $foo always treated $foo as a file name.
In 5.8+, if it is a reference (ignoring magic) and the reference
points to a typeglob (ignoring magic) and io warnings are on, it warns
and returns undef.
So the only time that undef return is reached is when a warning has
been emitted, so it’s code that will likely be corrected before it
goes into production. Hence I think it unlikely that anyone could be
relying on the behaviour of -l \*foo (under warnings).
So this commit restores the 5.6 behaviour for that case.
|