File Coverage

blib/lib/Search/Elasticsearch/Role/Is_Async/Loader.pm
Criterion Covered Total %
statement 13 13 100.0
branch 1 2 50.0
condition n/a
subroutine 4 4 100.0
pod n/a
total 18 19 94.7


line stmt bran cond sub pod time code
1             package
2             Search::Elasticsearch::Role::Is_Async::Loader; # Hidden.
3              
4             # Loads fake Search::Elasticsearch::Role::Is_Async module if distro
5             # Search::Elasticsearch::Async not installed.
6              
7 7     7   26762 use strictures;
  7         748  
  7         49  
8              
9 7     7   571 use Module::Runtime qw(require_module);
  7         17  
  7         52  
10              
11 7     7   6847 use namespace::clean;
  7         114250  
  7         51  
12              
13              
14             BEGIN {
15 7     7   1464 eval {
16 7         48 require_module('Search::Elasticsearch::Role::Is_Async');
17             };
18 7 50       3745 if ($@) {
19 7         31 require_module('Search::Elasticsearch::Role::Is_Async::Fake');
20             }
21             }
22              
23              
24             1;