diff options
Diffstat (limited to 'lib/Carp/Reply.pm')
-rw-r--r-- | lib/Carp/Reply.pm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/Carp/Reply.pm b/lib/Carp/Reply.pm index e69de29..5d8a6aa 100644 --- a/lib/Carp/Reply.pm +++ b/lib/Carp/Reply.pm @@ -0,0 +1,24 @@ +package Carp::Reply; +use strict; +use warnings; +# ABSTRACT: get a repl on exceptions in your program + +use Reply; +use Reply::Config; + +sub import { + my $package = shift; + + $SIG{__DIE__} = sub { print $_[0]; repl() }; +} + +sub repl { + my $repl = Reply->new( + config => Reply::Config->new, + plugins => ['CarpReply'] + ); + $repl->run_one('#bt'); + $repl->run; +} + +1; |