3 use inc::Module::Install;
9 perl_version '5.008001';
10 all_from 'lib/Class/MOP.pm';
14 my $ccflags = ( $Config::Config{ccflags} || '' ) . ' -I.';
16 if ( -d '.git' || $ENV{MAINTAINER_MODE} ) {
17 $ccflags .= ' -Wall -Wdeclaration-after-statement';
21 requires 'Devel::GlobalDestruction';
22 requires 'MRO::Compat' => '0.05';
23 requires 'Scalar::Util' => '1.18';
24 requires 'Sub::Name' => '0.04';
25 requires 'Try::Tiny' => '0.02';
26 requires 'Task::Weaken';
28 test_requires 'File::Spec';
29 test_requires 'Test::More' => '0.88';
30 test_requires 'Test::Exception' => '0.27';
34 makemaker_args( CCFLAGS => $ccflags );
37 my (@clean, @OBJECT, %XS);
39 for my $xs (<xs/*.xs>) {
40 (my $c = $xs) =~ s/\.xs$/.c/i;
41 (my $o = $xs) =~ s/\.xs$/\$(OBJ_EXT)/i;
49 (my $o = $c) =~ s/\.c$/\$(OBJ_EXT)/i;
55 clean => { FILES => join(q{ }, @clean) },
56 OBJECT => join (q{ }, @OBJECT),
67 # Use the cpan-smolder-stable script in the Moose svn root to figure
68 # out what on CPAN will break with the latest Moose, then update this
76 for my $mod ( sort keys %conflicts ) {
80 my $installed = $mod->VERSION();
81 if ( $installed le $conflicts{$mod} ) {
86 This version of Class::MOP conflicts with the version of
87 $mod ($installed) you have installed.
89 You will need to upgrade $mod after installing
90 this version of Class::MOP.
101 # More or less copied from Module::Build
102 return if $ENV{PERL_MM_USE_DEFAULT};
103 return unless -t STDIN && ( -t STDOUT || !( -f STDOUT || -c STDOUT ) );
113 my $ret = shift->SUPER::const_cccmd(@_);
114 return q{} unless $ret;
116 if ($Config{cc} =~ /^cl\b/i) {
117 warn 'you are using MSVC... my condolences.';