blib/lib/Sentry/Stacktrace.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 23 CC 1 SCAR 6.9
CC
1
Cov
0%
prepare_frames
2.0
TO_JSON
2.0
BEGIN
2.0
CRAP 2.0
1 package Sentry::Stacktrace;
2 use Mojo::Base -base, -signatures;
3  
4 use Sentry::Stacktrace::Frame;
5  
6 has exception => undef;
7  
8 has frame_filter => sub {
9 sub {0}
10 };
11  
12 has frames => sub ($self) { return $self->prepare_frames() };
13  
14 sub prepare_frames ($self) {
15 my @frames = reverse map { Sentry::Stacktrace::Frame->from_caller($_->@*) }
16 $self->exception->frames->@*;
17  
18 return [grep { $self->frame_filter->($_) } @frames];
19 }
20  
21 sub TO_JSON ($self) {
22 return { frames => $self->frames };
23 }
24  
25 1;