File: check_optional_modules

package info (click to toggle)
libxml-twig-perl 1:3.32-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,988 kB
  • ctags: 806
  • sloc: perl: 17,411; xml: 202; makefile: 18
file content (33 lines) | stat: -rw-r--r-- 969 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/perl -w

# $Id: /xmltwig/trunk/check_optional_modules 4 2007-03-16T12:16:25.259192Z mrodrigu  $

use strict;

exit if( $] >= 5.008);

if( $] >=  5.0060)
{ unless( eval 'require Scalar::Util' or eval 'require WeakRef' )
      { warn "Neither Scalar::Util  nor WeakRef is  installed. ",
             "Installing  one of these modules  would  improve ",
             "XML::Twig memory management and eliminate memory ",
             "leaks when re-using twigs.\n";
      }
    else
      { warn "weaken is available\n"; }
  }

unless( eval 'require Text::Iconv')
  { my $version= `iconv -V` || '';
    if($version)
      { warn "The iconv library was found on your system ",
             "but the Text::Iconv module is not installed. ",
             "Installing Text::Iconv would make character ",
             "encoding translations fast and efficient.\n";
      }
    else
      { warn "Did not find iconv\n"; }
  }
else
  { warn "Text::Iconv is installed\n"; }