blib/lib/Mackerel/Webhook/Receiver.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
branch | 8 | 14 | 57.1 |
line | true | false | branch |
---|---|---|---|
23 | 0 | 6 | if ($req->method ne 'POST') |
27 | 2 | 4 | unless my $payload = eval { do { &decode_json(scalar $req->content) } } |
36 | 4 | 0 | if (my $code = $self->events->{''}) |
39 | 2 | 2 | if (my $code = $self->events->{$event_name}) |
50 | 2 | 2 | if (ref $event eq 'CODE') |
59 | 0 | 0 | @_ == 1 ? : |
63 | 0 | 0 | if $server |