summaryrefslogtreecommitdiff
path: root/dist/Carp
diff options
context:
space:
mode:
authorAaron Crane <arc@cpan.org>2016-04-24 16:24:43 +0100
committerAaron Crane <arc@cpan.org>2016-05-16 00:07:34 +0100
commit2f7a15bf0111b35a9af62de5c74e13855cb9cea3 (patch)
tree9a61b5f9250572522cf59bbb91cab74b856629ed /dist/Carp
parente8164ee76be9fe457e58508afccf20abb0cc4008 (diff)
downloadperl-2f7a15bf0111b35a9af62de5c74e13855cb9cea3.tar.gz
[cpan#100183] Add missing "<FH> chunk #" phrase to Carp messages
Commit 89988fbd2f7d8a44526a3cd9ab671b3102898bc9 added the relevant phrase for line-oriented filehandles; this extends that to also cover chunk-oriented ones. The patch was supplied by Chris R Donnelly <chris.donnelly@vauto.com> on the rt.cpan.org ticket; I have extended it to include a test.
Diffstat (limited to 'dist/Carp')
-rw-r--r--dist/Carp/lib/Carp.pm4
-rw-r--r--dist/Carp/lib/Carp/Heavy.pm2
-rw-r--r--dist/Carp/t/Carp.t13
3 files changed, 15 insertions, 4 deletions
diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm
index 92f88661af..8e61752cba 100644
--- a/dist/Carp/lib/Carp.pm
+++ b/dist/Carp/lib/Carp.pm
@@ -87,7 +87,7 @@ BEGIN {
}
}
-our $VERSION = '1.40';
+our $VERSION = '1.41';
$VERSION =~ tr/_//d;
our $MaxEvalLen = 0;
@@ -474,7 +474,7 @@ sub ret_backtrace {
eval {
CORE::die;
};
- if($@ =~ /^Died at .*(, <.*?> line \d+).$/ ) {
+ if($@ =~ /^Died at .*(, <.*?> (?:line|chunk) \d+).$/ ) {
$mess .= $1;
}
}
diff --git a/dist/Carp/lib/Carp/Heavy.pm b/dist/Carp/lib/Carp/Heavy.pm
index b05d7583c2..7b4de47450 100644
--- a/dist/Carp/lib/Carp/Heavy.pm
+++ b/dist/Carp/lib/Carp/Heavy.pm
@@ -2,7 +2,7 @@ package Carp::Heavy;
use Carp ();
-our $VERSION = '1.40';
+our $VERSION = '1.41';
$VERSION =~ tr/_//d;
# Carp::Heavy was merged into Carp in version 1.12. Any mismatched versions
diff --git a/dist/Carp/t/Carp.t b/dist/Carp/t/Carp.t
index 9ecdf88b60..65daed7c6c 100644
--- a/dist/Carp/t/Carp.t
+++ b/dist/Carp/t/Carp.t
@@ -3,7 +3,7 @@ no warnings "once";
use Config;
use IPC::Open3 1.0103 qw(open3);
-use Test::More tests => 66;
+use Test::More tests => 67;
sub runperl {
my(%args) = @_;
@@ -442,6 +442,16 @@ $@ =~ s/\n.*//; # just check first line
is $@, "heek at ".__FILE__." line ".(__LINE__-2).", <DATA> line 2.\n",
'last handle line num is mentioned';
+# [cpan #100183]
+{
+ local $/ = \6;
+ <XD::DATA>;
+ eval { croak 'jeek' };
+ $@ =~ s/\n.*//; # just check first line
+ is $@, "jeek at ".__FILE__." line ".(__LINE__-2).", <DATA> chunk 3.\n",
+ 'last handle chunk num is mentioned';
+}
+
SKIP:
{
skip "IPC::Open3::open3 needs porting", 1 if $Is_VMS;
@@ -531,3 +541,4 @@ __DATA__
1
2
3
+abcdefghijklmnopqrstuvwxyz