File Coverage

blib/lib/WWW/Google/Cloud/Messaging/Response/Result.pm
Criterion Covered Total %
statement 14 14 100.0
branch 4 4 100.0
condition n/a
subroutine 9 9 100.0
pod 7 7 100.0
total 34 34 100.0


line stmt bran cond sub pod time code
1             package WWW::Google::Cloud::Messaging::Response::Result;
2              
3 4     4   18 use strict;
  4         8  
  4         93  
4 4     4   20 use warnings;
  4         6  
  4         746  
5              
6             sub new {
7 6     6 1 48 my ($class, $result) = @_;
8 6         30 bless $result, $class;
9             }
10              
11             sub is_success {
12 6 100   6 1 15873 shift->error ? 0 : 1;
13             }
14              
15             sub has_canonical_id {
16 6 100   6 1 22 shift->registration_id ? 1 : 0;
17             }
18              
19             sub message_id {
20 6     6 1 53 shift->{message_id};
21             }
22              
23             sub error {
24 12     12 1 17178 shift->{error};
25             }
26              
27             sub registration_id {
28 12     12 1 17183 shift->{registration_id};
29             }
30              
31             sub target_reg_id {
32 6     6 1 56 shift->{_reg_id};
33             }
34              
35             1;
36             __END__