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   10319 use 5.010001;
  16         56  
2 16     16   108 use strict;
  16         37  
  16         359  
3 16     16   75 use warnings;
  16         42  
  16         813  
4              
5             use Mite::Miteception -all;
6 16     16   114 extends qw(Mite::App::Command);
  16         43  
  16         148  
7              
8             our $AUTHORITY = 'cpan:TOBYINK';
9             our $VERSION = '0.010008';
10              
11             return "Begin using mite with your project.";
12             }
13 16     16 0 73  
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 25 $self->project->init_project( $project_name->value );
27              
28 8         60 printf "Initialized mite in %s\n", $self->config->mite_dir;
29 8         627  
30             return 0;
31 8         122 }
32              
33 8         1921 1;