summaryrefslogtreecommitdiffstats
path: root/lib/Carp/Reply.pm
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-06-08 14:31:44 -0500
committerJesse Luehrs <doy@tozt.net>2013-06-08 14:32:40 -0500
commitc0c56062eef5ffb6405551db19e758e7765b40f3 (patch)
tree8a5d0684e12e9efaf14bb446868f47e9330cad3c /lib/Carp/Reply.pm
parent9956d5cf863085884c991edfc404a3f5c0f50c4a (diff)
downloadcarp-reply-c0c56062eef5ffb6405551db19e758e7765b40f3.tar.gz
carp-reply-c0c56062eef5ffb6405551db19e758e7765b40f3.zip
initial implementation
Diffstat (limited to 'lib/Carp/Reply.pm')
-rw-r--r--lib/Carp/Reply.pm24
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;