Skip to content
Browse files

add mro stuff

  • Loading branch information...
1 parent 503b3c9 commit 7b7f50f0a3244b885f0ed4b73a79fc09c6c351d5 @lestrrat committed Mar 28, 2009
Showing with 17 additions and 3 deletions.
  1. +16 −3 Makefile.PL
  2. +1 −0 mop.h
View
19 Makefile.PL
@@ -1,9 +1,22 @@
use strict;
use ExtUtils::MakeMaker;
-WriteMakefile(
+my %ARGS = (
NAME => 'mop',
VERSION_FROM => 'mop.pm',
OBJECT => '$(O_FILES)',
- OPTIMIZE => '-ggdb'
-);
+ OPTIMIZE => '-ggdb',
+);
+
+my %PREREQ_PM = ('ExtUtils::Depends' => 0);
+if ($] > 5.010) {
+ $PREREQ_PM{'MRO::Compat'} = 0;
+}
+$ARGS{ PREREQ_PM } = \%PREREQ_PM;
+
+# XXX Hmm, isn't there a better way to do this?
+if (eval { require ExtUtils::Depends } && !$@) {
+ my $pkg = ExtUtils::Depends->new( mop => 'Devel::MRO' );
+ %ARGS = (%ARGS, $pkg->get_makefile_vars);
+}
+WriteMakefile(%ARGS);
View
1 mop.h
@@ -3,6 +3,7 @@
#include "EXTERN.h"
#include "perl.h"
+#include "mro_compat.h"
/* forward decl */
struct _map_attribute;

0 comments on commit 7b7f50f

Please sign in to comment.
Something went wrong with that request. Please try again.