SD/CLI/Command/Attachment/Create.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 24 CC 3 SCAR 20.8
CC
3
Cov
0%
run
12.0
BEGIN
2.0
BEGIN
2.0
CRAP 8.0
1 package App::SD::CLI::Command::Attachment::Create;
2 use Any::Moose;
3 extends 'Prophet::CLI::Command::Create';
4 with 'App::SD::CLI::Model::Attachment';
5 with 'App::SD::CLI::Command';
6  
7 sub run {
8 my $self = shift;
9  
10 $self->print_usage if $self->has_arg('h');
11  
12 my $content = $self->get_content(type => 'attachment');
13  
14 die "Aborted.\n"
15 if length($content) == 0;
16  
17 $self->set_prop(content => $content);
18 $self->SUPER::run(@_);
19 };
20  
21 __PACKAGE__->meta->make_immutable;
22 no Any::Moose;
23  
24 1;
25