~ubuntu-branches/ubuntu/vivid/libfile-listing-perl/vivid

« back to all changes in this revision

Viewing changes to Makefile.PL

  • Committer: Bazaar Package Importer
  • Author(s): Nicholas Bamber
  • Date: 2011-03-13 19:18:12 UTC
  • Revision ID: james.westby@ubuntu.com-20110313191812-woji20h8nebotfwj
Tags: upstream-6.01
ImportĀ upstreamĀ versionĀ 6.01

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!perl -w
 
2
 
 
3
require 5.008008;
 
4
use strict;
 
5
use ExtUtils::MakeMaker;
 
6
WriteMakefile(
 
7
    NAME => 'File::Listing',
 
8
    VERSION_FROM => 'lib/File/Listing.pm',
 
9
    ABSTRACT_FROM => 'lib/File/Listing.pm',
 
10
    AUTHOR => 'Gisle Aas <gisle@activestate.com>',
 
11
    LICENSE => "perl",
 
12
    MIN_PERL_VERSION => 5.008008,
 
13
    PREREQ_PM => {
 
14
        'HTTP::Date' => 6,
 
15
    },
 
16
    META_MERGE => {
 
17
        resources => {
 
18
            repository => 'http://github.com/gisle/libwww-perl/tree/File-Listing/master',
 
19
            MailingList => 'mailto:libwww@perl.org',
 
20
        }
 
21
    },
 
22
);
 
23
 
 
24
 
 
25
BEGIN {
 
26
    # compatibility with older versions of MakeMaker
 
27
    my $developer = -f ".gitignore";
 
28
    my %mm_req = (
 
29
        LICENCE => 6.31,
 
30
        META_MERGE => 6.45,
 
31
        META_ADD => 6.45,
 
32
        MIN_PERL_VERSION => 6.48,
 
33
    );
 
34
    undef(*WriteMakefile);
 
35
    *WriteMakefile = sub {
 
36
        my %arg = @_;
 
37
        for (keys %mm_req) {
 
38
            unless (eval { ExtUtils::MakeMaker->VERSION($mm_req{$_}) }) {
 
39
                warn "$_ $@" if $developer;
 
40
                delete $arg{$_};
 
41
            }
 
42
        }
 
43
        ExtUtils::MakeMaker::WriteMakefile(%arg);
 
44
    };
 
45
}