line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package WWW::Kickstarter::Error; |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
29
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
6
|
1
|
|
|
1
|
|
4
|
no autovivification; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
6
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
50
|
use Exporter qw( import ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
51
|
|
10
|
|
|
|
|
|
|
our @EXPORT_OK = qw( my_croak ); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
6
|
use Carp qw( ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
5
|
use overload '""' => \&as_string; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$Carp::CarpInternal{ (__PACKAGE__) } = 1; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
{ |
22
|
|
|
|
|
|
|
my @pkgs = qw( |
23
|
|
|
|
|
|
|
WWW::Kickstarter |
24
|
|
|
|
|
|
|
WWW::Kickstarter::Data |
25
|
|
|
|
|
|
|
WWW::Kickstarter::Data::Categories |
26
|
|
|
|
|
|
|
WWW::Kickstarter::Data::Category |
27
|
|
|
|
|
|
|
WWW::Kickstarter::Data::NotificationPref |
28
|
|
|
|
|
|
|
WWW::Kickstarter::Data::Project |
29
|
|
|
|
|
|
|
WWW::Kickstarter::Data::User |
30
|
|
|
|
|
|
|
WWW::Kickstarter::Data::User::Myself |
31
|
|
|
|
|
|
|
WWW::Kickstarter::Error |
32
|
|
|
|
|
|
|
WWW::Kickstarter::HttpClient::Lwp |
33
|
|
|
|
|
|
|
WWW::Kickstarter::Iterator |
34
|
|
|
|
|
|
|
WWW::Kickstarter::JsonParser::JsonXs |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my $code = join '', map "package $_; our \@CARP_NOT = \@pkgs;\n", @pkgs; |
38
|
|
|
|
|
|
|
eval $code."1" or die $@; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub my_croak { |
43
|
0
|
|
|
0
|
1
|
|
my ($code, $message) = @_; |
44
|
0
|
|
|
|
|
|
die __PACKAGE__->new($code, $message); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub new { |
49
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
50
|
0
|
0
|
|
|
|
|
my $code = @_ > 1 ? shift : 500; |
51
|
0
|
|
|
|
|
|
my $message = shift; |
52
|
|
|
|
|
|
|
|
53
|
0
|
0
|
|
|
|
|
if (eval { $message->isa(__PACKAGE__) }) { |
|
0
|
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
return $message; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
my $self = bless({}, $class); |
58
|
0
|
|
|
|
|
|
$self->{code } = $code; |
59
|
0
|
|
|
|
|
|
$self->{message} = $message; |
60
|
0
|
|
|
|
|
|
$self->{trace } = Carp::shortmess(''); |
61
|
0
|
|
|
|
|
|
return $self; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
0
|
|
|
0
|
1
|
|
sub code { $_[0]{code} } |
66
|
0
|
|
|
0
|
1
|
|
sub message { $_[0]{message} } |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
0
|
1
|
|
sub as_string { $_[0]{message} . $_[0]{trace} } |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
1; |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
__END__ |