line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
16
|
|
|
16
|
|
11856
|
use 5.010001; |
|
16
|
|
|
|
|
65
|
|
2
|
16
|
|
|
16
|
|
120
|
use strict; |
|
16
|
|
|
|
|
51
|
|
|
16
|
|
|
|
|
451
|
|
3
|
16
|
|
|
16
|
|
158
|
use warnings; |
|
16
|
|
|
|
|
50
|
|
|
16
|
|
|
|
|
943
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Mite::App::Command::init; |
6
|
16
|
|
|
16
|
|
121
|
use Mite::Miteception -all; |
|
16
|
|
|
|
|
43
|
|
|
16
|
|
|
|
|
141
|
|
7
|
|
|
|
|
|
|
extends qw(Mite::App::Command); |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
10
|
|
|
|
|
|
|
our $VERSION = '0.012000'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub abstract { |
13
|
16
|
|
|
16
|
0
|
70
|
return "Begin using mite with your project."; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
around _build_kingpin_command => sub { |
17
|
|
|
|
|
|
|
my ( $next, $self, @args ) = @_; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my $command = $self->$next( @args ); |
20
|
|
|
|
|
|
|
$command->arg( 'project', 'Project name.' )->required->string; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
return $command; |
23
|
|
|
|
|
|
|
}; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub execute { |
26
|
8
|
|
|
8
|
0
|
25
|
my $self = shift; |
27
|
|
|
|
|
|
|
|
28
|
8
|
|
|
|
|
57
|
my $project_name = $self->kingpin_command->args->get( 'project' ); |
29
|
8
|
|
|
|
|
846
|
$self->project->init_project( $project_name->value ); |
30
|
|
|
|
|
|
|
|
31
|
8
|
|
|
|
|
114
|
printf "Initialized mite in %s\n", $self->config->mite_dir; |
32
|
|
|
|
|
|
|
|
33
|
8
|
|
|
|
|
840
|
return 0; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |