SD/CLI/Command/Init.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 24 CC 1 SCAR 6.9
CC
1
Cov
0%
usage_msg
2.0
ARG_TRANSLATIONS
2.0
BEGIN
2.0
CRAP 2.0
1 package App::SD::CLI::Command::Init;
2 use Any::Moose;
3 extends 'Prophet::CLI::Command::Init';
4 with 'App::SD::CLI::NewReplicaCommand';
5  
6 sub usage_msg {
7 my $self = shift;
8 my $cmd = $self->cli->get_script_name;
9  
10 return <<"END_USAGE";
11 usage: ${cmd}init [--non-interactive]
12  
13 Options:
14 -n | --non-interactive - Don't prompt to edit settings or specify email
15 address for new database
16 END_USAGE
17 }
18  
19 sub ARG_TRANSLATIONS {
20 shift->SUPER::ARG_TRANSLATIONS(),
21 n => 'non-interactive',
22 };
23  
24 override run => sub {
25 my $self = shift;
26  
27 $self->SUPER::run();
28  
29 Prophet::CLI->end_pager();
30  
31 $self->new_replica_wizard();
32 };
33  
34 __PACKAGE__->meta->make_immutable;
35 no Any::Moose;
36  
37 1;
38