This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
13 years agoIn Tie::Hash::NamedCapture move the tie of %+ and %- from perl to XS.
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.

13 years agoConvert Tie::Hash::NamedCapture::TIEHASH to XS.
Nicholas Clark [Tue, 8 Mar 2011 16:46:36 +0000 (16:46 +0000)]
Convert Tie::Hash::NamedCapture::TIEHASH to XS.

13 years agoAdd tests for documented behaviour of Tie::Hash::NamedCapture::TIEHASH.
Nicholas Clark [Tue, 8 Mar 2011 15:28:37 +0000 (15:28 +0000)]
Add tests for documented behaviour of Tie::Hash::NamedCapture::TIEHASH.

13 years agoUpdate JSON-PP to CPAN version 2.27105
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

13 years agoCheck for threads before multiplicity in configure.com.
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.

13 years agoIn test.pl, use block eval instead of string eval for requiring modules.
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.

13 years agoRefactor skip_all_without_config() to take a list of config options to test.
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.

13 years agoSimplify the logic in t/thread_it.pl, as the callers' filenames are uniform.
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".

13 years ago4f890a3067e1198f missed qr// from t/re/pat.t in its refactoring in two places.
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.

13 years agoNothing uses $ENV{PERL_CORE_MINITEST} any more, so don't set it in t/TEST
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

13 years agoMove the special-case logic for $qr_embed_thr to regexp_qr_embed_thr.t
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

13 years agoRefactor inccode.t to use is_miniperl() instead of $ENV{PERL_CORE_MINITEST}
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}

13 years agoUpdate Module::Build to CPAN version 0.3800
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]

13 years ago[perl #85638] Docs for 'inherit from yourself' warning in base.pm
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.

13 years agoIncrease base.pm’s version
Father Chrysostomos [Tue, 8 Mar 2011 00:35:28 +0000 (16:35 -0800)]
Increase base.pm’s version

13 years agoIncrease Math::BigInt’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.

13 years agoSet multiplicity in configure.com when usethreads is enabled.
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).

13 years agoMove the test for 078c425b721ea35d from fresh_perl.t to pat_rt_report.t
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.

13 years agoRefactor 4 tests to use skip_if_miniperl().
Nicholas Clark [Mon, 7 Mar 2011 21:55:36 +0000 (21:55 +0000)]
Refactor 4 tests to use skip_if_miniperl().

13 years agoRefactor sigdispatch.t to use is_miniperl() instead testing %ENV for minitest.
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.

13 years agoRefactor t/thread_it.pl to use test.pl's skip_all_*() functions.
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.

13 years agoRefactor 4 tests to use skip_all(), instead of longhand code to generate TAP.
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.

13 years agoRefactor t/op/getpid.t to use skip_all_if_miniperl() in place of explicit code.
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.

13 years agoReplace quit() in t/op/groups.t with test.pl's skip_all()
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()

13 years agoAdd skip_all_without_config() to test.pl, and use it in 6 tests.
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.

13 years agoRefactor the startup logic in fflush.t to use skip_all()
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.

13 years agoRefactor 5 tests to use skip_all(), instead of generating TAP locally.
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.

13 years agoRefactor t/lib/proxy_constant_subs.t to use skip_all_without_extension()
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()

13 years agoSimplify the startup skip logic of tests in t/uni.
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.

13 years agoAdd skip_all_without_perlio() to test.pl, and use it in 8 tests.
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.

13 years agoFix building with -Uuseperlio
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.

13 years agoRefactor 6 tests in t/op and t/run to use skip_all_if_miniperl().
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().

13 years agoEnsure that the C<exists &Errno::EFOO> idiom continues to work as documented.
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>.

13 years agoMore changes to perlretut
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.

13 years agoLibraries in @INC may be in Unix or VMS format on VMS.
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.

13 years agoAdd appropriate archname appendages in configure.com.
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.

13 years agoReorder archname-related questions in configure.com.
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.

13 years agoUse full archname in architecture-specific directories on VMS.
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.

13 years agoMake archname checks relocatable in configure.com.
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.

13 years agoMore perlretut tweaks
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.)

13 years agoperlretut: Mention /p
Father Chrysostomos [Sun, 6 Mar 2011 23:59:14 +0000 (15:59 -0800)]
perlretut: Mention /p

13 years agoperlretut tweaks
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’.

13 years agoEnsure that t/io/{print,read,say}.t load Errno at BEGIN time.
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%.

13 years agoTidy perlio_open.t, by using test.pl skip_all* functions where appropriate.
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.

13 years agoAdd skip_all_without_extension() to test.pl, for the common skip idiom.
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.

13 years agoTidy t/io/layers.t
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.

13 years agoTidy t/io/crlf.t
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().

13 years agoTidy t/io/binmode.t
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.

13 years agoperlrequick tweaks
Father Chrysostomos [Sun, 6 Mar 2011 22:29:09 +0000 (14:29 -0800)]
perlrequick tweaks

13 years agoReword a perldiag entry
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.

13 years agoFix [perl #85508] regression in print length undef
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.

13 years agoMove the tests for split /\s/ and Unicode from split.t to split_unicode.t
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]

13 years agoMove t/re/re.t to ext/re/t/re_funcs_u.t, so that it is not part of minitest.
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.

13 years agoEnsure t/op/stat.t passes under minitest if File::Spec is unavailable.
Nicholas Clark [Sun, 6 Mar 2011 18:15:43 +0000 (18:15 +0000)]
Ensure t/op/stat.t passes under minitest if File::Spec is unavailable.

require File::Spec in an eval. For miniperl, if the eval fails, skip tests
relating to File::Spec->devnull() and needing File::Spec->rel2abs(), and assume
that '.' will work as the current directory. Remove a call to catfile() only
needed for MacOS Classic - every other platform will accept Unix-style paths.

13 years agoEnsure t/op/mkdir.t passes under minitest by loading File::Path in an eval.
Nicholas Clark [Sun, 6 Mar 2011 17:58:26 +0000 (17:58 +0000)]
Ensure t/op/mkdir.t passes under minitest by loading File::Path in an eval.

File::Path::rmtree() is only used as a cleanup function of last resort - by
default t/op/mkdir.t directly cleans up the test directory that it creates
before it exits.

13 years agoEnsure that chdir.t can find File::Spec and Cwd under minitest
Nicholas Clark [Sun, 6 Mar 2011 17:50:36 +0000 (17:50 +0000)]
Ensure that chdir.t can find File::Spec and Cwd under minitest

As a working chdir is a key part of the build process, it would be counter-
productive to skip testing it if the build process failed, because it might be
cause of the problems. So add the source locations for Cwd and File::Spec in
dist/Cwd and dist/Cwd/lib respectively.

13 years agoUnder minitest, tests requiring File::Spec->devnull(), as it may not be built.
Nicholas Clark [Sun, 6 Mar 2011 17:38:36 +0000 (17:38 +0000)]
Under minitest, tests requiring File::Spec->devnull(), as it may not be built.

Although File::Spec is pure Perl, it is part of the Cwd distribution, and
that isn't built for minitest. So we can't rely on it.

13 years agocharset.t: Improve diagnostic messages
Karl Williamson [Sun, 6 Mar 2011 17:19:34 +0000 (10:19 -0700)]
charset.t: Improve diagnostic messages

13 years agocharset.t: Group tests by complement/non-
Karl Williamson [Sun, 6 Mar 2011 16:51:18 +0000 (09:51 -0700)]
charset.t: Group tests by complement/non-

This is in preparation for giving different descriptions for the
complement case

13 years agoUpdate Unicode-Collate to CPAN version 0.73
Chris 'BinGOs' Williams [Sun, 6 Mar 2011 16:59:33 +0000 (16:59 +0000)]
Update Unicode-Collate to CPAN version 0.73

  [DELTA]

  0.73  Sun Mar  6 13:24:22 2011
    - DUCET is updated (for Unicode 6.0.0) as Collate/allkeys.txt.
    ! However no maint perl has supported Unicode 6.0.0 yet;
      wait for 5.14, or try developing 5.13.7 or later.
    ! Please notice that allkeys.txt will be overwritten if you have had
      other allkeys.txt already.
    - The default UCA_Version is 22. Locale/*.pl and Korean.pm are updated.
    - test: compare allkeys.txt's version with Base_Unicode_Version
      in t/default.t.

13 years agoMention make test_porting
Leon Brocard [Sun, 6 Mar 2011 16:58:33 +0000 (16:58 +0000)]
Mention make test_porting

13 years agoAdd Danny Sadinoff's old email address to Porting/checkAUTHORS.pl
Leon Brocard [Sun, 6 Mar 2011 16:57:11 +0000 (16:57 +0000)]
Add Danny Sadinoff's old email address to Porting/checkAUTHORS.pl

13 years agoUpdate Danny Sadinoff's email address in AUTHORS, per <AANLkTinUkRsb2DLR3LW5VsUETK2K0...
Leon Brocard [Sun, 6 Mar 2011 16:39:11 +0000 (16:39 +0000)]
Update Danny Sadinoff's email address in AUTHORS, per <AANLkTinUkRsb2DLR3LW5VsUETK2K053uMv7mrGUmtQAZ@mail.gmail.com>

13 years agoIn gv.t, check that the installed $SIG{__DIE__} handler is never called.
Nicholas Clark [Sun, 6 Mar 2011 13:27:43 +0000 (13:27 +0000)]
In gv.t, check that the installed $SIG{__DIE__} handler is never called.

98e007d4a6d559b3 missed adding a check that the first $SIG{__DIE__} handler
was never called. While tidying, make the second $e lexical, and check that
the second $SIG{__DIE__} handler remains uncalled at the end of its block.

13 years agoA clearer layout for the fall-through logic of Socket::inet_aton()
Nicholas Clark [Sun, 6 Mar 2011 10:31:23 +0000 (10:31 +0000)]
A clearer layout for the fall-through logic of Socket::inet_aton()

13 years agoIn inet_aton(), use newSVpvn_flags() instead of sv_newmortal(), sv_setpvn()
Nicholas Clark [Sun, 6 Mar 2011 10:16:22 +0000 (10:16 +0000)]
In inet_aton(), use newSVpvn_flags() instead of sv_newmortal(), sv_setpvn()

The API calls are equivalent, but the object code is slightly smaller.

13 years agoSkip regexp_unicode_prop.t under minitest, as File::Spec may not be available.
Nicholas Clark [Sat, 5 Mar 2011 22:49:29 +0000 (22:49 +0000)]
Skip regexp_unicode_prop.t under minitest, as File::Spec may not be available.

It uses charnames, which uses File::Spec->file_name_is_absolute().
As regexp_unicode_prop.t now requires test.pl, switch to using $::IS_EBCDIC,
which test.pl sets.

13 years agoSkip pat_re_eval.t in minitest, as it uses re, which needs dynamic loading.
Nicholas Clark [Sat, 5 Mar 2011 22:36:15 +0000 (22:36 +0000)]
Skip pat_re_eval.t in minitest, as it uses re, which needs dynamic loading.

13 years agoMove two tests using charnames from t/re/pat.t to pat_rt_report.t
Nicholas Clark [Fri, 25 Feb 2011 15:56:04 +0000 (15:56 +0000)]
Move two tests using charnames from t/re/pat.t to pat_rt_report.t

The latter is skipped under minitest, as C<re> may not be available.
charnames may also fail to load under minitest, if File::Spec has not been
built. t/re/pat.t should now always run (and pass) under minitest.

13 years agoIn fold_grind.t, move the use charnames; after the skip_all_if_miniperl().
Nicholas Clark [Fri, 25 Feb 2011 15:54:15 +0000 (15:54 +0000)]
In fold_grind.t, move the use charnames; after the skip_all_if_miniperl().

This test isn't run under minitest, but use charnames; may well fail before
that skip is encountered, if it fails to load File::Spec. Moving it after
the BEGIN block ensures that the test will always run, or skip cleanly.

13 years agoSkip reg_eval_scope.t under minitest, as it needs charnames.
Nicholas Clark [Fri, 25 Feb 2011 15:53:10 +0000 (15:53 +0000)]
Skip reg_eval_scope.t under minitest, as it needs charnames.

Charnames uses File::Spec, which may not have been build.

13 years agoSkip taint.t and lex_utf8.t under minitest, as both require C<re>.
Nicholas Clark [Fri, 25 Feb 2011 14:59:55 +0000 (14:59 +0000)]
Skip taint.t and lex_utf8.t under minitest, as both require C<re>.

13 years agoSkip reg_fold.t under minitest, as it uses charnames, which uses File::Spec.
Nicholas Clark [Fri, 25 Feb 2011 14:58:58 +0000 (14:58 +0000)]
Skip reg_fold.t under minitest, as it uses charnames, which uses File::Spec.

13 years agoSkip a block of ref.t's tests on minitest, as C<re> may not be available.
Nicholas Clark [Fri, 25 Feb 2011 14:57:57 +0000 (14:57 +0000)]
Skip a block of ref.t's tests on minitest, as C<re> may not be available.

13 years agoCorrect the skip count for t/op/switch.t under minitest.
Nicholas Clark [Fri, 25 Feb 2011 14:56:20 +0000 (14:56 +0000)]
Correct the skip count for t/op/switch.t under minitest.

Skip this section unconditionally under miniperl, rather than assuming that
Scalar::Util will fall back to a pure perl version if "installed" in lib/, but
dynamic loading is unavailable.

13 years agoFix magic.t's expectation for $^X under minitest when the OS makes $^X absolute
Nicholas Clark [Fri, 25 Feb 2011 14:01:43 +0000 (14:01 +0000)]
Fix magic.t's expectation for $^X under minitest when the OS makes $^X absolute

Under minitest, t/perl is a symlink to ../perl. Test scripts are invoked with
./perl. When $Config{d_procselfexe} is undefined, $^X is still ./perl.
When it is defined, the OS resolves it to the absolute path .../miniperl.
Fix t/op/magic.t to be aware of this. Previously it was working for all cases
other than [$Config{d_procselfexe} is defined] and [make minitest] and
[perl does not exist].

13 years agoIn t/ avoid using File::Spec for paths only used by Perl.
Nicholas Clark [Thu, 24 Feb 2011 10:06:35 +0000 (10:06 +0000)]
In t/ avoid using File::Spec for paths only used by Perl.

All platforms Perl builds on can already support Unix-style paths (given that
make_ext.pl is using them). This makes 7 more tests pass under minitest, which
doesn't build File::Spec, because it's part of an XS module.

13 years agoRefactor t/op/time.t to use test.pl's warning_is().
Nicholas Clark [Sun, 6 Mar 2011 09:12:19 +0000 (09:12 +0000)]
Refactor t/op/time.t to use test.pl's warning_is().

13 years agocharset.t: Don't test locale if not working.
Karl Williamson [Sat, 5 Mar 2011 22:01:04 +0000 (15:01 -0700)]
charset.t: Don't test locale if not working.

Commit 09fcee4e4050e683c4608bbadac4c255a63c8ea5 didn't finish the
job.

13 years agoDocument running "make minitest" to test miniperl.
Craig A. Berry [Sun, 6 Mar 2011 03:57:20 +0000 (21:57 -0600)]
Document running "make minitest" to test miniperl.

13 years agoperlfunc tweaks
Father Chrysostomos [Sun, 6 Mar 2011 02:37:04 +0000 (18:37 -0800)]
perlfunc tweaks

Also remove a redundant paragraph from ‘open’.

13 years ago[perl #77384] Passing a ref to warn doesn't append file and line
Father Chrysostomos [Sun, 6 Mar 2011 02:11:52 +0000 (18:11 -0800)]
[perl #77384] Passing a ref to warn doesn't append file and line

This commit makes pp_warn stringify the warning if there is no
$SIG{__WARN__} handler. See the RT ticket for the discussion.

13 years agoMinor spelling fix.
Paul Johnson [Sat, 5 Mar 2011 23:55:21 +0000 (00:55 +0100)]
Minor spelling fix.

13 years ago[perl #85482] Make bmuladd() able to handle third arg properly.
Peter John Acklam [Sun, 6 Mar 2011 00:55:30 +0000 (16:55 -0800)]
[perl #85482] Make bmuladd() able to handle third arg properly.

bmuladd() contains a test to avoid calling objectify() when it isn't
necessary. This test catches too much, so objectify() isn't always called
when it should have been, e.g., when the two first arguments are are
Math::BigInts and the third is something else, a Math::BigInt::Lite for
example. This causes tests in Math::BigInt::Lite to fail (RT #66369). Also
fix bmuladd() in Math::BigFloat since it suffers from the same problem.

13 years ago[perl #85476] Add tests to confirm fix of RT #49569.
Peter John Acklam [Sat, 5 Mar 2011 22:38:36 +0000 (14:38 -0800)]
[perl #85476] Add tests to confirm fix of RT #49569.

Confirm that numify() on a value that can be represented exactly as
a Perl scalar integer is not converted to a floating point number,
e.g., that it returns 18446744073709551615, not 1.84467440737096e+19.

13 years ago[perl #85334] Document actual behaviour of from_xxx() methods.
Peter John Acklam [Sat, 5 Mar 2011 22:15:30 +0000 (14:15 -0800)]
[perl #85334] Document actual behaviour of from_xxx() methods.

Add more precise documentation of the behaviour of from_oct(),
from_hex(), and from_bin().

13 years agoNow that pat_{advanced,rt_report}.t use test.pl, use skip_all_if_miniperl().
Nicholas Clark [Sat, 5 Mar 2011 15:23:42 +0000 (15:23 +0000)]
Now that pat_{advanced,rt_report}.t use test.pl, use skip_all_if_miniperl().

Neither can run during minitest as miniperl can't load support code for %+ and
%-. If your build is so unwell that it's fallen back to minitest, your problems
are bigger than "advanced" regular expression features not working.

13 years agoEliminate t/re/ReTest.pl. require './test.pl' directly in its 3 (former) users.
Nicholas Clark [Sat, 5 Mar 2011 15:13:17 +0000 (15:13 +0000)]
Eliminate t/re/ReTest.pl. require './test.pl' directly in its 3 (former) users.

13 years agoMove setting $IS_ASCII and $IS_EBCDIC from ReTest.pl to test.pl
Nicholas Clark [Sat, 5 Mar 2011 14:54:11 +0000 (14:54 +0000)]
Move setting $IS_ASCII and $IS_EBCDIC from ReTest.pl to test.pl

As test.pl doesn't C<use vars> for either (and shouldn't start), modify the
users to fully qualify the variables, to avoid strict vars errors.

13 years agoEliminate $::ordA from ReTest.pl, inlining its constant value in its only user.
Nicholas Clark [Sat, 5 Mar 2011 14:43:33 +0000 (14:43 +0000)]
Eliminate $::ordA from ReTest.pl, inlining its constant value in its only user.

13 years agoEliminate eval_ok() from ReTest.pl by inlining the logic in the only caller.
Nicholas Clark [Sat, 5 Mar 2011 14:39:23 +0000 (14:39 +0000)]
Eliminate eval_ok() from ReTest.pl by inlining the logic in the only caller.

Refactor the 19 remaining calls into a data driven loop in pat.t, inlining the
eval logic.

13 years agoReplace three uses of eval_ok() with is() as the tested code doesn't die.
Nicholas Clark [Sat, 5 Mar 2011 13:48:43 +0000 (13:48 +0000)]
Replace three uses of eval_ok() with is() as the tested code doesn't die.

It's not clear whether the code ever threw exceptions. Not using eval_ok() here
makes subsequent refactoring a lot simpler.

13 years agoRefactor some calls to eval_ok() into is(eval $foo ...) and is($@, '') pairs.
Nicholas Clark [Sat, 5 Mar 2011 13:30:48 +0000 (13:30 +0000)]
Refactor some calls to eval_ok() into is(eval $foo ...) and is($@, '') pairs.

This gives better diagnostics on failure.

13 years agoAdd warnings_like() in test.pl to replace must_warn() in ReTest.pl.
Nicholas Clark [Sat, 5 Mar 2011 13:03:03 +0000 (13:03 +0000)]
Add warnings_like() in test.pl to replace must_warn() in ReTest.pl.

warnings_like() provides a subset of the functionality of the routine of the
same name in Test::Warn.

13 years agoAdd warning_like() in test.pl to replace some uses of ReTest.pl's must_warn().
Nicholas Clark [Sat, 5 Mar 2011 12:19:53 +0000 (12:19 +0000)]
Add warning_like() in test.pl to replace some uses of ReTest.pl's must_warn().

warning_like() provides a subset of the functionality of the routine of the
same name in Test::Warn. Remove the definition of must_warn() in t/re/subst.t,
which had been copied from t/re/ReTest.pl from when ReTest.pl and test.pl
clashed.

13 years agoIn pat_advanced.t, refactor 6 calls to must_warn() into a loop.
Nicholas Clark [Sat, 5 Mar 2011 12:04:03 +0000 (12:04 +0000)]
In pat_advanced.t, refactor 6 calls to must_warn() into a loop.

13 years agoImprove warning_is() to verify that exactly 0 or 1 warning has been seen.
Nicholas Clark [Sat, 5 Mar 2011 11:04:44 +0000 (11:04 +0000)]
Improve warning_is() to verify that exactly 0 or 1 warning has been seen.

13 years agoAdd warning_is() in test.pl to replace may_not_warn() in ReTest.pl.
Nicholas Clark [Sat, 5 Mar 2011 10:57:43 +0000 (10:57 +0000)]
Add warning_is() in test.pl to replace may_not_warn() in ReTest.pl.

warning_is() provides a subset of the functionality of the routine of the same
name in Test::Warn.

13 years agoEliminate must_die() from ReTest.pl, which is only used 3 times in pat.t
Nicholas Clark [Sat, 5 Mar 2011 10:44:50 +0000 (10:44 +0000)]
Eliminate must_die() from ReTest.pl, which is only used 3 times in pat.t

Replace it with is(eval ..., undef); like($@, $error);

It's not viable to emulate Test::Exception's throws_ok() in test.pl, as it
only takes a code reference, whereas these tests are for compilation errors
and so use string eval.

13 years agoMove the loading of %Config from ReTest.pl to the only use point in pat.t
Nicholas Clark [Sat, 5 Mar 2011 10:07:01 +0000 (10:07 +0000)]
Move the loading of %Config from ReTest.pl to the only use point in pat.t