line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package |
2
|
|
|
|
|
|
|
SMS::Send::UK::AA::Response; |
3
|
2
|
|
|
2
|
|
13
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
106
|
|
4
|
|
|
|
|
|
|
use overload |
5
|
2
|
|
|
|
|
22
|
q{0+} => '_status', |
6
|
|
|
|
|
|
|
q{bool} => '_status', |
7
|
2
|
|
|
2
|
|
12
|
q{""} => '_message'; |
|
2
|
|
|
|
|
5
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
3
|
|
|
3
|
0
|
83
|
my($class, $status, $message) = @_; |
11
|
|
|
|
|
|
|
|
12
|
3
|
|
|
|
|
47
|
return bless [$status, $message], $class; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub _status { |
16
|
3
|
|
|
3
|
|
14329
|
return shift->[0]; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _message { |
20
|
5
|
|
|
5
|
|
906
|
return shift->[1]; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub status_line { |
24
|
2
|
|
|
2
|
0
|
7
|
my $message = "$_[0]"; |
25
|
|
|
|
|
|
|
|
26
|
2
|
50
|
|
|
|
71
|
($message =~ /^(?:OK|ERR):/m |
27
|
|
|
|
|
|
|
# Looks like A&A |
28
|
|
|
|
|
|
|
? $message =~ /\n?(.*?)[\r\n]*$/ |
29
|
|
|
|
|
|
|
# LWP or something else, go for the first line |
30
|
|
|
|
|
|
|
: $message =~ /^(.*?)[\r\n]*/)[0]; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |