Remove extra use of check_conflicts
[gitmo/Class-MOP.git] / Makefile.PL
CommitLineData
591a9381 1use strict;
2use warnings;
89dc39a9 3use inc::Module::Install;
4use 5.008001;
5
89dc39a9 6name 'Class-MOP';
7perl_version '5.008001';
8all_from 'lib/Class/MOP.pm';
9license 'perl';
591a9381 10
3f3e009e 11my %conflicts = (
12 'Moose' => '1.04',
13);
14
15check_conflicts(%conflicts);
16
72bc0a47 17require Config;
18my $ccflags = ( $Config::Config{ccflags} || '' ) . ' -I.';
06e9254b 19
20if ( -d '.git' || $ENV{MAINTAINER_MODE} ) {
21 $ccflags .= ' -Wall -Wdeclaration-after-statement';
22}
f125b31e 23
89dc39a9 24requires 'Carp';
4154c4d0 25requires 'Data::OptList';
89dc39a9 26requires 'Devel::GlobalDestruction';
50de028e 27requires 'List::MoreUtils' => '0.12';
d065fbe6 28requires 'MRO::Compat' => '0.05';
2ea94f58 29requires 'Package::DeprecationManager' => '0.04';
407a4276 30requires 'Package::Stash';
d065fbe6 31requires 'Scalar::Util' => '1.18';
32requires 'Sub::Name' => '0.04';
a8344505 33requires 'Try::Tiny' => '0.02';
89dc39a9 34requires 'Task::Weaken';
35
36test_requires 'File::Spec';
7975280a 37test_requires 'Test::More' => '0.88';
4cd537dd 38test_requires 'Test::Exception' => '0.27';
89dc39a9 39
8c463274 40repository 'git://git.moose.perl.org/Class-MOP.git';
6b951296 41add_metadata(x_authority => 'cpan:STEVAN');
8c463274 42
3fd3a2ab 43extra_tests();
44
89dc39a9 45makemaker_args( CCFLAGS => $ccflags );
46
d846ade3 47{
48 my (@clean, @OBJECT, %XS);
49
50 for my $xs (<xs/*.xs>) {
51 (my $c = $xs) =~ s/\.xs$/.c/i;
52 (my $o = $xs) =~ s/\.xs$/\$(OBJ_EXT)/i;
53
54 $XS{$xs} = $c;
55 push @OBJECT, $o;
56 push @clean, $o;
57 }
58
59 for my $c (<*.c>) {
60 (my $o = $c) =~ s/\.c$/\$(OBJ_EXT)/i;
61 push @OBJECT, $o;
62 push @clean, $o;
63 }
64
65 makemaker_args(
66 clean => { FILES => join(q{ }, @clean) },
67 OBJECT => join (q{ }, @OBJECT),
68 XS => \%XS,
69 );
70}
71
8a9fe086 72postamble(<<'EOM');
73$(OBJECT) : mop.h
74EOM
75
89dc39a9 76WriteAll();
77
d846ade3 78package MY;
79
80use Config;
81
82sub const_cccmd {
83 my $ret = shift->SUPER::const_cccmd(@_);
84 return q{} unless $ret;
85
86 if ($Config{cc} =~ /^cl\b/i) {
87 warn 'you are using MSVC... my condolences.';
88 $ret .= ' /Fo$@';
89 }
90 else {
91 $ret .= ' -o $@';
92 }
93
94 return $ret;
95}