| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Net::SMS::CDYNE::Response; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use Any::Moose; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
has 'response_code' => ( |
|
6
|
|
|
|
|
|
|
is => 'ro', |
|
7
|
|
|
|
|
|
|
isa => 'Maybe[Int]', |
|
8
|
|
|
|
|
|
|
); |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub success { |
|
11
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
|
12
|
|
|
|
|
|
|
|
|
13
|
0
|
|
|
|
|
|
my $response_code = $self->response_code; |
|
14
|
0
|
0
|
0
|
|
|
|
return 0 if ! $response_code || index($response_code, '2') != 0; |
|
15
|
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
my $sms_error = $self->sms_error; |
|
17
|
0
|
0
|
|
|
|
|
return 0 unless $sms_error; |
|
18
|
|
|
|
|
|
|
|
|
19
|
0
|
0
|
|
|
|
|
return 0 unless $sms_error eq 'NoError'; |
|
20
|
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
return 1; |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
0
|
|
sub sms_error { shift->{SMSError} } |
|
25
|
0
|
|
0
|
0
|
0
|
|
sub queued { (shift->{Queued} || '') eq 'true' } |
|
26
|
0
|
|
0
|
0
|
0
|
|
sub sent { (shift->{Sent} || '') eq 'true' } |
|
27
|
0
|
|
|
0
|
0
|
|
sub message_id { shift->{MessageID} } |
|
28
|
0
|
|
0
|
0
|
0
|
|
sub cancelled { (shift->{Cancelled} || '') eq 'true' } |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |