~ubuntu-branches/ubuntu/dapper/libconfig-auto-perl/dapper

1 by Marc 'HE' Brockschmidt
Import upstream version 0.06
1
use ExtUtils::MakeMaker;
2
3
use strict;
4
use Getopt::Std;
5
use Data::Dumper;
6
my $opts = {};
7
getopts( 'x', $opts );
8
9
my $have_xml_simple = eval { require XML::Simple; 1; };
10
11
if( !$have_xml_simple and !$opts->{'x'} ) {
12
    warn qq[Since the 0.04 release, XML::Simple is an optional prerequisite.\n].
13
         qq[If you'd like to install Config::Auto with XML support, please\n] .
14
         qq[rerun this Makefile.PL with the '-x' option\n];
15
}
16
17
my $prereqs = {
18
    'XML::Simple'       => 0,
19
    'Config::IniFiles'  => 0,
20
};
21
delete $prereqs->{'XML::Simple'} unless $opts->{'x'};             
22
23
WriteMakefile(
24
    'NAME'		        => 'Config::Auto',
25
    'VERSION_FROM'	    => 'lib/Config/Auto.pm', # finds $VERSION
26
    'PREREQ_PM'		    => $prereqs, 
27
    ( $] >= 5.005 
28
        ? ( ABSTRACT_FROM    => 'lib/Config/Auto.pm', # retrieve abstract from module
29
            AUTHOR           => 'Jos I. Boumans <kane@cpan.org>') 
30
        : ()
31
    ),
32
);