Also, tweak generated file name to be more concise.
# If we have just one element it's a SYNOPSIS, so there's no
# tests.
- return unless @elements > 1;
+ return unless @elements > 2;
if ( @elements && $self->{source} =~ /=head1 NAME\n\n(Moose::Cookbook\S+)/ ) {
unshift @elements, 'package ' . $1 . ';';
my $name = shift;
my $content = shift;
+ $name =~ s/^moose_cookbook_//;
+
$self->{dzil}->add_file(
Dist::Zilla::File::InMemory->new(
name => "t/002_recipes/$name",