| 1 | 24 | ▶ | use 5.010001; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 24 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 24 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | package Mite::App::Command::init; | ||
| 6 | 24 | ▶ | use Mite::Miteception -all; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 24 | extends qw(Mite::App::Command); | |
| 8 | |||
| 9 | 24 | our $AUTHORITY = 'cpan:TOBYINK'; | |
| 10 | 24 | our $VERSION = '0.013000'; | |
| 11 | |||
| 12 | 24 | ▶ | sub abstract { |
|
Subroutine
abstract: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 13 | 24 | return "Begin using mite with your project."; | |
| 14 | } | ||
| 15 | |||
| 16 | 24 | ▶ | around _build_kingpin_command => sub { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 17 | 24 | my ( $next, $self, @args ) = @_; | |
| 18 | |||
| 19 | 24 | my $command = $self->$next( @args ); | |
| 20 | 24 | $command->arg( 'project', 'Project name.' )->required->string; | |
| 21 | |||
| 22 | 24 | return $command; | |
| 23 | 24 | }; | |
| 24 | |||
| 25 | 8 | ▶ | sub execute { |
|
Subroutine
execute: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 26 | 8 | my $self = shift; | |
| 27 | |||
| 28 | 8 | my $project_name = $self->kingpin_command->args->get( 'project' ); | |
| 29 | 8 | $self->project->init_project( $project_name->value ); | |
| 30 | |||
| 31 | 8 | printf "Initialized mite in %s\n", $self->config->mite_dir; | |
| 32 | |||
| 33 | 8 | return 0; | |
| 34 | } | ||
| 35 | |||
| 36 | 24 | 1; | |