line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Spike::Error; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
3
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
4
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
20
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
2
|
use base qw(Spike::Object); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
126
|
|
7
|
|
|
|
|
|
|
|
8
|
0
|
0
|
|
0
|
0
|
|
sub throw { die ref $_[0] ? $_[0] : shift->new(@_) } |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
0
|
|
|
0
|
0
|
|
my ($proto, $text, $value) = splice @_, 0, 3; |
12
|
0
|
|
0
|
|
|
|
my $class = ref $proto || $proto; |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
|
|
|
return $class->SUPER::new(@_, text => $text, value => $value); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors(qw(text value)); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
package Spike::Error::HTTP; |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
1
|
|
4
|
use base qw(Spike::Error); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
43
|
|
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
1
|
|
3
|
use HTTP::Status; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
226
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub new { |
26
|
0
|
|
|
0
|
|
|
my ($proto, $status) = splice @_, 0, 2; |
27
|
0
|
|
0
|
|
|
|
my $class = ref $proto || $proto; |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
return $class->SUPER::new( |
30
|
|
|
|
|
|
|
HTTP::Status::status_message($status), |
31
|
|
|
|
|
|
|
$status, |
32
|
|
|
|
|
|
|
headers => [ @_ ], |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors(qw(headers)); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
package Spike::Error::HTTP_OK; |
39
|
|
|
|
|
|
|
|
40
|
1
|
|
|
1
|
|
4
|
use base qw(Spike::Error); |
|
1
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
49
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |