From: Jesse Luehrs Date: Mon, 6 Jun 2011 21:09:50 +0000 (-0500) Subject: dzil plugin to ensure ::Delta doesn't have $NEXT in it X-Git-Tag: 2.0101~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=903f4ce96f2e07fc69bcd35587bc093a9926a4ec;p=gitmo%2FMoose.git dzil plugin to ensure ::Delta doesn't have $NEXT in it --- diff --git a/dist.ini b/dist.ini index c7094a9..c60dc6c 100644 --- 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 index 0000000..1025e78 --- /dev/null +++ b/inc/CheckDelta.pm @@ -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;