File Coverage

blib/lib/HTML/Blitz/pragma.pm
Criterion Covered Total %
statement 32 33 96.9
branch 1 2 50.0
condition n/a
subroutine 8 8 100.0
pod n/a
total 41 43 95.3


line stmt bran cond sub pod time code
1             # This code can be redistributed and modified under the terms of the GNU
2             # General Public License as published by the Free Software Foundation, either
3             # version 3 of the License, or (at your option) any later version.
4             # See the "COPYING" file for details.
5             package HTML::Blitz::pragma 0.1001;
6 11     11   106 use strict;
  11         68  
  11         628  
7 11     11   71 use warnings qw(all FATAL uninitialized);
  11         28  
  11         1189  
8             use constant {
9 11         1498 PERL_VERSION => '5.20',
10             _HAVE_PERL_5_24 => $^V ge v5.24.0,
11             _HAVE_PERL_5_32 => $^V ge v5.32.0,
12 11     11   71 };
  11         69  
13 11     11   120 use feature ':' . PERL_VERSION;
  11         25  
  11         3683  
14 11     11   96 no if _HAVE_PERL_5_32, feature => 'indirect';
  11         20  
  11         1094  
15 11     11   9777 use Function::Parameters 2;
  11         90135  
  11         70  
16              
17 11     11   6798 use Carp ();
  11         48  
  11         3177  
18              
19 132 50   132   587 method import($class: @items) {
  132         306  
  132         325  
  132         211  
20 132         386 for my $item (@items) {
21 0         0 Carp::croak qq("$item" is not exported by the $class module);
22             }
23              
24 132         1088 strict->import;
25 132         6579 warnings->import(qw(all FATAL uninitialized));
26 132         305 warnings->unimport(qw(experimental::postderef)) unless _HAVE_PERL_5_24;
27 132         20581 feature->import(':' . PERL_VERSION, 'postderef');
28 132         1718 feature->unimport('indirect') if _HAVE_PERL_5_32;
29 132         894 Function::Parameters->import;
30             }
31              
32             1