File Coverage

lib/App/MtAws/QueueJob/RetrieveInventory.pm
Criterion Covered Total %
statement 22 22 100.0
branch 4 4 100.0
condition n/a
subroutine 8 8 100.0
pod 0 2 0.0
total 34 36 94.4


line stmt bran cond sub pod time code
1             # mt-aws-glacier - Amazon Glacier sync client
2             # Copyright (C) 2012-2014 Victor Efimov
3             # http://mt-aws.com (also http://vs-dev.com) vs@vs-dev.com
4             # License: GPLv3
5             #
6             # This file is part of "mt-aws-glacier"
7             #
8             # mt-aws-glacier is free software: you can redistribute it and/or modify
9             # it under the terms of the GNU General Public License as published by
10             # the Free Software Foundation, either version 3 of the License, or
11             # (at your option) any later version.
12             #
13             # mt-aws-glacier is distributed in the hope that it will be useful,
14             # but WITHOUT ANY WARRANTY; without even the implied warranty of
15             # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16             # GNU General Public License for more details.
17             #
18             # You should have received a copy of the GNU General Public License
19             # along with this program. If not, see <http://www.gnu.org/licenses/>.
20              
21             package App::MtAws::QueueJob::RetrieveInventory;
22              
23             our $VERSION = '1.114_2';
24              
25 6     6   581 use strict;
  6         9  
  6         135  
26 6     6   19 use warnings;
  6         7  
  6         114  
27 6     6   21 use Carp;
  6         6  
  6         246  
28              
29 6     6   25 use App::MtAws::QueueJobResult;
  6         5  
  6         290  
30 6     6   52 use base 'App::MtAws::QueueJob';
  6         8  
  6         1360  
31              
32             sub init
33             {
34 11     11 0 10 my ($self) = @_;
35 11 100       285 $self->{format} or confess;
36 9 100       489 $self->{format} =~ /^json|csv$/ or confess;
37 4         15 $self->enter('retrieve');
38             }
39              
40             sub on_retrieve
41             {
42 2     2 0 3 my ($self) = @_;
43             return state "wait", task "retrieve_inventory_job", { format => $self->{format} } => sub {
44 2     2   6 state("done")
45             }
46 2         8 }
47              
48             1;