3 use inc::Module::Install;
9 perl_version '5.008001';
10 all_from 'lib/Class/MOP.pm';
14 my $ccflags = ( $Config::Config{ccflags} || '' ) . ' -I.';
15 $ccflags .= ' -Wall' if -d '.svn' || -d '.git' || $ENV{MAINTAINER_MODE};
18 requires 'Devel::GlobalDestruction';
19 requires 'MRO::Compat' => '0.05';
20 requires 'Scalar::Util' => '1.18';
21 requires 'Sub::Name' => '0.04';
22 requires 'Task::Weaken';
24 test_requires 'File::Spec';
25 test_requires 'Test::More' => '0.88';
26 test_requires 'Test::Exception' => '0.27';
28 install_headers('mop.h');
32 makemaker_args( CCFLAGS => $ccflags );
35 my (@clean, @OBJECT, %XS);
37 for my $xs (<xs/*.xs>) {
38 (my $c = $xs) =~ s/\.xs$/.c/i;
39 (my $o = $xs) =~ s/\.xs$/\$(OBJ_EXT)/i;
47 (my $o = $c) =~ s/\.c$/\$(OBJ_EXT)/i;
53 clean => { FILES => join(q{ }, @clean) },
54 OBJECT => join (q{ }, @OBJECT),
65 # Use the cpan-smolder-stable script in the Moose svn root to figure
66 # out what on CPAN will break with the latest Moose, then update this
74 for my $mod ( sort keys %conflicts ) {
78 my $installed = $mod->VERSION();
79 if ( $installed le $conflicts{$mod} ) {
84 This version of Class::MOP conflicts with the version of
85 $mod ($installed) you have installed.
87 You will need to upgrade $mod after installing
88 this version of Class::MOP.
99 # More or less copied from Module::Build
100 return if $ENV{PERL_MM_USE_DEFAULT};
101 return unless -t STDIN && ( -t STDOUT || !( -f STDOUT || -c STDOUT ) );
111 my $ret = shift->SUPER::const_cccmd(@_);
112 return q{} unless $ret;
114 if ($Config{cc} =~ /^cl\b/i) {
115 warn 'you are using MSVC... my condolences.';