File Coverage

blib/lib/Mite/App/Command/init.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 2 0.0
total 23 25 92.0


line stmt bran cond sub pod time code
1 16     16   11284 use 5.010001;
  16         86  
2 16     16   113 use strict;
  16         32  
  16         431  
3 16     16   89 use warnings;
  16         74  
  16         841  
4              
5             use Mite::Miteception -all;
6 16     16   105 extends qw(Mite::App::Command);
  16         44  
  16         119  
7              
8             our $AUTHORITY = 'cpan:TOBYINK';
9             our $VERSION = '0.011000';
10              
11             return "Begin using mite with your project.";
12             }
13 16     16 0 79  
14             around _build_kingpin_command => sub {
15             my ( $next, $self, @args ) = @_;
16              
17             my $command = $self->$next( @args );
18             $command->arg( 'project', 'Project name.' )->required->string;
19              
20             return $command;
21             };
22              
23             my $self = shift;
24              
25             my $project_name = $self->kingpin_command->args->get( 'project' );
26 8     8 0 26 $self->project->init_project( $project_name->value );
27              
28 8         65 printf "Initialized mite in %s\n", $self->config->mite_dir;
29 8         700  
30             return 0;
31 8         144 }
32              
33 8         1642 1;