File Coverage

blib/lib/Sentry/Integration.pm
Criterion Covered Total %
statement 30 30 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 0 1 0.0
total 38 39 97.4


line stmt bran cond sub pod time code
1             use Mojo::Base -base, -signatures;
2 4     4   24  
  4         9  
  4         21  
3             use Sentry::Hub;
4 4     4   1549 use Sentry::Hub::Scope;
  4         11  
  4         27  
5 4     4   103 use Sentry::Integration::DBI;
  4         7  
  4         16  
6 4     4   1553 use Sentry::Integration::DieHandler;
  4         10  
  4         31  
7 4     4   1511 use Sentry::Integration::MojoUserAgent;
  4         10  
  4         35  
8 4     4   1495 use Sentry::Integration::LwpUserAgent;
  4         10  
  4         24  
9 4     4   1500  
  4         10  
  4         26  
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             my @all_integrations = (@Global_integrations, $custom_integrations->@*);
18 17     17 0 182 foreach my $integration (grep { !$_->initialized } @all_integrations) {
  17         24  
  17         26  
  17         18  
19 17         41 $integration->setup_once(
20 17         30 Sentry::Hub::Scope->can('add_global_event_processor'),
  68         374  
21 12         149 Sentry::Hub->can('get_current_hub'));
22              
23             $integration->initialized(1);
24             }
25 12         40 }
26              
27             1;