Father Chrysostomos [Sun, 29 Jan 2012 03:14:39 +0000 (19:14 -0800)]
[perl #109264] ->method(my(...)) forcing lvalue cx
A simple my($foo,$bar) list is flagged as an lvalue:
$ ./perl -Ilib -MO=Concise -e 'my($foo,$bar)'
7 <@> leave[1 ref] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 1 -e:1) v:{ ->3
6 <@> list vKPM/128 ->7
3 <0> pushmark vM/128 ->4
4 <0> padsv[$foo:1,2] vM/LVINTRO ->5
5 <0> padsv[$bar:1,2] vM/LVINTRO ->6
-e syntax OK
That 128 that the list op is the same flag as LVINTRO.
When a method call is compiled, the list op for the argument list is
itself converted into an entersub op. That LVINTRO flag is never
turned off. So foo->bar(my($foo,$bar)) becomes this:
$ ./perl -Ilib -MO=Concise -e 'foo->bar(my($foo,$bar))'
9 <@> leave[1 ref] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 1 -e:1) v:{ ->3
8 <1> entersub[t4] vKMS/LVINTRO,TARG ->9
3 <0> pushmark sM/128 ->4
4 <$> const[PV "foo"] sM/BARE ->5
5 <0> padsv[$foo:1,2] lM/LVINTRO ->6
6 <0> padsv[$bar:1,2] lM/LVINTRO ->7
7 <$> method_named[PV "bar"] ->8
-e syntax OK
This was rarely a problem until commit
da1dff948 added lvalue check-
ing for method calls (a fifth bug fix in that commit not mentioned in
the commit message).
Calling the method will now result in ‘Can't modify non-lvalue subrou-
tine call’ unless the method has the :lvalue attribute.
Before that, this would only cause problems with lvalue methods:
$ perl -le '
sub clear_queue:lvalue { warn "called"; undef }
3==main->clear_queue(my ($id, $name))
'
called at -e line 2.
Can't return undef from lvalue subroutine at -e line 3.
Calling it with ($id, $name) was fine, and allowed undef to
be returned.
Perl_localize in op.c (which is called for my, our and local)
calls my() (aka Perl_my_attrs) on the list itself for my or our.
Perl_my_attrs was setting flags on the list, not just on its children.
So this commit modifies my_attrs not to set any flags on the list
op itself.
local() was not affected, as it goes through op_lvalue_flags instead
of my_attrs, and op_lvalue_flags doesn’t set flags on list ops (I
mean ops of type OP_LIST, not listops in general). I added tests for
it anyway.
Chris 'BinGOs' Williams [Sun, 29 Jan 2012 00:24:18 +0000 (00:24 +0000)]
Update IO-Compress to CPAN version 2.047
[DELTA]
2.047 28 January 2012
* Set minimum Perl version to 5.6
* IO::Compress::Zip
- In one-shot zip, set the Text Flag if "-T" thinks the file is a
text file.
- In one-shot mode, wrote mod time & access time in wrong order
in the "UT" extended field.
Chris 'BinGOs' Williams [Sun, 29 Jan 2012 00:01:04 +0000 (00:01 +0000)]
Update Compress-Raw-Zlib to CPAN version 2.047
[DELTA]
2.047 28 January 2012
* Allow flush to be called multiple times without any intermediate
call to deflate and still return Z_OK.
In the code below $status was Z_BUF_ERROR before this change.
$def->flush(...);
$status = $def->flush(...);
* Added support for zlibCompileFlags
* Set minimum Perl version to 5.6
Chris 'BinGOs' Williams [Sat, 28 Jan 2012 23:56:05 +0000 (23:56 +0000)]
Update Compress-Raw-Bzip2 to CPAN version 2.047
[DELTA]
2.047 28 January 2012
* Set minimum Perl version to 5.6
Craig A. Berry [Sat, 28 Jan 2012 23:05:35 +0000 (17:05 -0600)]
Trim directory extension in pathify under EFS.
When Extened Filename Syntax (EFS) is in effect,
1fe570cc5e24ee
changed the age-old behavior of trimming the directory extension
off a directory filename when the path is in Unix syntax. EFS
really has nothing to do with the necessity to trim .DIR;1 from
the name, so remove the conditional check for EFS from the
existing code.
This gets three more tests passing under EFS in vms/ext/filespec.t.
Yves Orton [Sat, 28 Jan 2012 23:06:23 +0000 (00:06 +0100)]
Fix bug #109206: ANCH_MBOL with while /.*/g
We had a fencepost error when ANCH_MBOL was enabled that meant we
did not "see" matches at the end of string. This fixes the problem
and adds tests.
Yves Orton [Sat, 28 Jan 2012 23:04:20 +0000 (00:04 +0100)]
accidentally used my work email for a commit so add it to checkAuthors.pl
Yves Orton [Sat, 28 Jan 2012 22:23:07 +0000 (23:23 +0100)]
fix variable not shared warnings coming from the use statement being executed too early
Father Chrysostomos [Sat, 28 Jan 2012 20:14:12 +0000 (12:14 -0800)]
Increase $subs::VERSION to 1.01
Father Chrysostomos [Sat, 28 Jan 2012 20:13:32 +0000 (12:13 -0800)]
checkAUTHORS.pl: Add another (old?) address for Juerd
Juerd Waalboer [Sat, 28 Jan 2012 20:11:17 +0000 (12:11 -0800)]
[perl #21396] documentation error in subs.pm
Craig A. Berry [Sat, 28 Jan 2012 16:55:55 +0000 (10:55 -0600)]
Adjust skip counts in t/op/filetest_t.t.
Follow-up to
8db8f6b697e6f, where new tests were added without
changing the (implicit) skip count of 1.
Craig A. Berry [Sat, 28 Jan 2012 15:22:04 +0000 (09:22 -0600)]
Restore directory extension and version in fileify under EFS.
In
df2786654 and
8a5aa89570, the traditional behavior of adding
the .DIR;1 onto a fileified directory spec was removed when
operating under Extended Filename Syntax. Various scary comments
were added about its being a bug to add a type and version onto
a Unix-style path, but actually the CRTL appears to be perfectly
happy with, for example:
stat('/foo/bar/baz.dir;1');
and without the extension, the home-grown rmdir() fails in the
case of a directory with no preceding path information. E.g.,
rmdir('foo');
was failing because there was no internal translation to foo.dir
before passing it to SYS$ERASE.
Moreover, even if there were something wrong with adding .DIR;1,
it has nothing to do with EFS.
Craig A. Berry [Sat, 28 Jan 2012 14:59:09 +0000 (08:59 -0600)]
filelify shouldn't always escape dots.
Follow-up to
a9fac63d75d9222a73fbf511ca58ae1d66cbf9a7. It turns
out that the CRTL doesn't handle the escapes when the path is in
Unix syntax (even though it requires them in native syntax).
stat('foo/bar.baz.dir;1')
is ok, but
stat('foo/bar^.baz.dir;1')
fails. So skip the escaping if there is a slash anywhere in the
path.
Steffen Mueller [Sat, 28 Jan 2012 11:49:49 +0000 (12:49 +0100)]
ExtUtils::ParseXS: Changelog, version bump for dev release
Upgrade the version in ExtUtils::ParseXS to 3.13_01 for a development
release.
H.Merijn Brand [Fri, 27 Jan 2012 15:09:31 +0000 (16:09 +0100)]
mymalloc isn't thread safe (rurban)
Rafael Garcia-Suarez [Fri, 27 Jan 2012 09:23:12 +0000 (10:23 +0100)]
Allow prototypes (_@) and (_%)
Those will be equivalent to (_;@) and (_;%) ; since perlsub already
states that the semicolon is redundant before @ and % this is in
line with the existing documentation.
Rafael Garcia-Suarez [Fri, 27 Jan 2012 08:59:54 +0000 (09:59 +0100)]
Show test names in output
Father Chrysostomos [Fri, 27 Jan 2012 06:29:42 +0000 (22:29 -0800)]
Make blead upstream for warnings.pm
This isn’t even a dual-life module. Why it has its own entry I don’t
know; but in any case it has to have blead for upstream, otherwise
cmp_version.t skips it.
Father Chrysostomos [Fri, 27 Jan 2012 04:45:28 +0000 (20:45 -0800)]
Increase $warnings::VERSION to 1.13
Father Chrysostomos [Fri, 27 Jan 2012 04:43:17 +0000 (20:43 -0800)]
Allow ${^WARNING_BITS} to turn off lexical warnings
Various magical modules copy hints from one scope to another. But
copying ${^WARNING_BITS} doesn’t always copy the same hints. If lexi-
cal warnings are not on at all, ${^WARNING_BITS} returns a different
value depending on the current value of $^W. Setting ${^WARNING_BITS}
to its own value when $^W is true will stop $^W from being able to
control the warnings in the current compilation scope. Setting
${^WARNING_BITS} to its own value when $^W is false causes even
default warnings to be suppressed.
This commit makes undef a special value that represents the default
state, in which $^W controls warnings.
Father Chrysostomos [Fri, 27 Jan 2012 00:31:53 +0000 (16:31 -0800)]
pat.t: Test that . overloading gets passed qr ref
This is something that my sample patch in ticked #108780 (for
fixing /foo$qr/ under ‘no overloading’) would have broken had it
been applied.
Rainer Tammer [Thu, 26 Jan 2012 17:35:08 +0000 (09:35 -0800)]
stat.t: Skip test when running as root
Nicholas Clark [Wed, 25 Jan 2012 14:30:05 +0000 (15:30 +0100)]
Bump $Unicode::UCD::VERSION after commit
c3e5bc54acca7110.
Andy Dougherty [Wed, 25 Jan 2012 13:53:07 +0000 (08:53 -0500)]
Update list of files for a minimal installation in INSTALL.
Update the minimal list of files for 5.15.7, and also for Debian's
perl-5.10.1 base package (which is what is in the Debian stable
distribution at present). These lists do not include any explicit advice
about what to name those stripped down installations.
Rafael Garcia-Suarez [Wed, 25 Jan 2012 11:45:25 +0000 (12:45 +0100)]
Correctly escape UTF-8 in hash keys in uninitialized warnings
Rafael Garcia-Suarez [Wed, 25 Jan 2012 11:34:17 +0000 (12:34 +0100)]
Initialize buffer to an empty string to avoid spurious uninitialized warnings
Chris 'BinGOs' Williams [Wed, 25 Jan 2012 11:06:04 +0000 (11:06 +0000)]
Update known_pod_issues.dat for x2p/psed
Chris 'BinGOs' Williams [Wed, 25 Jan 2012 10:59:28 +0000 (10:59 +0000)]
Fix pod error in Unicode::UCD
Chris 'BinGOs' Williams [Wed, 25 Jan 2012 09:39:20 +0000 (09:39 +0000)]
Update DB_File to CPAN version 1.826
[DELTA]
1.826 25 Jan 2012
* t/db-btree.t - fix use of "length @array"
[RT ##74336]
Chris 'BinGOs' Williams [Wed, 25 Jan 2012 09:30:27 +0000 (09:30 +0000)]
Revert "Regen known_pod_issues.dat"
This reverts commit
5fa409a90f64110c5708f7141b376e9bdc54fbe2.
Resolved by update of Pod-Parser to version 1.51
Chris 'BinGOs' Williams [Wed, 25 Jan 2012 09:26:18 +0000 (09:26 +0000)]
Update Pod-Parser to CPAN version 1.51
[DELTA]
25-Jan-2012 Marek Rouchal <marekr@cpan.org>
-----------------------------------------------------------------------------
Version 1.51
+ CPAN#74271: Pod::Parser should not flag L<text|hyperlink>
undo change CPAN#47473: L<alt text|URL> _is_ allowed (see discussion on
pod-people and p5p); confirmed by blead change; references:
http://code.activestate.com/lists/perl-pod-people/1690/
http://code.activestate.com/lists/perl-pod-people/1393/
http://perl5.git.perl.org/perl.git/commit/
f6e963e4dd62b8e3c01b31f4a4dd57e47e104997
+ bump all module versions (except Pod::PlainText) to 1.51
+ update META.yml (thanks rjbs for the hint)
Rafael Garcia-Suarez [Wed, 25 Jan 2012 10:41:13 +0000 (11:41 +0100)]
Make the display of the warning "Useless use of a constant (%s)" more robust
If the constant is a string (POK), we dump it using pv_pretty, to
properly escape non-printable characters. This also improves detection
of utf-8 encoding in the constant to be printed. Also, this patch
streamlines the tests for the type and value of that constant.
Potential backwards-compatibility issues : if the constant is a string
it will now be enclosed in double quotes, like this :
Useless use of a constant ("a") in void context
instead of
Useless use of a constant (a) in void context
Reini Urban [Tue, 12 Apr 2011 10:19:36 +0000 (12:19 +0200)]
CYG17 utf8 paths
Use cygwin_conv_path since cygwin-1.7 and support native utf-8 paths.
Chris 'BinGOs' Williams [Tue, 24 Jan 2012 22:46:59 +0000 (22:46 +0000)]
Update DB_File to CPAN version 1.825
[DELTA]
1.825 24 Jan 2012
* t/db-btree.t - fix use of "length @array"
[RT ##74336]
and [perl #108970]
Father Chrysostomos [Tue, 24 Jan 2012 20:33:49 +0000 (12:33 -0800)]
Increase $overload::VERSION to 1.18
Father Chrysostomos [Wed, 18 Jan 2012 21:03:32 +0000 (13:03 -0800)]
In overload::AddrRef, use ‘no overloading’
This speeds this up by about 13 times.
Father Chrysostomos [Tue, 24 Jan 2012 18:24:21 +0000 (10:24 -0800)]
[perl #108780] Make ‘no overloading’ work with qr//
Traditionally, overload::StrVal(qr//) has returned
Regexp=SCALAR(0xc0ffee), and later Regexp=REGEXP(0xc0c0a) when regexps
were made into first-class SVs.
When the overloading pragma was added in 5.10.1, qr// things were not
accounted for, so they would still stringify as (?-xism:) even with
‘no overloading’ (or as (?^:) under 5.14).
This commit makes the overloading pragma work with qr// things, so
that they stringify the same way as overload::StrVal; i.e., as
Regexp=REGEXP(0xbe600d).
Father Chrysostomos [Tue, 24 Jan 2012 17:46:11 +0000 (09:46 -0800)]
Move amagic hint checking to new function
so that stringification will be able to use it, too.
Father Chrysostomos [Tue, 24 Jan 2012 17:23:02 +0000 (09:23 -0800)]
Call FETCH once for stacked filetest ops
Reini Urban [Tue, 24 Jan 2012 15:30:47 +0000 (09:30 -0600)]
skip sigdispatch.t on cygwin RT#88814
Father Chrysostomos [Tue, 24 Jan 2012 07:36:29 +0000 (23:36 -0800)]
[perl #77388] Make stacked -t work
Up till now, -t was popping too much off the stack when stacked with
other filetest operators.
Since the special use of _ doesn’t apply to -t, we cannot simply have
it use _ when stacked, but instead we pass the argument down from the
previous op.
To facilitate this, the whole stacked mechanism has to change.
As before, in an expression like -r -w -x, -x and -w are flagged
as ‘stacking’ ops (followed by another filetest), and -w and -r are
flagged as stacked (preceded by another filetest).
Stacking filetest ops no longer return a false value to the next op
when a test fails, and stacked ops no longer check the truth of the
value on the stack to determine whether to return early (if it’s
false).
The argument to the first filetest is now passed from one op to
another. This is similar to the mechanism that overloaded objects
were already using. Now it applies to any argument.
Since it could be false, we cannot rely on the boolean value of the
stack item. So, stacking ops, when they return false, now traverse
the ->op_next pointers and find the op after the last stacked op.
That op is returned to the runloop. This short-circuiting is proba-
bly faster than calling every subsequent op (a separate function call
for each).
Filetest ops other than -t continue to use the last stat buffer when
stacked, so the argument on the stack is ignored.
But if the op is preceded by nothing other than -t (where preceded
means on the right, since the ops are evaluated right-to-left), it
*does* use the argument on the stack, since -t has not set the last
stat buffer.
The new OPpFT_AFTER_t flag indicates that a stacked op is preceded by
nothing other than -t.
In ‘-e -t foo’, the -e gets the flag, but not in ‘-e -t -r foo’,
because -r will have saved the stat buffer, so -e can just use that.
Father Chrysostomos [Tue, 24 Jan 2012 05:45:21 +0000 (21:45 -0800)]
[rt.cpan.org #74289] Don’t make *CORE::foo read-only
newATTRSUB requires the sub name to be passed to it wrapped up in
a const op.
Commit
8756617677dbd allowed it to accept a GV that way, since
S_maybe_add_coresub (in gv.c) needed to pass it an existing GV not in
the symbol table yet (to simplify code elsewhere).
This had the inadvertent side-effect of making the GV read-only, since
that’s what the check function for const ops does.
Even if we were to call this a feature, it wouldn’t make sense as
implemented, as GVs for non-ampable (&-able) subs like *CORE::chdir
were not being made read-only.
This commit adds a new flag to newATTRSUB, to allow a GV to be passed
as the o parameter, instead of an op. While this may look as though
it’s undoing the simplification in commit
8756617677dbd by adding
more code, the new code is still conceptually simpler and more
straightforward.
Since newATTRSUB is in the API, I had to add a new _flags variant.
(How did newATTRSUB get into the API to begin with?)
In adding a test, I also discovered that ‘used once’ warnings
were applying to these subs, which is obviously wrong. Commit
8756617677dbd caused that, too, as it was relying on the side-effect
of newATTRSUB doing a GV lookup.
This fixes that, too, by turning on the multi flag in
S_maybe_add_coresub.
Eric Brine [Tue, 24 Jan 2012 02:55:52 +0000 (18:55 -0800)]
Fix bad pointer size in has_trailing_nul
Ricardo Signes [Tue, 24 Jan 2012 02:50:11 +0000 (21:50 -0500)]
point git-using installers to pod/perlgit
...this change was promised to Jim Keenan
Ricardo Signes [Tue, 24 Jan 2012 02:27:35 +0000 (21:27 -0500)]
perldelta for ~~ fix
Leon Timmermans [Mon, 23 Jan 2012 01:01:00 +0000 (02:01 +0100)]
Enforce Any ~~ Object smartmatch precedence
Father Chrysostomos [Tue, 24 Jan 2012 02:13:55 +0000 (18:13 -0800)]
Increase $B::VERSION to 1.34
Reini Urban [Mon, 23 Jan 2012 18:52:02 +0000 (12:52 -0600)]
B.xs add missing B::COP::stashflags
Threaded perl added this field with 5.15.4 for utf8 stashes.
Reini Urban [Mon, 23 Jan 2012 18:10:05 +0000 (12:10 -0600)]
B.pm POD: revise
44f7f2d5b1 on IoFLAGS
IoFLAGS are not defined in perliol.h
Craig A. Berry [Sun, 22 Jan 2012 14:29:47 +0000 (08:29 -0600)]
More un-TODOs and two typos in vms/ext/filespec.t.
Two tests that actually pass under Extended Filename Syntax and
two that will now pass if we give them the correct expectations.
Craig A. Berry [Sun, 22 Jan 2012 14:03:26 +0000 (08:03 -0600)]
Handle directories with dots in fileify under EFS.
When Extended Filename Syntax (EFS) is in effect, it's legal for
directory names to contain dots that are not directory delimiters.
This commit escapes such dots when they are part of the file
portion of the fileified directory spec.
This gets two more of the vms/ext/filespec.t tests passing when
EFS is in effect.
Karl Williamson [Mon, 23 Jan 2012 18:19:51 +0000 (11:19 -0700)]
perlpodspec: Remove outdated text
This warning against using alternate text with hyperlinks is no longer
valid, See http://code.activestate.com/lists/perl-pod-people/1393/
And relevant changes:
https://github.com/theory/pod-simple/commit/
1e61e819debf9c7c23907d7bb9e37855665fd595
http://perl5.git.perl.org/perl.git/commit/
f6e963e4dd62b8e3c01b31f4a4dd57e47e104997
https://github.com/theory/test-pod/commit/
ae6a44894eda4fd09fb412d837efe543628cd7d6
Father Chrysostomos [Mon, 23 Jan 2012 06:58:58 +0000 (22:58 -0800)]
sv.c:sv_utf8_encode: simplify code
sv_force_normal already croaks for read-only variables
Father Chrysostomos [Mon, 23 Jan 2012 06:56:50 +0000 (22:56 -0800)]
universal.c:XS_utf8_decode: rmv redundant code
SvPV_force_nolen already calls sv_force_normal for us.
Father Chrysostomos [Mon, 23 Jan 2012 06:48:42 +0000 (22:48 -0800)]
Don’t allow read-only regexps to be tied
Since the test triggered another bug in freeing read-only
regexps, this commit fixes that too.
Karl Williamson [Mon, 23 Jan 2012 14:44:38 +0000 (07:44 -0700)]
perldelta: Rmv git relict line
This line was a result of clearing a rebasing conflict, and I failed to
remove it.
Father Chrysostomos [Mon, 23 Jan 2012 06:39:47 +0000 (22:39 -0800)]
sv_force_normal: Don’t confuse regexps with cows
Otherwise we get assertion failures and possibly corrupt
string tables.
Father Chrysostomos [Mon, 23 Jan 2012 06:20:36 +0000 (22:20 -0800)]
English.pm: Remove fallacious comment
Father Chrysostomos [Mon, 23 Jan 2012 06:20:00 +0000 (22:20 -0800)]
Increase $English::VERSION to 1.05
Father Chrysostomos [Sun, 22 Jan 2012 23:59:16 +0000 (15:59 -0800)]
[perl #108794] Call special blocks in void context
Now BEGIN blocks, etc., are called in void context, so the result of
evaluating the last statement is not wastefully copied.
Father Chrysostomos [Sun, 22 Jan 2012 22:07:04 +0000 (14:07 -0800)]
[rt.cpan.org #72767] Don’t propagate warnings into do-file
I completely forgot about do-file when, in commit
f45b078d2, I stopped
eval from localising hints at run time. The result was that warning
hints were propagating into do-file.
Chris 'BinGOs' Williams [Sun, 22 Jan 2012 21:43:23 +0000 (21:43 +0000)]
Regen known_pod_issues.dat
Chris 'BinGOs' Williams [Sun, 22 Jan 2012 20:07:04 +0000 (20:07 +0000)]
Update Pod-Parser to CPAN version 1.50
[DELTA]
16-Jan-2011 Marek Rouchal <marekr@cpan.org>
-----------------------------------------------------------------------------
Version 1.50
+ fix whitespace (esp. CR [\r] related) issues with different Perl versions
on Windows (with Perl 5.8.8 [Activestate], and 5.6.1 [SUA])
+ merge latest core (5.14.x) changes to this distro
+ CPAN#73446: fix minor POD error in InputObjects.pm
+ CPAN#43955: podchecker fails to detect superfluous =cut directive:
implemented (and extended by a check for superfluous =pod commands) and
documented in Pod::Checker; also added a note in the POD of all modules
that they are part of the Pod::Parser distribution
+ CPAN#46695: use consistent version (1.50) for distribution and all Pod::
modules in this distro (except for Pod::PlainText, which stays at 2.05)
+ CPAN#52086: mismatch between distro and module version:
same as above
+ CPAN#55121: correction for Pod::Find and t/pod/find.t on VMS
+ CPAN#47473: podchecker on L<> url with alt text
... causes an error in Pod::Checker now
+ CPAN#57954: Pod::Usage does not find perldoc when perl is relocatable
... use $Config{scriptdirexp} instead of scriptdir
+ CPAN#61223: podchecker notice missing blank line before command
implemented with more tests in poderrs.t and self test of all *.pms
+ CPAN#66614: parse of no final newline vs perl -w
... a rare case, but fixed nevertheless
+ CPAN#68157: Pod-Parser-1.38/lib/Pod/Usage.pm question/bug
... pass through formatting options to Pod::Text
+ CPAN#70771: mishandles symbolic links in @INC
... fixed by making the paths in @INC absolute, using Cwd::abs_path()
+ CPAN#71139: 3 possible optimisations
... applied
+ several other rt.cpan.org tickets processed and closed
Chris 'BinGOs' Williams [Sun, 22 Jan 2012 19:40:58 +0000 (19:40 +0000)]
Sync Module-CoreList version in Maintainers.pl
Karl Williamson [Sat, 21 Jan 2012 16:29:01 +0000 (09:29 -0700)]
perllocale: Correct various Perl version references
Spotted by Nicholas Clark
Karl Williamson [Wed, 18 Jan 2012 19:28:21 +0000 (12:28 -0700)]
locale.t: White-space, comment only
This tidies up the white space to reflect a previous commit which added
and subtracted blocks, and reflows to fit in an 80 column window,
removes trailing white space, and rewords a comment.
s
Karl Williamson [Wed, 18 Jan 2012 16:35:52 +0000 (09:35 -0700)]
Add :not_characters parameter to 'use locale'
This adds the parameter handling, tests, and documentation for this new
feature which allows locale and Unicode to play well with each other.
Karl Williamson [Wed, 18 Jan 2012 18:26:24 +0000 (11:26 -0700)]
locale.t: Don't bother testing locales with malformed names
Instead, just fail those.
Karl Williamson [Wed, 18 Jan 2012 18:18:57 +0000 (11:18 -0700)]
locale.t: remove unused debug stuff
Karl Williamson [Wed, 18 Jan 2012 17:57:44 +0000 (10:57 -0700)]
perluniintro: Shorten too-long verbatim lines
Karl Williamson [Wed, 18 Jan 2012 17:38:53 +0000 (10:38 -0700)]
perllocale: Remove trailing blanks
Karl Williamson [Wed, 18 Jan 2012 16:35:07 +0000 (09:35 -0700)]
locale.pm: Pod tweaks
Karl Williamson [Mon, 16 Jan 2012 22:21:38 +0000 (15:21 -0700)]
regexp.h: Update comment
Karl Williamson [Mon, 16 Jan 2012 22:18:05 +0000 (15:18 -0700)]
perllocale: Add caveat on UTF-8 locales
It turns out that the C library may not handle UTF-8 locales properly,
and the docs should mention that instead of blindly encouraging their
use.
Karl Williamson [Mon, 16 Jan 2012 22:13:11 +0000 (15:13 -0700)]
op.c: Call macro instead of using explicit bit
The macro hides the bit name.
Karl Williamson [Mon, 16 Jan 2012 20:55:09 +0000 (13:55 -0700)]
locale.t: In-line function to its only call
This will be needed in future commits
Karl Williamson [Mon, 16 Jan 2012 20:54:25 +0000 (13:54 -0700)]
locale.t: White-space, comment-only changes
To catch up with previous changes.
Karl Williamson [Mon, 16 Jan 2012 20:32:03 +0000 (13:32 -0700)]
locale.t: Add names for some tests
Karl Williamson [Mon, 16 Jan 2012 20:14:11 +0000 (13:14 -0700)]
locale.t: Don't use hard-coded test numbers
This was rather painful to convert the hard-coded numbers into
calculated ones so that tests could be added and subtracted. The debug
statements were moved to after the last test they described so the test
numbers would be calculated, and a new hash created to deal with
skipping tests and not knowing how many are skipped; otherwise the
current test number is kept track of and incremented as needed.
Karl Williamson [Mon, 16 Jan 2012 19:53:35 +0000 (12:53 -0700)]
localet.t: Change variable name
to avoid the ambiguity of 'last'
Karl Williamson [Mon, 16 Jan 2012 19:51:13 +0000 (12:51 -0700)]
locale.t: croak isn't loaded
so use die instead
Karl Williamson [Mon, 16 Jan 2012 19:40:17 +0000 (12:40 -0700)]
locale.t: Revise tests
As indicated in the comment, the earlier incarnation of this commented
out "no locale" thus defeating the purpose of the tests.
Karl Williamson [Mon, 16 Jan 2012 00:30:55 +0000 (17:30 -0700)]
locale.t: Comments, white-space only
Karl Williamson [Mon, 16 Jan 2012 00:16:53 +0000 (17:16 -0700)]
locale.t: Remove unset variables.
These were currently useless.
Karl Williamson [Mon, 16 Jan 2012 00:12:47 +0000 (17:12 -0700)]
locale.t: Calculate locale values AFTER setting the locale
This test was using the previous loop iteration's locale's values, since
it did the set after calculating them.
Karl Williamson [Mon, 16 Jan 2012 00:10:35 +0000 (17:10 -0700)]
locale.t: Don't test a locale twice
Don't add it to the list if already there.
Karl Williamson [Sun, 15 Jan 2012 18:21:25 +0000 (11:21 -0700)]
locale.t: Remove hard-coded test number
The subroutine with the hard-coded value used to forward reference the
number of tests is no longer needed, as this and previous commits move
the place where the number is needed to afterwards.
Karl Williamson [Sun, 15 Jan 2012 18:16:57 +0000 (11:16 -0700)]
locale.t: Move test plan to end
The current code goes through a lot of machinations to know
1..n
at the beginning. Nowadays, one can simply calculate this as we go
along and print it out at the end. If the test fails in the middle, the
lack of a plan will be marked as a failure.
Karl Williamson [Sun, 15 Jan 2012 17:53:42 +0000 (10:53 -0700)]
locale.t: Remove test numbers from calls
This continues the process of converting this .t to not have hard-coded
test numbers, making it easier to add/remove tests.
Karl Williamson [Sun, 15 Jan 2012 17:40:43 +0000 (10:40 -0700)]
locale.t: Start removing hard-coded test numbers
This .t uses it's own TAP output. I presume to avoid any issues with
tainting. This commit starts the process of making it easier to add
tests by having the ok() routine keep track of test numbers.
Craig A. Berry [Sat, 21 Jan 2012 03:29:08 +0000 (21:29 -0600)]
Restore triple-dot directory spec tests in vms/ext/filespec.t.
1fe570cc5e24eecfb07059e53e95fa864bb44142 declared directory
components containing '...' as either 'not translatable' or created
the expectation that each dot should be individually escaped when
translating between Unix and VMS directory specs. That doesn't
really make sense since in both formats it means any number of
intervening directories, plus there was already code of long
standing that handles it. So get the tests in this regard back
in line with reality.
Craig A. Berry [Sat, 21 Jan 2012 00:04:20 +0000 (18:04 -0600)]
Start rationalizing Unix-to-VMS file spec conversion code.
Back in
360732b5267d5dfef32b932bf13ceebc6683df74, we started using
an experimental new conversion routine that had been designed for
a CRTL feature called POSIX-compliant pathnames but at this point
was added as a jumping-off place halfway through the existing code
for converting Unix-format file specifications to VMS format. But
only for newer versions of VMS and only when a different and
unrelated feature called Extended Filename Syntax (EFS) had been
enabled.
But this newer implementation (somewhat inauspiciously named
posix_to_vmsspec_hardway) is less complete and more buggy than the
older implementation, and it imposes expectations that have nothing
to do with EFS, not to mention making for a larger, version-
specific support matrix.
So for now go back to the older, better-tested (though imperfect)
version and simplify the differences made by invoking EFS. None
of this makes any difference at all unless non-default CRTL
features have been enabled.
Craig A. Berry [Fri, 20 Jan 2012 23:19:43 +0000 (17:19 -0600)]
VMS-specific symlink tweak for stat.t
If the target of a symlink has a version number in the symlink,
that makes the symlink implementation unable to locate it, so
trim off the version.
Father Chrysostomos [Fri, 20 Jan 2012 21:29:38 +0000 (13:29 -0800)]
[perl #82772] utf8::decode: Don’t read past SvCUR
Father Chrysostomos [Fri, 20 Jan 2012 21:12:14 +0000 (13:12 -0800)]
Warn for stat(*unopened) after statting file
Statting an existing file used to prevent a subsequent stat(*unopened)
from warning if the GV happened to have no IO. If the GV *did* have
an IO, but an unopened one, it *would* warn.
This inconsistency was introduced in 5.10.0 with commit
5228a96c60
(which was also backported to 5.8.9).
Father Chrysostomos [Fri, 20 Jan 2012 20:59:35 +0000 (12:59 -0800)]
pp_sys.c:pp_stat: Change scope of havefp var
This is only used in the if(gv != PL_defgv) block now. Also, it was
being used uninitialized for bad iorefs, probably resulting in random warning suppression (untested).
Father Chrysostomos [Fri, 20 Jan 2012 20:55:17 +0000 (12:55 -0800)]
[perl #71002] stat() on unopened fh _
stat _ was producing an erroneous warning about an unopened filehandle
with _. But _ isn’t a real filehandle and is special-cased, so it
shouldn’t warn.
See also commit
8080e3c8.
Karl Williamson [Fri, 20 Jan 2012 21:55:43 +0000 (14:55 -0700)]
Safe.pm: Make sure SWASHNEW is properly loaded
This module was depending on testing code points in the upper Latin1
range causing utf8_heavy.pl. However a recent performance improvement
caused those code points to skip the loading. This just changes the
code points to two higher values that cause it to load, and until and if
it changes again, will fix things.
Chris 'BinGOs' Williams [Fri, 20 Jan 2012 21:26:09 +0000 (21:26 +0000)]
Create a perldelta for 5.15.8