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

« back to all changes in this revision

Viewing changes to Makefile.PL

  • Committer: Bazaar Package Importer
  • Author(s): Marc 'HE' Brockschmidt
  • Date: 2004-02-26 16:08:21 UTC
  • Revision ID: james.westby@ubuntu.com-20040226160821-opxbtt3gb2bylksh
Tags: upstream-0.06
ImportĀ upstreamĀ versionĀ 0.06

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
);