lib/Shell/Amazon/S3/Command/count.pm untested

filter: Statementstmt 0.0% 0 / 13 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 18 SCAR 17.9
CC
2
Cov
0%
execute
6.0
BEGIN
2.0
CRAP 6.0
1 package Shell::Amazon::S3::Command::count;
2 use Moose;
3  
4 extends 'Shell::Amazon::S3::CommandWithBucket';
5  
6 has '+desc' => (default => 'count [prefix]', );
7  
8 sub execute {
9 my ( $self, $args ) = @_;
10 my $bucket = $self->bucket;
11 my $response = $bucket->list_all;
12  
13 my $result = '';
14 if ( $bucket->err ) {
15 $result .= $bucket->errstr;
16 }
17 else {
18 $result .= scalar( @{ $response->{keys} } );
19 }
20 };
21  
22 1;