Dist-Zilla-PluginBundle-BAREFOOT
view release on metacpan or search on metacpan
my $tname = 'Test-Module';
my $tversion = '0.01';
path('dist.ini')->spew( <<END );
name = $tname
author = Buddy Burden <barefoot\@cpan.org>
license = Artistic_2_0
copyright_holder = Buddy Burden
version = $tversion
[\@BAREFOOT]
fake_release = 1
repository_link = none
END
my $lib = path( 'lib', 'Test' );
$lib->mkpath;
$lib->path('Module.pm')->spew( <<'END' );
# blank lines before and after PODCLASSNAME are required by PodnameFromClassname
# (for whatever reason)
# PODCLASSNAME
class Test::Module with Some::Role
{
# ABSTRACT: Just a module for testing
# VERSION
}
1;
END
my $t = path( 't' );
$t->mkpath;
$t->path('require.t')->spew( <<'END' );
use Test::Most 0.25;
require_ok( 'Test::Module' );
done_testing;
END
# now build our test dist so we can have some files to test
run_dzil_command("build");
chdir "$tname-$tversion" or die("failed to run dzil");
my $meta = path('META.json')->slurp;
like $meta, qr/"version" \s* : \s* "$tversion"/x, 'version is correct in meta';
like $meta, qr/"provides" \s* : /x, 'contains a `provides` in meta';
done_testing;
sub run_dzil_command
{
local @ARGV = @_;
Dist::Zilla::App->run;
}
( run in 0.804 second using v1.01-cache-2.11-cpan-8dfa8b56332 )