Changeset 11095

Show
Ignore:
Timestamp:
05/04/08 19:51:18 (5 years ago)
Author:
tokuhirom
Message:

little bit more pretty output. thanks to ferreira++

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/HTTP-Engine/branches/moose/lib/HTTP/Engine/Plugin/DebugScreen.pm

    r11063 r11095  
    66around call_handler => sub { 
    77    my ($next, @args) = @_; 
    8     local $SIG{__DIE__} = \&Carp::confess; 
     8    local $SIG{__DIE__} = \&_die; 
    99    $next->(@args); 
    1010}; 
     
    2020}; 
    2121 
     22# copied from Carp::Always. thanks ferreira++ 
     23sub _die { 
     24    if ( $_[-1] =~ /\n$/s ) { 
     25        my $arg = pop @_; 
     26        $arg =~ s/ at .*? line .*?\n$//s; 
     27        push @_, $arg; 
     28    } 
     29    die &Carp::longmess; 
     30} 
     31 
    22321;