File Coverage

lib/Perlmazing.pm
Criterion Covered Total %
statement 33 34 97.0
branch 10 12 83.3
condition 2 3 66.6
subroutine 5 5 100.0
pod n/a
total 50 54 92.5


line stmt bran cond sub pod time code
1             package Perlmazing;
2 31     31   2265546 use Perlmazing::Engine;
  31         95  
  31         209  
3 31     31   168462 use Perlmazing::Engine::Exporter;
  31         76  
  31         205  
4 31     31   193 use Perlmazing::Feature;
  31         53  
  31         231  
5             our $VERSION = '1.2816';
6             our @EXPORT;
7             our @found_symbols = Perlmazing::Engine->found_symbols;
8            
9             Perlmazing::Engine->precompile;
10            
11             Perlmazing::Engine->preload(
12             qw(
13            
14             )
15             );
16            
17 31     31   223 no warnings 'redefine';
  31         59  
  31         13029  
18             sub import {
19 1341     1341   2983 my $self = shift;
20 1341         4741 my @call = caller;
21 1341         6964 Perlmazing::Feature->import;
22 1341         30134 warnings->import(FATAL => qw(closed unopened numeric recursion syntax uninitialized));
23 1341 100       3814 if (@_) {
24 2         17 @EXPORT = ();
25 2         4 my (@YES, @NO);
26 2         6 for my $i (@_) {
27 2 100       13 if ($i =~ /^!(.*?)$/) {
28 1         4 push @NO, $1;
29             } else {
30 1         4 push @YES, $i;
31             }
32             }
33 2         5 for my $i (@YES, @NO) {
34 2 50       5 croak "Symbol '$i' is not exported by the Perlmazing module" unless grep {$i eq $_} @found_symbols;
  214         261  
35             }
36 2 50 66     14 if (@YES and @NO) {
    100          
37 0         0 @EXPORT = @YES;
38             } elsif (@YES) {
39 1         3 @EXPORT = @YES;
40             } else {
41 1         3 for my $i (@found_symbols) {
42 107 100       108 push (@EXPORT, $i) unless grep {$_ eq $i} @NO;
  107         211  
43             }
44             }
45             } else {
46 1339         23161 @EXPORT = @found_symbols;
47             }
48 1341         4916 $self->SUPER::import;
49             }
50            
51             1;
52            
53             __END__