blib/lib/HTML/Escape.pm

filter: Statementstmt 100% 25 / 25 Branchbran 83.3% 5 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 94.5% 35 / 37 CC 1 SCAR 0.0
CC
1
Cov
97%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/HTML/Escape.xs ↑ Summary
1 package HTML::Escape;
2 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use 5.008005;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 our $VERSION = '1.11';
6 3 ▶use parent qw/Exporter/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 3 my $use_xs = 0;
9 3 ▶if(!exists $INC{'HTML/Escape/PurePerl.pm'}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $INC{"HTML/Escape/PurePerl.pm"}) 3 0 3
10 3 my $pp = $ENV{PERL_ONLY};
11 3 ▶ if (!$pp) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($pp) 2 1 3
12 2 eval {
13 2 require XSLoader;
14 2 XSLoader::load(__PACKAGE__, $VERSION);
15 2 $use_xs = 1;
16 };
17 }
18 3 ▶ if (!__PACKAGE__->can('escape_html')) {
Branch: 1 branch
BranchTrueFalseTotal
unless (__PACKAGE__->can("escape_html")) 1 2 3
19 ## no critic.
20 1 require 'HTML/Escape/PurePerl.pm' # not to create the namespace
21 }
22 }
23 2 ▶sub USE_XS () { $use_xs }
Subroutine USE_XS: called CC=1 SCAR=0.0
Pod undocumented
24  
25 3 our @EXPORT = qw/escape_html/;
26  
27 3 1;
28 __END__
« lib/HTML/Escape.xs ↑ Summary