dzil plugin to ensure ::Delta doesn't have $NEXT in it
Jesse Luehrs [Mon, 6 Jun 2011 21:09:50 +0000 (16:09 -0500)]
dist.ini
inc/CheckDelta.pm [new file with mode: 0644]

index c7094a9..c60dc6c 100644 (file)
--- a/dist.ini
+++ b/dist.ini
@@ -6,6 +6,7 @@ copyright_holder = Infinity Interactive, Inc.
 version = 2.0100
 
 [=inc::GitUpToDate]
+[=inc::CheckDelta]
 [=inc::RequireAuthorDeps]
 [=inc::Clean]
 
diff --git a/inc/CheckDelta.pm b/inc/CheckDelta.pm
new file mode 100644 (file)
index 0000000..1025e78
--- /dev/null
@@ -0,0 +1,18 @@
+package inc::CheckDelta;
+use Moose;
+
+use Path::Class;
+
+with 'Dist::Zilla::Role::BeforeRelease';
+
+sub before_release {
+    my $self = shift;
+
+    my ($delta) = grep { $_->name eq 'lib/Moose/Manual/Delta.pod' }
+                       @{ $self->zilla->files };
+
+    die "Moose::Manual::Delta still contains \$NEXT"
+        if $delta->content =~ /\$NEXT/;
+}
+
+1;