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 50     50   3468020 use Perlmazing::Engine;
  50         188  
  50         356  
3 50     50   193343 use Perlmazing::Engine::Exporter;
  50         127  
  50         335  
4 50     50   355 use Perlmazing::Feature;
  50         86  
  50         368  
5             our $VERSION = '1.2814';
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 50     50   350 no warnings 'redefine';
  50         127  
  50         21593  
18             sub import {
19 2018     2018   4184 my $self = shift;
20 2018         6301 my @call = caller;
21 2018         9308 Perlmazing::Feature->import;
22 2018         40273 warnings->import(FATAL => qw(closed unopened numeric recursion syntax uninitialized));
23 2018 100       5374 if (@_) {
24 2         13 @EXPORT = ();
25 2         6 my (@YES, @NO);
26 2         7 for my $i (@_) {
27 2 100       11 if ($i =~ /^!(.*?)$/) {
28 1         5 push @NO, $1;
29             } else {
30 1         3 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;
  184         271  
35             }
36 2 50 66     18 if (@YES and @NO) {
    100          
37 0         0 @EXPORT = @YES;
38             } elsif (@YES) {
39 1         4 @EXPORT = @YES;
40             } else {
41 1         4 for my $i (@found_symbols) {
42 92 100       94 push (@EXPORT, $i) unless grep {$_ eq $i} @NO;
  92         177  
43             }
44             }
45             } else {
46 2016         27695 @EXPORT = @found_symbols;
47             }
48 2018         6400 $self->SUPER::import;
49             }
50            
51             1;
52            
53             __END__