This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Nicholas Clark [Fri, 11 Mar 2011 11:37:07 +0000 (11:37 +0000)]
Refactor die_exit.t to loop over a list, rather than iterate on an hash.
Nicholas Clark [Fri, 11 Mar 2011 11:29:23 +0000 (11:29 +0000)]
Convert t/op/die_exit.t to test.pl
Karl Williamson [Fri, 11 Mar 2011 02:52:55 +0000 (19:52 -0700)]
regexec.c: Use equivalent macro instead of code
Recent simplification of this code left it to be the equivalent
of an existing macro
Father Chrysostomos [Fri, 11 Mar 2011 00:47:04 +0000 (16:47 -0800)]
Correct the U<...> link in perlfaq4
Father Chrysostomos [Fri, 11 Mar 2011 00:41:39 +0000 (16:41 -0800)]
Merge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead
Florian Ragwitz [Fri, 11 Mar 2011 00:23:28 +0000 (01:23 +0100)]
The "Send a CC" checkbox on PAUSE is gone
Update the release-manager's guide accordingly.
brian d foy [Thu, 10 Mar 2011 22:50:45 +0000 (16:50 -0600)]
Update link to "What Every Computer Scientist Should Know About Floating-Point Arithmetic"
Karl Williamson [Thu, 10 Mar 2011 15:22:00 +0000 (08:22 -0700)]
regexec.c: Add assert() to detect inconsistent ANYOF
There have been various segfaults apparently due to trying to access
the swash (and allies) portion of an ANYOF which doesn't have that.
This doesn't show up on all platforms. The assert() should detect
this and help debugging
Karl Williamson [Thu, 10 Mar 2011 15:17:05 +0000 (08:17 -0700)]
regexec.c: Fix precedence
Commit
ac51e94be5daabecdeb0ed734f3ccc059b7b77e3 didn't
do what it purported, because it omitted parentheses that
were necessary to change the natural precedence. It's strange that
it passed all tests on my machine, and failed so miserably elsewhere
that it was quickly reverted by commit
63c0bfd59562325fed2ac5a90088ed40960ac2ad.
This reinstates it with the correct precedence. The next commit
will add an assert() so that the underlying issue will be detected
on all platforms
Karl Williamson [Thu, 10 Mar 2011 15:58:34 +0000 (08:58 -0700)]
regcomp.c: call regclass_swash() only if non-empty
We can tell if there is something outside the bitmap and so
can short circuit calling this function if there isn't.
David Mitchell [Thu, 10 Mar 2011 14:42:20 +0000 (14:42 +0000)]
Revert "regexec.c: don't try accessing non-bitmap if doesn't exist"
This reverts commit
ac51e94be5daabecdeb0ed734f3ccc059b7b77e3.
This commit made many of the re/*.t tests fail, on my build at least.
Haven't looked at why, just reverting it for the moment.
Florian Ragwitz [Thu, 10 Mar 2011 13:53:25 +0000 (14:53 +0100)]
CPAN is upstream for Scalar-List-Utils
As confirmed by Graham.
Karl Williamson [Thu, 10 Mar 2011 04:28:35 +0000 (21:28 -0700)]
regexec.c: don't try accessing non-bitmap if doesn't exist
ANYOF_NONBITMAP is supposed to be set iff there is something outside
the bitmap to try matching in an ANYOF node. Due to slight changes in
the meaning of this, the code has been trying to access this
if ANYOF_NONBITMAP_NON_UTF8 is set without ANYOF_NONBITMAP being set,
which means it was trying to access something that doesn't exist.
I'm hopeful, based on a stack trace sent to me that this is the cause
of [perl #85478], but can't reproduce that easily. But the logic
is clearly wrong.
Karl Williamson [Thu, 10 Mar 2011 02:08:48 +0000 (19:08 -0700)]
installperl: Don't install unnecessary unicore/*.txt
This removes from installation certain .txt files in unicore that
are no longer needed for execution by Unicode::UCD, since commit
05dbc6f80f8f2d5774f53874803f5a20450bbe82
Father Chrysostomos [Thu, 10 Mar 2011 01:47:33 +0000 (17:47 -0800)]
perlfunc/pos: Mention the zero-len flag
Father Chrysostomos [Wed, 9 Mar 2011 20:58:03 +0000 (12:58 -0800)]
perlre clean-up
Mostly typos, grammatical errors and factual errors (mostly due to
bitrot), but also:
• The section explaining how to work around the lack of look behind
obviously has not been relevant for years. :-)
• Since we have relative backreferences, we might as well use them in
the explanation of the (?>...) construct.
• Note that it’s possible to backtrack *past* (?>...), but
not into it.
• (?:non-zero-length|zero-length)* is *not* equivalent to nzl*|zl? as
"aaaaab" =~ /(?:a|(?{print "hello"})(?=(b)))*/ demonstrates.
• The custom re engine section doesn’t mention custom re engines. :-)
David Leadbeater [Wed, 9 Mar 2011 20:48:54 +0000 (20:48 +0000)]
Florian Ragwitz [Wed, 9 Mar 2011 20:53:56 +0000 (21:53 +0100)]
Have git-deltatool list the commit's author
Some authors are more likely to include delta entries in their commits than
others. Knowing who wrote a commit at a glance when reviewing it is helpful.
Arvan [Wed, 9 Mar 2011 19:35:48 +0000 (11:35 -0800)]
[perl #85738] cc deprecated option warnings on solaris 10 sparc 64-bit
When building on Solaris 10 multiple warnings are produced saying:
Warning: -xarch=generic64 is deprecated, use -m64 to create 64-bit
programs
This is because the config script hints/solaris_2.sh uses the values
returned by getconf which are incorrect for newer versions of Sun's
compiler. I believe they are correct for earlier versions, but do not
have a system to test this on. This change to solaris_2.sh checks
that the compiler produces this warning, and if so updates the flags
to the correct values.
Father Chrysostomos [Wed, 9 Mar 2011 19:34:04 +0000 (11:34 -0800)]
Add Arvan to AUTHORS
Florian Ragwitz [Wed, 9 Mar 2011 20:17:08 +0000 (21:17 +0100)]
A couple of perldelta updates
It's still far from being complete :-/
Chris 'BinGOs' Williams [Wed, 9 Mar 2011 14:45:15 +0000 (14:45 +0000)]
Update Digest-SHA to CPAN version 5.61
5.61 Wed Mar 9 05:26:36 MST 2011
- corrected bug in 'algorithm' method
- fixed -x option in Makefile.PL
-- not often used since it deliberately excludes
all 64-bit SHA transforms
- addressed minor documentation oversights
Craig A. Berry [Wed, 9 Mar 2011 13:14:41 +0000 (07:14 -0600)]
Remove DECCRTL_SOCKETS from PL_bincompat_options.
The socket libraries provided by the C run-time have been the
only viable option for building sockets in Perl for many years,
so we don't need to take up a valuable slot in the options list
to record that we're using them.
Also, the new bincompat.t test requires options to be in alpha-
betical order, and this wasn't.
David Leadbeater [Wed, 9 Mar 2011 00:48:24 +0000 (16:48 -0800)]
In fold_grind.t only report OK for each charset/target combination
This brings the number of tests down significantly and due to the
reduced amount of printing the runtime too. Failing tests are still
reported and a complete run can be enabled by setting
$ENV{PERL_DEBUG_FULL_TEST} to a true value.
Karl Williamson [Wed, 9 Mar 2011 06:19:16 +0000 (23:19 -0700)]
regcomp.c: Rmv unused parameter
This silences a compiler warning
Karl Williamson [Wed, 9 Mar 2011 06:14:45 +0000 (23:14 -0700)]
re/pat.t: Remove TODO message on passing tests
A previous commit fixed these.
Karl Williamson [Wed, 9 Mar 2011 06:13:59 +0000 (23:13 -0700)]
regcomp.c: Rmv unused parameter
This silences a compiler warning
Karl Williamson [Wed, 9 Mar 2011 06:08:16 +0000 (23:08 -0700)]
regcomp.c: Rmv unused parameter
This silences a compiler warning
Karl Williamson [Wed, 9 Mar 2011 05:56:02 +0000 (22:56 -0700)]
PATCH: [perl #85528], add initialization
Commit
137165a601b852a9679983cdfe8d35be29f0939c omitted
required initialization for the synthetic start class. Adding it
exposed other bugs in cl_and() and cl_or(), which have been fixed
by a previous commit.
Karl Williamson [Wed, 9 Mar 2011 05:35:36 +0000 (22:35 -0700)]
regcomp.c: revamp cl_and() and cl_or()
These two routines have not kept pace with the changes in the ANYOF
flags. And, I believe there were issues even before them. I did a
systematic re-thinking of what their behaviors should be.
Karl Williamson [Wed, 9 Mar 2011 04:57:24 +0000 (21:57 -0700)]
regcomp.h: #define of ANYOF flags immune from inversion
Karl Williamson [Wed, 9 Mar 2011 00:06:47 +0000 (17:06 -0700)]
regex: /l in combo with others in syn start class
Now that regexes can be combinations of different charset modifiers,
a synthetic start class can match locale and non-locale both. locale
should generally match only things in the bitmap for code points < 256.
But a synthetic start class with a non-locale component can match such
code points. This patch makes an exception for synthetic nodes that
will be resolved if it passes and is matched again for real.
Karl Williamson [Tue, 8 Mar 2011 23:30:00 +0000 (16:30 -0700)]
regcomp.c: UTF /l should not use tries
It's unclear if tries will work under /l. I haven't seen any failures,
but there have been under /d. As a precaution, until more testing is
done, disable tries under anything but /u and UTF.
Karl Williamson [Tue, 8 Mar 2011 23:20:52 +0000 (16:20 -0700)]
regcomp.c: Merge identical functions
These two functions now have identical code, so merge them, but use
a macro in case they ever need to diverge again.
Karl Williamson [Tue, 8 Mar 2011 22:28:05 +0000 (15:28 -0700)]
regcomp.c: Change start class init for /l
Before /l was added, locale only applied to regular expressions as a
whole. Now it can be subsections, so the flag for allowing it
should be treated as any other flag.
Karl Williamson [Tue, 8 Mar 2011 22:25:27 +0000 (15:25 -0700)]
regcomp.c: clarify comments
Karl Williamson [Sun, 6 Mar 2011 16:00:52 +0000 (09:00 -0700)]
regcomp.c: Move #defines to be be in bit order
Tony Cook [Wed, 9 Mar 2011 03:44:25 +0000 (14:44 +1100)]
fix C++ build error introducted in
f8088870
Craig A. Berry [Wed, 9 Mar 2011 03:31:54 +0000 (21:31 -0600)]
taint.t broken by refactoring
Somewhere in the fifteen! commits to taint.t in the last couple of
weeks, the truth got lost. Literally. Instead of testing for
falsehood, we were testing for equivalence to empty string. What
we actually get is undef, so test for that.
Nicholas Clark [Tue, 8 Mar 2011 20:14:11 +0000 (20:14 +0000)]
Add PERL_NO_GET_CONTEXT to NamedCapture.xs
Nicholas Clark [Tue, 8 Mar 2011 20:01:46 +0000 (20:01 +0000)]
Tweak Tie::Hash::NamedCapture's BOOT code - get the stash from the CV.
This will result in less work than using newSVrv(), as the character string
passed to that is used to walk the symbol table to find the stash. We already
have a fast way to get to the stash - via the CV's GV. So use that directly.
Chris 'BinGOs' Williams [Tue, 8 Mar 2011 21:27:37 +0000 (21:27 +0000)]
Update parent to CPAN version 0.225
[DELTA]
0.225
20110308
. Applied a docpatch by Robin Barker to fix the documentation
about the warning of inheriting from yourself.
Fixes RT #66459
Father Chrysostomos [Tue, 8 Mar 2011 20:01:44 +0000 (12:01 -0800)]
Mention when reflags was added
Father Chrysostomos [Tue, 8 Mar 2011 06:53:18 +0000 (22:53 -0800)]
Another typo in perlretut
Father Chrysostomos [Tue, 8 Mar 2011 06:49:03 +0000 (22:49 -0800)]
mention reflags in perlretut
Father Chrysostomos [Tue, 8 Mar 2011 06:45:35 +0000 (22:45 -0800)]
Even more perlretut tweaks
Nicholas Clark [Tue, 8 Mar 2011 18:43:41 +0000 (18:43 +0000)]
In reg_namedcapture.t, don't test for Errno, as the miniperl skip covers this.
The original reason for adding the test for Errno was because of a report of
tests failing under minitest:
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2008-03/msg00467.html
Nicholas Clark [Tue, 8 Mar 2011 17:33:39 +0000 (17:33 +0000)]
In Tie::Hash::NamedCapture move the tie of %+ and %- from perl to XS.
Nicholas Clark [Tue, 8 Mar 2011 16:46:36 +0000 (16:46 +0000)]
Convert Tie::Hash::NamedCapture::TIEHASH to XS.
Nicholas Clark [Tue, 8 Mar 2011 15:28:37 +0000 (15:28 +0000)]
Add tests for documented behaviour of Tie::Hash::NamedCapture::TIEHASH.
Chris 'BinGOs' Williams [Tue, 8 Mar 2011 15:22:03 +0000 (15:22 +0000)]
Update JSON-PP to CPAN version 2.27105
[DELTA]
2.27105 Tue Mar 8 12:38:42 2011
- removed t/900_pod.t from package because of author test
Merely a version bump
Craig A. Berry [Tue, 8 Mar 2011 13:23:49 +0000 (07:23 -0600)]
Check for threads before multiplicity in configure.com.
3b28d668e9efe9433c3099521167a6723cbddc26 depended on command-line
specification of usethreads, which of course may not be there.
Nicholas Clark [Tue, 8 Mar 2011 11:25:34 +0000 (11:25 +0000)]
In test.pl, use block eval instead of string eval for requiring modules.
The failure we're protecting against is runtime, rather than compile time.
Nicholas Clark [Tue, 8 Mar 2011 10:46:14 +0000 (10:46 +0000)]
Refactor skip_all_without_config() to take a list of config options to test.
Previously it took a second argument as a reason to show in the skip_all
message, if the config option was not set. However, no callers were using it,
so remove it. This allows skip_all_without_config() to take a list of keys
to test, which is useful to two of its callers.
Nicholas Clark [Tue, 8 Mar 2011 10:31:32 +0000 (10:31 +0000)]
Simplify the logic in t/thread_it.pl, as the callers' filenames are uniform.
VMS invokes TEST with Unix-style filenames, so using / as a separator inside
t/thread_it.pl should not pose a portability problem. ':' is irrelevant now
that MacOS Classic is very "special biologist word".
Nicholas Clark [Tue, 8 Mar 2011 09:56:48 +0000 (09:56 +0000)]
4f890a3067e1198f missed qr// from t/re/pat.t in its refactoring in two places.
like($@, /A pattern/, "Description") is going to compare $@ with the
*result* of matching $_ against that pattern, not that pattern.
Nicholas Clark [Tue, 8 Mar 2011 09:33:21 +0000 (09:33 +0000)]
Nothing uses $ENV{PERL_CORE_MINITEST} any more, so don't set it in t/TEST
Nicholas Clark [Tue, 8 Mar 2011 09:02:31 +0000 (09:02 +0000)]
Move the special-case logic for $qr_embed_thr to regexp_qr_embed_thr.t
t/re/regexp_qr_embed_thr.t is the only place that sets $::qr_embed_thr, so move
the special-case startup logic related to it from t/re/regexp.t to
t/re/regexp_qr_embed_thr.t. Use the skip_all_*() functions from test.pl
Nicholas Clark [Tue, 8 Mar 2011 08:59:54 +0000 (08:59 +0000)]
Refactor inccode.t to use is_miniperl() instead of $ENV{PERL_CORE_MINITEST}
David Golden [Tue, 8 Mar 2011 02:24:15 +0000 (21:24 -0500)]
Update Module::Build to CPAN version 0.3800
[DELTA]
0.3800 - Sat Mar 5 15:11:41 EST 2011
Summary of major changes since 0.3624:
[ENHANCEMENTS]
- Generates META.json and MYMETA.json consistent with version 2 of the
CPAN Meta Spec. [David Golden]
Also in this release:
[BUG FIXES]
- Autogenerated documentation no longer includes private actions from
Module::Build's own release subclass. [Report by Timothy Appnel,
fix by David Golden]
0.37_06 - Mon Feb 28 21:43:31 EST 2011
[BUG FIXES]
- prerequisites with the empty string instead of a version are
normalized to "0". (RT#65909)
[OTHER]
- More Pod typo/link fixes [Hongwen Qiu]
Robin Barker [Tue, 8 Mar 2011 00:36:39 +0000 (16:36 -0800)]
[perl #85638] Docs for 'inherit from yourself' warning in base.pm
The "inherit from yourself" is triggered by
C<package Foo; use base 'Foo';> not C<use Foo; use base 'Foo';>
as stated in the documentation.
Father Chrysostomos [Tue, 8 Mar 2011 00:35:28 +0000 (16:35 -0800)]
Increase base.pm’s version
Father Chrysostomos [Tue, 8 Mar 2011 00:31:51 +0000 (16:31 -0800)]
Increase Math::BigInt’s version
There is a 1.993 release on CPAN. There have been more changes since.
Craig A. Berry [Tue, 8 Mar 2011 00:52:33 +0000 (18:52 -0600)]
Set multiplicity in configure.com when usethreads is enabled.
It's hard-wired in perl.h, so it doesn't make any difference to
what's seen by the C code, but $Config{multiplicity} should reflect
what we're actually doing (and track what Configure does).
Nicholas Clark [Mon, 7 Mar 2011 22:08:05 +0000 (22:08 +0000)]
Move the test for
078c425b721ea35d from fresh_perl.t to pat_rt_report.t
It happens to be the only test in fresh_perl.t that skips on miniperl.
pat_rt_report.t automatically skips on miniperl, and isn't exclusively for
bugs reported via RT.
Nicholas Clark [Mon, 7 Mar 2011 21:55:36 +0000 (21:55 +0000)]
Refactor 4 tests to use skip_if_miniperl().
Nicholas Clark [Mon, 7 Mar 2011 21:54:40 +0000 (21:54 +0000)]
Refactor sigdispatch.t to use is_miniperl() instead testing %ENV for minitest.
Nicholas Clark [Mon, 7 Mar 2011 21:03:20 +0000 (21:03 +0000)]
Refactor t/thread_it.pl to use test.pl's skip_all_*() functions.
Nicholas Clark [Mon, 7 Mar 2011 19:54:38 +0000 (19:54 +0000)]
Refactor 4 tests to use skip_all(), instead of longhand code to generate TAP.
Nicholas Clark [Mon, 7 Mar 2011 19:53:37 +0000 (19:53 +0000)]
Refactor t/op/getpid.t to use skip_all_if_miniperl() in place of explicit code.
Nicholas Clark [Mon, 7 Mar 2011 19:37:13 +0000 (19:37 +0000)]
Replace quit() in t/op/groups.t with test.pl's skip_all()
Nicholas Clark [Mon, 7 Mar 2011 19:25:13 +0000 (19:25 +0000)]
Add skip_all_without_config() to test.pl, and use it in 6 tests.
This abstracts out the common idiom of loading Config, checking if a particular
key is true, and if not implementing a "skip all" with an appropriate reason.
Nicholas Clark [Mon, 7 Mar 2011 18:10:45 +0000 (18:10 +0000)]
Refactor the startup logic in fflush.t to use skip_all()
The tautological 3 way logic
if (...) { print "1..7\n" } elsif (...) { print "1..7\n" } else { ... }
had actually been in the test since it was first added in
a43cb6b7285a7b60,
although it was initially "1..4\n" in each block.
Also use plan(), and set test.pl's idea of the current test before exiting.
Nicholas Clark [Mon, 7 Mar 2011 17:36:55 +0000 (17:36 +0000)]
Refactor 5 tests to use skip_all(), instead of generating TAP locally.
Nicholas Clark [Mon, 7 Mar 2011 17:10:26 +0000 (17:10 +0000)]
Refactor t/lib/proxy_constant_subs.t to use skip_all_without_extension()
Nicholas Clark [Mon, 7 Mar 2011 16:31:05 +0000 (16:31 +0000)]
Simplify the startup skip logic of tests in t/uni.
Use the various skip_all*() functions in test.pl to express the desired intent.
Nicholas Clark [Mon, 7 Mar 2011 13:33:48 +0000 (13:33 +0000)]
Add skip_all_without_perlio() to test.pl, and use it in 8 tests.
It's a common idiom in the tests. This makes it easier to find, read, and
remove.
Nicholas Clark [Mon, 7 Mar 2011 12:05:14 +0000 (12:05 +0000)]
Fix building with -Uuseperlio
It was inadvertently broken by
2e0cfa16dea85dd3. Many tests still fail, but
that is unrelated to that change. It's more likely that we will remove
-Uuseperlio than fix the tests.
Nicholas Clark [Mon, 7 Mar 2011 11:00:53 +0000 (11:00 +0000)]
Refactor 6 tests in t/op and t/run to use skip_all_if_miniperl().
Nicholas Clark [Mon, 7 Mar 2011 10:27:17 +0000 (10:27 +0000)]
Ensure that the C<exists &Errno::EFOO> idiom continues to work as documented.
A change post-5.12 (probably
42607a60df6df19b) caused the documented idiom not
to work if Errno was loaded after the C<exists> code had been compiled, as
the compiler implicitly creates typeglobs in the Errno symbol table when it
builds the optree for the C<exists code>.
Father Chrysostomos [Mon, 7 Mar 2011 06:28:47 +0000 (22:28 -0800)]
More changes to perlretut
Mostly minor punctuation changes, but also:
• Some of the ‘new’ features are no longer new.
• Explain that \Q\L\U only apply to literal regexps, not interpolated
ones.
• The charnames pragma is not required for \p
• The section on [:POSIX:] char classes was still explaining 5.6.
Craig A. Berry [Mon, 7 Mar 2011 03:58:34 +0000 (21:58 -0600)]
Libraries in @INC may be in Unix or VMS format on VMS.
We now (after
816005240f1a3b9989c940e630e829048597537c) will store
them in @INC in Unix format, but either format is legal. We can't
change the values in %Config to be Unix format, though, because
MakeMaker and other utilities may use those to construct paths
for native software that needs them in native format.
Craig A. Berry [Sun, 6 Mar 2011 22:07:30 +0000 (16:07 -0600)]
Add appropriate archname appendages in configure.com.
Now that we have the relevant questions answered before we set
archname, add the appropriate components to archname at the right
time so they'll become part of the architecture-specific
directory names.
FIXME: We don't (yet) set archname64, so at present we're not
adding it to archname.
Craig A. Berry [Sun, 6 Mar 2011 21:59:06 +0000 (15:59 -0600)]
Reorder archname-related questions in configure.com.
By moving these to after other questions have been asked, we can
construct a proper $Config{archname} that indicates threads, long
doubles, multiplicity, or anything else that needs to be appended
to the architecture name.
This means letting go of the ability to configure for a different
architecture than the one you're running on, but that feature is
unlikely to have worked very well in recent years anyway as there
have been an increasing number of features that are not available
on all architectures.
Craig A. Berry [Sun, 6 Mar 2011 04:18:38 +0000 (22:18 -0600)]
Use full archname in architecture-specific directories on VMS.
We were only using the base archname (e.g., "VMS_AXP"), which is
ok for a default bulid, but if any additions were made to it,
such as "-thread", there would be a discrepancy between the
actual directory on disk and what perl.c:S_incpush would look for
when loading up @INC. The net effect was that the architecture-
specific directory would not get loaded into @INC.
Craig A. Berry [Sun, 6 Mar 2011 04:08:24 +0000 (22:08 -0600)]
Make archname checks relocatable in configure.com.
Instead of testing for equality, look for the first minus sign-
delimited element. This means it won't matter which order these
checks are done in relation to adding things like "-thread-multi"
to archname.
Father Chrysostomos [Mon, 7 Mar 2011 00:58:46 +0000 (16:58 -0800)]
More perlretut tweaks
In particular:
• The word ‘substitute’ was misused. I changed it to substitution,
but then realised that it was actually wordy and redundant, so I
removed it.
• The /e modifier does not do an eval{...} or eval '...' or anything
of the sort. s/foo/die/e demonstrates this clearly. (/ee is a diffe-
rent matter, but is not covered in perlretut.)
Father Chrysostomos [Sun, 6 Mar 2011 23:59:14 +0000 (15:59 -0800)]
perlretut: Mention /p
Father Chrysostomos [Sun, 6 Mar 2011 23:57:46 +0000 (15:57 -0800)]
perlretut tweaks
In particular, remove the obsolete mention of new features ‘in 5.6.0’.
Nicholas Clark [Sun, 6 Mar 2011 22:42:22 +0000 (22:42 +0000)]
Ensure that t/io/{print,read,say}.t load Errno at BEGIN time.
If Errno is loaded after the compiler has parsed the C<exists &Errno::EBADF>
later in the script, then the intent of that test is subverted - &Errno::EBADF
does not exist, at least as far as the typeglob bound to that op is concerned,
and the test for $! is skipped. I suspect that these have been skipping since
the implementation of Errno was changed in
42607a60df6df19b in May 2010 to
reduce its memory footprint by 55%.
Nicholas Clark [Sun, 6 Mar 2011 22:14:23 +0000 (22:14 +0000)]
Tidy perlio_open.t, by using test.pl skip_all* functions where appropriate.
This reduces the startup boilerplate code by more than half.
Nicholas Clark [Sun, 6 Mar 2011 21:58:19 +0000 (21:58 +0000)]
Add skip_all_without_extension() to test.pl, for the common skip idiom.
Use it in t/io/layers.t to skip if Encode is not built.
Nicholas Clark [Sun, 6 Mar 2011 21:41:01 +0000 (21:41 +0000)]
Tidy t/io/layers.t
Skip under minitest using skip_all_if_miniperl().
skip_all() once rather than skipping every test if Encode is not built, or
PerlIO is not available.
Nicholas Clark [Sun, 6 Mar 2011 21:25:47 +0000 (21:25 +0000)]
Tidy t/io/crlf.t
Skip a test under minitest using skip_if_miniperl().
Use eq(), like() and unlike() where appropriate, instead of ok().
Nicholas Clark [Sun, 6 Mar 2011 21:21:10 +0000 (21:21 +0000)]
Tidy t/io/binmode.t
Remove redundant C<use Config;>
If C<find PerlIO::Layer 'perlio'> fails, use skip() rather than ok() to skip.
Make the indenting on 2 inconsistent lines consistent with the rest of the file.
Die if Errno can't be loaded, unless it's miniperl.
Father Chrysostomos [Sun, 6 Mar 2011 22:29:09 +0000 (14:29 -0800)]
perlrequick tweaks
Father Chrysostomos [Sun, 6 Mar 2011 21:55:36 +0000 (13:55 -0800)]
Reword a perldiag entry
It’s a little more readable if it’s more concise, at least in
this case.
David Leadbeater [Sun, 6 Mar 2011 15:19:57 +0000 (15:19 +0000)]
Fix [perl #85508] regression in print length undef
length was returning a temporary copy of undef, this meant it didn't
generate a warning when used uninitialised. Return PL_sv_undef but
also ensure TARG is cleared if needed.
Nicholas Clark [Sun, 6 Mar 2011 20:36:33 +0000 (20:36 +0000)]
Move the tests for split /\s/ and Unicode from split.t to split_unicode.t
Skip split_unicode.t under minitest, as it uses charnames, which uses
File::Spec, which may not be available.
[Experimentation reveals that git blame by default won't attribute lines past
this commit, unless --find-copies-harder is used. The alternative approach,
copy t/op/split.t as t/op/split_unicode.t as 1 commit, then prune both, fares
no better - by default git blame can't attribute through that *either*.
Again, --find-copies-harder works. Hence, do the partition as this one commit,
as it is simpler, and all other things are equal]
Nicholas Clark [Sun, 6 Mar 2011 18:59:52 +0000 (18:59 +0000)]
Move t/re/re.t to ext/re/t/re_funcs_u.t, so that it is not part of minitest.
The test file is for functions in the re:: namespace implemented in
universal.c, but needs to load re, which isn't built for minitest. As none of
these functions are used as part of the core's build process, seems best to
move it with all the other tests related to the re extension.