From: Ralf Ertzinger Date: Wed, 8 May 2013 07:47:11 +0000 (+0200) Subject: Add handler to produce a proper backtrace on error X-Git-Url: https://git.camperquake.de/gitweb.cgi?p=videosite.git;a=commitdiff_plain;h=3255f6f448ae2e392871dc5241536b0dfb009a59 Add handler to produce a proper backtrace on error --- diff --git a/videosite-dl.pl b/videosite-dl.pl index 1225b92..594b020 100755 --- a/videosite-dl.pl +++ b/videosite-dl.pl @@ -6,6 +6,9 @@ use File::Spec; use File::Basename; use Module::Load; use Cwd qw(realpath); +use Carp; + +$SIG{ __DIE__ } = sub { Carp::confess( @_ ) }; my $info = 0; my $debug = 0; diff --git a/videosite-irssi.pl b/videosite-irssi.pl index 2e5a0ec..86e370d 100644 --- a/videosite-irssi.pl +++ b/videosite-irssi.pl @@ -9,6 +9,9 @@ use File::Spec; use Module::Load; use XML::Simple; use JSON -support_by_pp; +use Carp; + +$SIG{ __DIE__ } = sub { Carp::confess( @_ ) }; # # List of foreground colors. This list is not complete, it just diff --git a/videosite-test.pl b/videosite-test.pl index 0d9e771..1f3d146 100755 --- a/videosite-test.pl +++ b/videosite-test.pl @@ -6,6 +6,9 @@ use File::Spec; use File::Basename; use Module::Load; use Cwd qw(realpath); +use Carp; + +$SIG{ __DIE__ } = sub { Carp::confess( @_ ) }; my $debug = 0; my %config = ( diff --git a/videosite-weechat.pl b/videosite-weechat.pl index 4693df4..9fc882b 100644 --- a/videosite-weechat.pl +++ b/videosite-weechat.pl @@ -6,6 +6,9 @@ use strict; use File::Spec; use Module::Load; use Data::Dumper; +use Carp; + +$SIG{ __DIE__ } = sub { Carp::confess( @_ ) }; weechat::register( "videosite",