File Coverage

blib/lib/HTML/Escape.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 17 18 94.4


line stmt bran cond sub pod time code
1             package HTML::Escape;
2 3     3   203911 use strict;
  3         23  
  3         86  
3 3     3   22 use warnings;
  3         9  
  3         66  
4 3     3   76 use 5.008005;
  3         10  
5             our $VERSION = '1.11';
6 3     3   1441 use parent qw/Exporter/;
  3         921  
  3         18  
7              
8             my $use_xs = 0;
9             if(!exists $INC{'HTML/Escape/PurePerl.pm'}) {
10             my $pp = $ENV{PERL_ONLY};
11             if (!$pp) {
12             eval {
13             require XSLoader;
14             XSLoader::load(__PACKAGE__, $VERSION);
15             $use_xs = 1;
16             };
17             }
18             if (!__PACKAGE__->can('escape_html')) {
19             ## no critic.
20             require 'HTML/Escape/PurePerl.pm' # not to create the namespace
21             }
22             }
23 2     2 0 162 sub USE_XS () { $use_xs }
24              
25             our @EXPORT = qw/escape_html/;
26              
27             1;
28             __END__