File Coverage

blib/lib/HTML/Blitz/pragma.pm
Criterion Covered Total %
statement 31 32 96.8
branch 1 2 50.0
condition n/a
subroutine 8 8 100.0
pod n/a
total 40 42 95.2


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;
6 12     12   154 use strict;
  12         26  
  12         400  
7 12     12   68 use warnings qw(all FATAL uninitialized);
  12         27  
  12         882  
8             use constant {
9 12         1148 PERL_VERSION => '5.20',
10             _HAVE_PERL_5_32 => $^V ge v5.32.0,
11 12     12   102 };
  12         22  
12 12     12   89 use feature ':' . PERL_VERSION;
  12         26  
  12         2069  
13 12     12   8519 no if _HAVE_PERL_5_32, feature => 'indirect';
  12         166  
  12         92  
14 12     12   8150 use Function::Parameters 2;
  12         52381  
  12         98  
15              
16 12     12   5316 use Carp ();
  12         27  
  12         2302  
17              
18             our $VERSION = '0.08';
19              
20 134 50   134   492 method import($class: @items) {
  134         329  
  134         281  
  134         180  
21 134         313 for my $item (@items) {
22 0         0 Carp::croak qq("$item" is not exported by the $class module);
23             }
24              
25 134         876 strict->import;
26 134         2208 warnings->import(qw(all FATAL uninitialized));
27 134         7979 feature->import(':' . PERL_VERSION);
28 134         325 feature->unimport('indirect') if _HAVE_PERL_5_32;
29 134         629 Function::Parameters->import;
30             }
31              
32             1