summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANIFEST7
-rwxr-xr-xMakefile.SH2
-rwxr-xr-xPorting/Maintainers.pl2
-rw-r--r--ext/Carp/Makefile.PL21
-rw-r--r--ext/Carp/lib/Carp.pm (renamed from lib/Carp.pm)0
-rw-r--r--ext/Carp/lib/Carp/Heavy.pm (renamed from lib/Carp/Heavy.pm)0
-rw-r--r--ext/Carp/t/Carp.t (renamed from lib/Carp.t)66
-rw-r--r--lib/.gitignore2
-rw-r--r--write_buildcustomize.pl1
9 files changed, 67 insertions, 34 deletions
diff --git a/MANIFEST b/MANIFEST
index 6e882a0117..81a5702545 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3464,6 +3464,10 @@ ext/B/t/terse.t See if B::Terse works
ext/B/t/walkoptree.t See if B::walkoptree (and friends) work
ext/B/t/xref.t See if B::Xref works
ext/B/typemap Compiler backend interface types
+ext/Carp/lib/Carp/Heavy.pm Error message retired workhorse
+ext/Carp/lib/Carp.pm Error message extension
+ext/Carp/Makefile.PL makefile writer for Carp
+ext/Carp/t/Carp.t See if Carp works
ext/Devel-Peek/Changes Data debugging tool, changelog
ext/Devel-Peek/Makefile.PL Data debugging tool, makefile writer
ext/Devel-Peek/Peek.pm Data debugging tool, module and pod
@@ -3949,9 +3953,6 @@ lib/blib.t blib.pm test
lib/bytes_heavy.pl Support routines for byte pragma
lib/bytes.pm Pragma to enable byte operations
lib/bytes.t bytes.pm test
-lib/Carp/Heavy.pm Error message workhorse
-lib/Carp.pm Error message base class
-lib/Carp.t See if Carp works
lib/charnames.pm Character names
lib/charnames.t See if character names work
lib/Class/Struct.pm Declare struct-like datatypes as Perl classes
diff --git a/Makefile.SH b/Makefile.SH
index 3119f617b2..6b824f5143 100755
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -1296,7 +1296,7 @@ _cleaner2:
-rmdir cpan/CPANPLUS-Dist-Build/t/dummy-cpanplus cpan/CPANPLUS/t/dummy-cpanplus cpan/CPANPLUS/t/dummy-localmirror
-rmdir ext/B/lib
-rmdir lib/Archive/Tar lib/Archive lib/Attribute
- -rmdir lib/CGI
+ -rmdir lib/CGI lib/Carp
-rmdir lib/Data lib/Devel lib/Digest
-rmdir lib/ExtUtils/Command lib/ExtUtils/Constant lib/ExtUtils/Liblist lib/ExtUtils/MakeMaker
-rmdir lib/File/Spec lib/Filter/Util lib/Filter
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index bdd061e3b9..8ad5471aa3 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -343,7 +343,7 @@ use File::Glob qw(:case);
'Carp' =>
{
'MAINTAINER' => 'p5p',
- 'FILES' => q[lib/Carp.{pm,t} lib/Carp/Heavy.pm],
+ 'FILES' => q[ext/Carp],
'UPSTREAM' => 'blead',
},
diff --git a/ext/Carp/Makefile.PL b/ext/Carp/Makefile.PL
new file mode 100644
index 0000000000..313f537102
--- /dev/null
+++ b/ext/Carp/Makefile.PL
@@ -0,0 +1,21 @@
+use warnings;
+use strict;
+
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+ NAME => "Carp",
+ VERSION_FROM => "lib/Carp.pm",
+ ABSTRACT_FROM => "lib/Carp.pm",
+ PREREQ_PM => {
+ "Exporter" => 0,
+ "IPC::Open3" => "1.0104",
+ "Test::More" => 0,
+ "strict" => 0,
+ "warnings" => 0,
+ },
+ LICENSE => "perl",
+ INSTALLDIRS => "$]" < 5.011 ? "perl" : "site",
+);
+
+1;
diff --git a/lib/Carp.pm b/ext/Carp/lib/Carp.pm
index 6148a6862f..6148a6862f 100644
--- a/lib/Carp.pm
+++ b/ext/Carp/lib/Carp.pm
diff --git a/lib/Carp/Heavy.pm b/ext/Carp/lib/Carp/Heavy.pm
index 38f95d8a5a..38f95d8a5a 100644
--- a/lib/Carp/Heavy.pm
+++ b/ext/Carp/lib/Carp/Heavy.pm
diff --git a/lib/Carp.t b/ext/Carp/t/Carp.t
index 253baac62f..60b33052db 100644
--- a/lib/Carp.t
+++ b/ext/Carp/t/Carp.t
@@ -1,20 +1,26 @@
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- require './test.pl';
-}
-
use warnings;
no warnings "once";
use Config;
+use IPC::Open3 1.0104 qw(open3);
+use Test::More tests => 58;
+
+sub runperl {
+ my(%args) = @_;
+ my($w, $r);
+ my $pid = open3($w, $r, undef, $^X, "-e", $args{prog});
+ close $w;
+ my $output = "";
+ while(<$r>) { $output .= $_; }
+ waitpid($pid, 0);
+ return $output;
+}
+
my $Is_VMS = $^O eq 'VMS';
use Carp qw(carp cluck croak confess);
BEGIN {
- plan tests => 58;
-
# This test must be run at BEGIN time, because code later in this file
# sets CORE::GLOBAL::caller
ok !exists $CORE::GLOBAL::{caller},
@@ -380,34 +386,36 @@ like(
# UTF8-flagged strings should not cause Carp to try to load modules (even
# implicitly via utf8_heavy.pl) after a syntax error [perl #82854].
-fresh_perl_like(
- q<
- use utf8; use strict; use Carp;
- BEGIN { $SIG{__DIE__} = sub { Carp::croak "aaaaa$_[0]" } }
- $c
- >,
- qr/aaaaa/,
- {stderr=>1},
- 'Carp can handle UTF8-flagged strings after a syntax error',
+like(
+ runperl(
+ prog => q<
+ use utf8; use strict; use Carp;
+ BEGIN { $SIG{__DIE__} = sub { Carp::croak "aaaaa$_[0]" } }
+ $c
+ >,
+ stderr=>1,
+ ),
+ qr/aaaaa/,
+ 'Carp can handle UTF8-flagged strings after a syntax error',
);
SKIP:
{
skip("B:: always created when static", 1)
if $Config{static_ext} =~ /\bB\b/;
-
- fresh_perl_is(
- q<
- use Carp;
- $SIG{__WARN__} = sub{};
- carp ("A duck, but which duck?");
- print "ok" unless exists $::{"B::"};
- >,
- 'ok',
- {},
- 'Carp does not autovivify *B::'
+ is(
+ runperl(
+ prog => q<
+ use Carp;
+ $SIG{__WARN__} = sub{};
+ carp ("A duck, but which duck?");
+ print "ok" unless exists $::{"B::"};
+ >,
+ ),
+ 'ok',
+ 'Carp does not autovivify *B::',
);
- }
+}
# New tests go here
diff --git a/lib/.gitignore b/lib/.gitignore
index 67151e3124..5998e457cd 100644
--- a/lib/.gitignore
+++ b/lib/.gitignore
@@ -105,6 +105,8 @@
/CPANPLUS/Shell/Default/Plugins/HOWTO.pod
/CPANPLUS/Shell/Default/Plugins/Remote.pm
/CPANPLUS/Shell/Default/Plugins/Source.pm
+/Carp.pm
+/Carp/Heavy.pm
/Class/ISA.pm
/Compress
/Config.pm
diff --git a/write_buildcustomize.pl b/write_buildcustomize.pl
index 0508e27226..24c767c451 100644
--- a/write_buildcustomize.pl
+++ b/write_buildcustomize.pl
@@ -18,6 +18,7 @@ require File::Spec::Functions;
# allow miniperl to build everything else.
my @toolchain = qw(cpan/AutoLoader/lib
+ ext/Carp/lib
dist/Cwd dist/Cwd/lib
dist/ExtUtils-Command/lib
dist/ExtUtils-Install/lib