Skip to content

Commit

Permalink
evaled die fixed for perl 5.10-5.16 and 5.26
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-mixas committed Dec 30, 2017
1 parent 11a2e5f commit 2281a60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Log/Log4Cli.pm
Expand Up @@ -5,6 +5,7 @@ use strict;
use warnings;
use parent qw(Exporter);

use Carp qw(croak);
use Term::ANSIColor qw(colored);

BEGIN {
Expand Down Expand Up @@ -54,8 +55,7 @@ sub _die($$$) {
if ($^S) {
# inside eval block
$STATUS = $_[0];
require Carp;
Carp::croak(defined $_[2] ? "$_[2]" : "Died");
croak defined $_[2] ? "$_[2]" : "Died";
} else {
print $FD $_[1] . (defined $_[2] ? "$_[2]. " : "") .
"Exit $_[0], ET " . (time - $^T) . "s\n" if ($_[1]);
Expand Down

0 comments on commit 2281a60

Please sign in to comment.