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 'Data::OptList';
22 requires 'Devel::GlobalDestruction';
23 requires 'MRO::Compat' => '0.05';
24 requires 'Scalar::Util' => '1.18';
25 requires 'Sub::Name' => '0.04';
26 requires 'Try::Tiny' => '0.02';
27 requires 'Task::Weaken';
29 test_requires 'File::Spec';
30 test_requires 'Test::More' => '0.88';
31 test_requires 'Test::Exception' => '0.27';
35 makemaker_args( CCFLAGS => $ccflags );
38 my (@clean, @OBJECT, %XS);
40 for my $xs (<xs/*.xs>) {
41 (my $c = $xs) =~ s/\.xs$/.c/i;
42 (my $o = $xs) =~ s/\.xs$/\$(OBJ_EXT)/i;
50 (my $o = $c) =~ s/\.c$/\$(OBJ_EXT)/i;
56 clean => { FILES => join(q{ }, @clean) },
57 OBJECT => join (q{ }, @OBJECT),
68 # Use the cpan-smolder-stable script in the Moose svn root to figure
69 # out what on CPAN will break with the latest Moose, then update this
77 for my $mod ( sort keys %conflicts ) {
81 my $installed = $mod->VERSION();
82 if ( $installed le $conflicts{$mod} ) {
87 This version of Class::MOP conflicts with the version of
88 $mod ($installed) you have installed.
90 You will need to upgrade $mod after installing
91 this version of Class::MOP.
100 return unless $found;
102 # More or less copied from Module::Build
103 return if $ENV{PERL_MM_USE_DEFAULT};
104 return unless -t STDIN && ( -t STDOUT || !( -f STDOUT || -c STDOUT ) );
114 my $ret = shift->SUPER::const_cccmd(@_);
115 return q{} unless $ret;
117 if ($Config{cc} =~ /^cl\b/i) {
118 warn 'you are using MSVC... my condolences.';