blib/lib/Sentry/Integration.pm untested

filter: Statementstmt 0.0% 0 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 33 CC 1 SCAR 6.9
CC
1
Cov
0%
_add_global_event_processor
2.0
setup
2.0
BEGIN
2.0
CRAP 2.0
1 package Sentry::Integration;
2 use Mojo::Base -base, -signatures;
3  
4 use Sentry::Hub;
5 use Sentry::Integration::DBI;
6 use Sentry::Integration::DieHandler;
7 use Sentry::Integration::MojoUserAgent;
8 use Sentry::Integration::LwpUserAgent;
9  
10 my @Global_integrations = (
11 Sentry::Integration::DieHandler->new,
12 Sentry::Integration::DBI->new,
13 Sentry::Integration::MojoUserAgent->new,
14 Sentry::Integration::LwpUserAgent->new,
15 );
16  
17 sub _add_global_event_processor ($cb) {
18 Sentry::Hub->get_current_scope->add_event_processor($cb);
19 }
20  
21 sub setup ($package, $custom_integrations = []) {
22 my @all_integrations = (@Global_integrations, $custom_integrations->@*);
23 foreach my $integration (@all_integrations) {
24 $integration->setup_once(
25 Sentry::Integration->can('_add_global_event_processor'),
26 Sentry::Hub->can('get_current_hub'));
27 }
28 }
29  
30 1;