[Bps-public-commit] r18738 - in Carp-REPL: lib/Carp

sartak at bestpractical.com sartak at bestpractical.com
Sat Mar 7 03:36:35 EST 2009


Author: sartak
Date: Sat Mar  7 03:36:35 2009
New Revision: 18738

Modified:
   Carp-REPL/   (props changed)
   Carp-REPL/lib/Carp/REPL.pm

Log:
 r81033 at onn:  sartak | 2009-03-07 03:36:19 -0500
 Passing in an explicit undef to repl will silence the stacktrace


Modified: Carp-REPL/lib/Carp/REPL.pm
==============================================================================
--- Carp-REPL/lib/Carp/REPL.pm	(original)
+++ Carp-REPL/lib/Carp/REPL.pm	Sat Mar  7 03:36:35 2009
@@ -35,7 +35,9 @@
 }
 
 sub repl {
-    warn @_, "\n"; # tell the user what blew up
+    my $quiet = @_ && !defined($_[0]);
+
+    warn @_, "\n" unless $quiet; # tell the user what blew up
 
     require Devel::REPL::Script;
 
@@ -50,7 +52,7 @@
 
     $repl->load_plugin('Carp::REPL');
 
-    warn $repl->stacktrace;
+    warn $repl->stacktrace unless $quiet;
 
     $runner->run;
 }



More information about the Bps-public-commit mailing list