File Coverage

blib/lib/Dist/Zilla/App/Command/mbd_build.pm
Criterion Covered Total %
statement 10 12 83.3
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 14 16 87.5


line stmt bran cond sub pod time code
1             package Dist::Zilla::App::Command::mbd_build;
2              
3 1     1   687 use strict;
  1         1  
  1         29  
4 1     1   4 use warnings;
  1         1  
  1         26  
5 1     1   10 use v5.10;
  1         3  
  1         36  
6 1     1   425 use Dist::Zilla::App -command;
  0            
  0            
7              
8             # ABSTRACT: run Module::Build::Database commands
9             our $VERSION = '0.05'; # VERSION
10              
11              
12             sub abstract { 'run Module::Build::Database commands' }
13              
14             sub opt_spec {
15             ([ 'in=s' => 'the directory in which to build the distribution' ])
16             }
17              
18             sub execute
19             {
20             my($self, $opt, $args) = @_;
21            
22             my($plugin) = grep { $_->isa('Dist::Zilla::Plugin::ModuleBuildDatabase') } @{ $self->zilla->plugins };
23            
24             unless(defined $plugin)
25             {
26             $self->log_fatal("MUST use [ModuleBuildDatabase] for this command");
27             }
28            
29             $plugin->mbd_build($opt, $args);
30             }
31              
32             1;
33              
34              
35             __END__
36             =pod
37              
38             =head1 NAME
39              
40             Dist::Zilla::App::Command::mbd_build - run Module::Build::Database commands
41              
42             =head1 VERSION
43              
44             version 0.05
45              
46             =head1 SYNOPSIS
47              
48             % dzil mbd_build dbtest
49             % dzil mbd_build dbdist
50             % dzil mbd_build dbfakeinstall
51             % dzil mbd_build dbinstall
52              
53             =head1 DESCRIPTION
54              
55             After building the distribution, run the given C<Build> command.
56             The results to the db directory are then copied back into your
57             working copy so they can be checked into your version control.
58              
59             =head1 AUTHOR
60              
61             Graham Ollis <plicease@cpan.org>
62              
63             =head1 COPYRIGHT AND LICENSE
64              
65             This software is copyright (c) 2013 by NASA GSFC.
66              
67             This is free software; you can redistribute it and/or modify it under
68             the same terms as the Perl 5 programming language system itself.
69              
70             =cut
71