From c0c56062eef5ffb6405551db19e758e7765b40f3 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 8 Jun 2013 14:31:44 -0500 Subject: initial implementation --- lib/Carp/Reply.pm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'lib/Carp') 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; -- cgit v1.2.3-54-g00ecf