Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Steal FLORAs DZIL XS module setup

  • Loading branch information...
commit 8ecf9a43ea1c576e0d64f8ad65be6ba8142e33db 1 parent efce208
@ilmari authored
Showing with 27 additions and 1 deletion.
  1. +12 −0 Makefile.PL
  2. +7 −0 dist.ini
  3. +8 −1 lib/multidimensional.pm
View
12 Makefile.PL
@@ -0,0 +1,12 @@
+use ExtUtils::MakeMaker;
+use ExtUtils::Depends;
+
+# NOTE:
+# This is a very simple Makefile.PL I only use to build the distribution
+# locally while working on it. The real Makefile.PL, with all required
+# information like dependencies, is generated later by Dist::Zilla
+
+WriteMakefile(
+ NAME => 'multidimensional',
+ ExtUtils::Depends->new('multidimensional', 'B::Hooks::OP::Check')->get_makefile_vars,
+);
View
7 dist.ini
@@ -18,3 +18,10 @@ copyright_year = 2010
[PodWeaver]
[PodCoverageTests]
[PodSyntaxTests]
+
+
+; we maintain a Makefile.PL in the repository to be able to work without dzil,
+; but for the distribution we let dzil generate a Makefile.PL with the proper
+; dependencies and such
+[PruneFiles]
+filenames = Makefile.PL
View
9 lib/multidimensional.pm
@@ -8,7 +8,14 @@ use warnings;
use B::Hooks::OP::Check;
use XSLoader;
-XSLoader::load __PACKAGE__, our $VERSION;
+XSLoader::load(
+ __PACKAGE__,
+ # we need to be careful not to touch $VERSION at compile time, otherwise
+ # DynaLoader will assume it's set and check against it, which will cause
+ # fail when being run in the checkout without dzil having set the actual
+ # $VERSION
+ exists $multidimensional::{VERSION} ? ${ $multidimensional::{VERSION} } : (),
+);
=head1 SYNOPSIS
Please sign in to comment.
Something went wrong with that request. Please try again.