File: Makefile.PL

package info (click to toggle)
libdatetime-set-perl 0.3900-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 360 kB
  • ctags: 99
  • sloc: perl: 3,101; makefile: 2
file content (60 lines) | stat: -rw-r--r-- 2,302 bytes parent folder | download
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
use strict;

use ExtUtils::MakeMaker;
use vars qw( %conflicts $has_conflicts );

sub conflicts {
    my ( $module, $version ) = @_;
    eval "use $module";
    my $module_version = eval "\$".$module."::VERSION";
    if ( defined $module_version && $module_version < $version )
    {
        warn " * ERROR: This version of DateTime::Set conflicts with\n".
             "   installed module \"$module\" Version \"$module_version\"\n";
        $has_conflicts = 1;
    }
}

%conflicts = (
        'DateTime::Event::Recurrence' => '0.10',
        'DateTime::Event::ICal'       => '0.07',
        'DateTime::Event::Random'     => '0.03',
        'DateTime::Event::Cron'       => '0.0601',
        'DateTime::Event::Sunrise'    => '0.0501', # cvs ok; CPAN not ok
        'DateTime::Event::Chinese'    => '0',      # untested
        'DateTime::Event::Lunar'      => '0',      # untested
        'DateTime::Event::SolarTerm'  => '0',      # untested
);

$has_conflicts = 0;
for ( keys %conflicts )    
{
    conflicts ( $_, $conflicts{$_} );
}
if ( $has_conflicts )
{
    warn "ERRORS/WARNINGS FOUND IN PREREQUISITES.  You may wish to update the versions\n".
         "of the modules indicated above before proceeding with this installation.\n\n";
}

WriteMakefile( NAME         => 'DateTime::Set',
               VERSION_FROM => 'lib/DateTime/Set.pm',
               AUTHOR       => 'Flavio S. Glock <fglock@gmail.com>',
               ABSTRACT     => 'DateTime set objects',

               PREREQ_PM    => { 'DateTime' => 0.12,
                                 'Set::Infinite' => 0.59,
                                 'Test::More'  => 0,
                                 'Params::Validate' => 0,
                               },
               PL_FILES     => { },  # ignore Build.PL
               META_MERGE   => { 'meta-spec' => { version => 2 },
                                 resources => {
                                     repository => {
                                         type => 'git',
                                         url => 'https://github.com/fglock/DateTime-Set.git',
                                         web => 'https://github.com/fglock/DateTime-Set',
                                     },
                                 },
                               },
);