Permalink
Browse files

Make the tests pass with Devel::StackTrace 1.21.

  • Loading branch information...
1 parent 6f15f06 commit 8357b56bfe346275711f21c599f4b35bb835d1de @rafl rafl committed Jul 9, 2009
Showing with 11 additions and 7 deletions.
  1. +1 −1 dist.ini
  2. +10 −6 lib/Throwable/Error.pm
View
@@ -8,5 +8,5 @@ copyright_holder = Ricardo SIGNES
[Prereq]
Moose = 0.74 ; duck_type
-Devel::StackTrace = 1.20_0001 ; not a real version, waiting on next release
+Devel::StackTrace = 1.21 ; frame_filter
View
@@ -119,14 +119,18 @@ sub _build_stack_trace_class {
sub _build_stack_trace_args {
my ($self) = @_;
my $found_mark = 0;
- my $uplevel = 4; # number of *raw* frames to go up after we found the marker
+ my $uplevel = 3; # number of *raw* frames to go up after we found the marker
return [
- ignore_class => [ __PACKAGE__ ],
- find_start_frame => sub {
+ frame_filter => sub {
my ($raw) = @_;
- $found_mark ||= scalar $raw->{caller}->[3] =~ /__stack_marker$/;
- return 0 unless $found_mark;
- return !$uplevel--;
+ if ($found_mark) {
+ return 1 unless $uplevel;
+ return !$uplevel--;
+ }
+ else {
+ $found_mark = scalar $raw->{caller}->[3] =~ /__stack_marker$/;
+ return 0;
+ }
},
];
}

0 comments on commit 8357b56

Please sign in to comment.