3 use inc::Module::Install;
4 use Module::Install::AuthorRequires;
5 use Module::Install::ExtraTests;
11 perl_version '5.008001';
12 all_from 'lib/Class/MOP.pm';
16 my $ccflags = ( $Config::Config{ccflags} || '' ) . ' -I.';
18 if ( -d '.git' || $ENV{MAINTAINER_MODE} ) {
19 $ccflags .= ' -Wall -Wdeclaration-after-statement';
23 requires 'Data::OptList';
24 requires 'Devel::GlobalDestruction';
25 requires 'List::MoreUtils' => '0.12';
26 requires 'MRO::Compat' => '0.05';
27 requires 'Package::DeprecationManager' => '0.04';
28 requires 'Package::Stash' => '0.08';
29 requires 'Scalar::Util' => '1.18';
30 requires 'Sub::Name' => '0.04';
31 requires 'Try::Tiny' => '0.02';
32 requires 'Task::Weaken';
34 test_requires 'File::Spec';
35 test_requires 'Test::More' => '0.88';
36 test_requires 'Test::Exception' => '0.27';
37 test_requires 'Test::Requires' => '0.05';
39 author_requires 'Algorithm::C3';
40 author_requires 'Module::Info';
41 author_requires 'Test::LeakTrace';
42 author_requires 'Test::NoTabs';
43 author_requires 'Test::Output';
44 author_requires 'Test::Spelling';
46 repository 'git://git.moose.perl.org/Class-MOP.git';
47 add_metadata(x_authority => 'cpan:STEVAN');
51 makemaker_args( CCFLAGS => $ccflags );
54 my (@clean, @OBJECT, %XS);
56 for my $xs (<xs/*.xs>) {
57 (my $c = $xs) =~ s/\.xs$/.c/i;
58 (my $o = $xs) =~ s/\.xs$/\$(OBJ_EXT)/i;
66 (my $o = $c) =~ s/\.c$/\$(OBJ_EXT)/i;
72 clean => { FILES => join(q{ }, @clean) },
73 OBJECT => join (q{ }, @OBJECT),
84 # Use the cpan-smolder-stable script in the Moose svn root to figure
85 # out what on CPAN will break with the latest Moose, then update this
90 'namespace::autoclean' => '0.08',
94 for my $mod ( sort keys %conflicts ) {
98 my $installed = $mod->VERSION();
99 if ( $installed le $conflicts{$mod} ) {
104 This version of Class::MOP conflicts with the version of
105 $mod ($installed) you have installed.
107 You will need to upgrade $mod after installing
108 this version of Class::MOP.
117 return unless $found;
119 # More or less copied from Module::Build
120 return if $ENV{PERL_MM_USE_DEFAULT};
121 return unless -t STDIN && ( -t STDOUT || !( -f STDOUT || -c STDOUT ) );
131 my $ret = shift->SUPER::const_cccmd(@_);
132 return q{} unless $ret;
134 if ($Config{cc} =~ /^cl\b/i) {
135 warn 'you are using MSVC... my condolences.';