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 ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines)
18 sub _add_global_event_processor ($cb) {
19 Sentry::Hub->get_current_scope->add_event_processor($cb);
20 }
21  
22 sub setup ($package, $custom_integrations = []) {
23 my @all_integrations = (@Global_integrations, $custom_integrations->@*);
24 foreach my $integration (@all_integrations) {
25 $integration->setup_once(
26 Sentry::Integration->can('_add_global_event_processor'),
27 Sentry::Hub->can('get_current_hub'));
28 }
29 }
30  
31 1;