File: Makefile.PL

package info (click to toggle)
libmarc-charset-perl 0.95-1etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 2,444 kB
  • ctags: 75
  • sloc: xml: 98,939; perl: 612; makefile: 52
file content (35 lines) | stat: -rw-r--r-- 1,066 bytes parent folder | download | duplicates (3)
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
34
35
use 5.8.0;
use ExtUtils::MakeMaker;

# try to build the character mapping db
build_db();

WriteMakefile(
    NAME            => 'MARC::Charset',
    DISTNAME        => 'MARC-Charset',
    VERSION_FROM    => 'lib/MARC/Charset.pm',
    ABSTRACT_FROM   => 'lib/MARC/Charset.pm',
    AUTHOR          => 'Ed Summers <ehs@pobox.com>',
    PMLIBDIRS       => ['lib'],
    PREREQ_FATAL    => 1,
    PREREQ_PM       => {
                            'Test::More'            => 0, 
                            'XML::SAX'              => 0,
                            'Class::Accessor'       => 0,
                            'Unicode::Normalize'    => 0,
                       },
);

# build_db will return immediately if we can't use
# MARC::Charset::Compiler which will typically 
# happen when dependencies aren't met

sub build_db
{
    eval('use lib "lib"; use MARC::Charset::Compiler');
    return if $@;

    print "compiling marc8/utf8 database, please be patient\n";
    my $compiler = MARC::Charset::Compiler->new();
    $compiler->compile('etc/codetables.xml');
}