[Bps-public-commit] r15034 - in Carp-REPL: . lib/Carp
sartak at bestpractical.com
sartak at bestpractical.com
Tue Aug 12 06:49:28 EDT 2008
Author: sartak
Date: Tue Aug 12 06:49:21 2008
New Revision: 15034
Modified:
Carp-REPL/ (props changed)
Carp-REPL/lib/Carp/REPL.pm
Carp-REPL/lib/Devel/REPL/Plugin/Carp/REPL.pm
Log:
r69328 at onn: sartak | 2008-08-12 06:44:28 -0400
Re-allow skipping of the bottom stack frames (which is useful in the test-failure repl)
Modified: Carp-REPL/lib/Carp/REPL.pm
==============================================================================
--- Carp-REPL/lib/Carp/REPL.pm (original)
+++ Carp-REPL/lib/Carp/REPL.pm Tue Aug 12 06:49:21 2008
@@ -27,7 +27,7 @@
*Test::Builder::ok = sub {
local $Test::Builder::Level = $Test::Builder::Level + 1;
my $passed = $ok->(@_);
- $bottom_frame = $Test::Builder::Level;
+ local $bottom_frame = $Test::Builder::Level;
repl("Test failure") if !$passed;
return $passed;
};
Modified: Carp-REPL/lib/Devel/REPL/Plugin/Carp/REPL.pm
==============================================================================
--- Carp-REPL/lib/Devel/REPL/Plugin/Carp/REPL.pm (original)
+++ Carp-REPL/lib/Devel/REPL/Plugin/Carp/REPL.pm Tue Aug 12 06:49:21 2008
@@ -24,6 +24,10 @@
until @{ $stacktrace->{raw} } == 0
|| $stacktrace->{raw}[0]{caller}[3] eq 'Carp::REPL::repl';
+ shift @{ $stacktrace->{raw} }
+ until @{ $stacktrace->{raw} } == 0
+ || $Carp::REPL::bottom_frame-- <= 0;
+
return $stacktrace;
},
);
More information about the Bps-public-commit
mailing list