check_optional_modules

filter: Statementstmt 28.5% 4 / 14 Branchbran 10.0% 1 / 10 Conditioncond 0.0% 0 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 18.1% 6 / 33 CC 1 SCAR 0.0
CC
1
Cov
17%
BEGIN
1.0
CRAP 1.0
« tools/xml_split/xml_split ↑ Summary filter_for_5.005 »
1 #!/bin/perl -w
2  
3 # $Id: /xmltwig/trunk/check_optional_modules 4 2007-03-16T12:16:25.259192Z mrodrigu $
4  
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶exit if( $] >= 5.008);
Branch: 1 branch
BranchTrueFalseTotal
if $] >= "5.008" 1 0 1
8  
9 0 ▶if( $] >= 5.0060)
Branch: 1 branch
BranchTrueFalseTotal
if ($] >= "5.006") 0 0 0
10 0 ▶{ unless( eval 'require Scalar::Util' or eval 'require WeakRef' )
Branch: 1 branch
BranchTrueFalseTotal
if (eval 'require Scalar::Util' or eval 'require WeakRef') { } 0 0 0
Condition0%0/3
eval "require Scalar::Util" or eval "require WeakRef"
l!l&&r!l&&!r
000
MC/DC0%0/2
eval "require Scalar::Util" or eval "require WeakRef"
eval "require Scalar::Util" eval "require WeakRef"
Truth table0%0/3
A or B
A= eval "require Scalar::Util"B= eval "require WeakRef"
ABresult
1X1
011
000
11 0 { warn "Neither Scalar::Util nor WeakRef is installed. ",
12 "Installing one of these modules would improve ",
13 "XML::Twig memory management and eliminate memory ",
14 "leaks when re-using twigs.\n";
15 }
16 else
17 0 { warn "weaken is available\n"; }
18 }
19  
20 0 ▶unless( eval 'require Text::Iconv')
Branch: 1 branch
BranchTrueFalseTotal
if (eval 'require Text::Iconv') { } 0 0 0
21 0 ▶ { my $version= `iconv -V` || '';
Condition0%0/2
`iconv -V` || ''
l!l
00
MC/DC0%0/1
`iconv -V` || ''
`iconv -V`
Truth table0%0/2
A
A= `iconv -V`
Aresult
11
00
22 0 ▶ if($version)
Branch: 1 branch
BranchTrueFalseTotal
if ($version) { } 0 0 0
23 0 { warn "The iconv library was found on your system ",
24 "but the Text::Iconv module is not installed. ",
25 "Installing Text::Iconv would make character ",
26 "encoding translations fast and efficient.\n";
27 }
28 else
29 0 { warn "Did not find iconv\n"; }
30 }
31 else
32 0 { warn "Text::Iconv is installed\n"; }
33  
« tools/xml_split/xml_split ↑ Summary filter_for_5.005 »