3 use inc::Module::Install;
4 use Module::Install::ExtraTests;
10 perl_version '5.008001';
11 all_from 'lib/Class/MOP.pm';
15 my $ccflags = ( $Config::Config{ccflags} || '' ) . ' -I.';
17 if ( -d '.git' || $ENV{MAINTAINER_MODE} ) {
18 $ccflags .= ' -Wall -Wdeclaration-after-statement';
22 requires 'Data::OptList';
23 requires 'Devel::GlobalDestruction';
24 requires 'List::MoreUtils' => '0.12';
25 requires 'MRO::Compat' => '0.05';
26 requires 'Package::DeprecationManager' => '0.04';
27 requires 'Package::Stash' => '0.08';
28 requires 'Scalar::Util' => '1.18';
29 requires 'Sub::Name' => '0.04';
30 requires 'Try::Tiny' => '0.02';
31 requires 'Task::Weaken';
33 test_requires 'File::Spec';
34 test_requires 'Test::More' => '0.88';
35 test_requires 'Test::Exception' => '0.27';
36 test_requires 'Test::Requires' => '0.05';
38 repository 'git://git.moose.perl.org/Class-MOP.git';
39 add_metadata(x_authority => 'cpan:STEVAN');
43 makemaker_args( CCFLAGS => $ccflags );
46 my (@clean, @OBJECT, %XS);
48 for my $xs (<xs/*.xs>) {
49 (my $c = $xs) =~ s/\.xs$/.c/i;
50 (my $o = $xs) =~ s/\.xs$/\$(OBJ_EXT)/i;
58 (my $o = $c) =~ s/\.c$/\$(OBJ_EXT)/i;
64 clean => { FILES => join(q{ }, @clean) },
65 OBJECT => join (q{ }, @OBJECT),
76 # Use the cpan-smolder-stable script in the Moose svn root to figure
77 # out what on CPAN will break with the latest Moose, then update this
82 'namespace::autoclean' => '0.08',
86 for my $mod ( sort keys %conflicts ) {
90 my $installed = $mod->VERSION();
91 if ( $installed le $conflicts{$mod} ) {
96 This version of Class::MOP conflicts with the version of
97 $mod ($installed) you have installed.
99 You will need to upgrade $mod after installing
100 this version of Class::MOP.
109 return unless $found;
111 # More or less copied from Module::Build
112 return if $ENV{PERL_MM_USE_DEFAULT};
113 return unless -t STDIN && ( -t STDOUT || !( -f STDOUT || -c STDOUT ) );
123 my $ret = shift->SUPER::const_cccmd(@_);
124 return q{} unless $ret;
126 if ($Config{cc} =~ /^cl\b/i) {
127 warn 'you are using MSVC... my condolences.';