File Coverage

blib/lib/any.pm
Criterion Covered Total %
statement 22 25 88.0
branch 0 6 0.0
condition n/a
subroutine 6 6 100.0
pod n/a
total 28 37 75.6


line stmt bran cond sub pod time code
1             package any;
2              
3 1     1   23781 use strict;
  1         2  
  1         1969  
4 1     1   9 use warnings;
  1         1  
  1         45  
5              
6 1     1   6 use Carp;
  1         5  
  1         100  
7 1     1   987 use version;our $VERSION = qv('0.0.1');
  1         2459  
  1         6  
8              
9             our @module;
10             our $failed = {};
11              
12             sub import {
13 1     1   18 shift;
14 1         2 local $UNIVERSAL::Level = $UNIVERSAL::Level + 1;
15 1         6 local $Carp::CarpLevel = $Carp::CarpLevel + 1;
16              
17 1 0       2 my @flags = map { $_ if $_ ne '-croak' } grep(/^-/, @_);
  0         0  
18 1         2 @module = ();
19 1         2 $failed = {};
20            
21 1         15 for my $mod (grep(!/^-/, @_)) {
22 1     1   1184 use first $mod, @flags;
  1         2252  
  1         7  
23 0 0         push @module, $first::module if $first::module;
24 0 0         $failed->{ $mod } = $first::failed->{ $mod } if exists $first::failed->{ $mod };
25             }
26             }
27              
28             1;
29              
30             __END__