line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Airbrake::Request; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
359
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
86
|
|
4
|
3
|
|
|
3
|
|
11
|
use warnings; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
77
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
12
|
use JSON qw(encode_json); |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
44
|
|
7
|
3
|
|
|
3
|
|
1466
|
use Class::Tiny qw(errors context environment session params); |
|
3
|
|
|
|
|
5050
|
|
|
3
|
|
|
|
|
22
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub BUILDARGS { |
10
|
3
|
|
|
3
|
0
|
1417
|
my $class = shift; |
11
|
3
|
|
|
|
|
4
|
my ($param) = @_; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
## conceal secure parameters |
14
|
3
|
|
|
|
|
6
|
for my $member (qw(environment session params)) { |
15
|
9
|
|
|
|
|
10
|
for my $key (grep { /(?:cookie|password)/i } keys %{$param->{$member}}) { |
|
3
|
|
|
|
|
6
|
|
|
9
|
|
|
|
|
30
|
|
16
|
2
|
|
|
|
|
11
|
$param->{$member}{$key} =~ s/./*/g; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
3
|
|
|
|
|
8
|
$param; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub to_json { |
24
|
2
|
|
|
2
|
0
|
15
|
my $self = shift; |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
|
|
23
|
encode_json({ |
27
|
|
|
|
|
|
|
notifier => { |
28
|
|
|
|
|
|
|
name => "Net-Airbrake/$Net::Airbrake::VERSION", |
29
|
|
|
|
|
|
|
version => "$Net::Airbrake::VERSION", |
30
|
|
|
|
|
|
|
url => 'https://github.com/sixapart/Net-Airbrake', |
31
|
|
|
|
|
|
|
}, |
32
|
2
|
50
|
50
|
|
|
8
|
errors => [ map { $_->to_hash } @{$self->errors || []} ], |
|
2
|
|
50
|
|
|
27
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
33
|
|
|
|
|
|
|
environment => $self->environment || {}, |
34
|
|
|
|
|
|
|
context => $self->context || {}, |
35
|
|
|
|
|
|
|
session => $self->session || {}, |
36
|
|
|
|
|
|
|
params => $self->params || {}, |
37
|
|
|
|
|
|
|
}); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
__END__ |