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   146 use strict;
  12         28  
  12         400  
7 12     12   65 use warnings qw(all FATAL uninitialized);
  12         25  
  12         838  
8             use constant {
9 12         1096 PERL_VERSION => '5.20',
10             _HAVE_PERL_5_32 => $^V ge v5.32.0,
11 12     12   89 };
  12         24  
12 12     12   91 use feature ':' . PERL_VERSION;
  12         26  
  12         2019  
13 12     12   8516 no if _HAVE_PERL_5_32, feature => 'indirect';
  12         169  
  12         64  
14 12     12   8085 use Function::Parameters 2;
  12         51717  
  12         67  
15              
16 12     12   5367 use Carp ();
  12         28  
  12         2214  
17              
18             our $VERSION = '0.09';
19              
20 134 50   134   491 method import($class: @items) {
  134         268  
  134         285  
  134         183  
21 134         308 for my $item (@items) {
22 0         0 Carp::croak qq("$item" is not exported by the $class module);
23             }
24              
25 134         899 strict->import;
26 134         2268 warnings->import(qw(all FATAL uninitialized));
27 134         8378 feature->import(':' . PERL_VERSION);
28 134         332 feature->unimport('indirect') if _HAVE_PERL_5_32;
29 134         659 Function::Parameters->import;
30             }
31              
32             1