| 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
| |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 0 | ▶ | if( $] >= 5.0060) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 10 | 0 | ▶ | { unless( eval 'require Scalar::Util' or eval 'require WeakRef' ) | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
eval "require Scalar::Util" or eval "require WeakRef"
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"
| |||||||||||||||||||||||||||||
| 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
| |||||||||||||||||||||||||||||
| 21 | 0 | ▶ | { my $version= `iconv -V` || ''; | ||||||||||||||||||||||||||
|
Condition0%0/2
`iconv -V` || ''
MC/DC0%0/1
`iconv -V` || ''
`iconv -V`
Truth table0%0/2
A
A= `iconv -V`
| |||||||||||||||||||||||||||||
| 22 | 0 | ▶ | if($version) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | |||||||||||||||||||||||||||||