blib/lib/Github/Hooks/Receiver/Declare.pm

filter: Statementstmt 100% 23 / 23 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 3 totaltotal 89.1% 33 / 37 SCAR 11.0
CC
3
Cov
96%
secret
2.1
on
2.0
BEGIN
1.0
CRAP 3.0
« Build ↑ Summary _build/lib/MyBuilder.pm »
1 package Github::Hooks::Receiver::Declare;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use Github::Hooks::Receiver;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use parent 'Exporter';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 our @EXPORT = qw/receiver secret on/;
9  
10 2 our $_RECEIVER;
11 sub receiver(&) {
12 2 ▶ my $code = shift;
Subroutine receiver: called CC=1 SCAR=0.0
Pod undocumented
13 2 local $_RECEIVER = Github::Hooks::Receiver->new;
14 2 $code->();
15 2 $_RECEIVER;
16 }
17  
18 sub secret($) {
19 1 ▶ die 'not in receiver block' unless $_RECEIVER;
Subroutine secret: called CC=2 SCAR=7.2
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
unless $Github::Hooks::Receiver::Declare::_RECEIVER 0 1 1
20 1 $_RECEIVER->{secret} = $_[0];
21 }
22  
23 sub on($;$) {
24 5 ▶ die 'not in receiver block' unless $_RECEIVER;
Subroutine on: called CC=2 SCAR=6.9
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
unless $Github::Hooks::Receiver::Declare::_RECEIVER 1 4 5
25 4 $_RECEIVER->on(@_);
26 }
27  
28 2 1;
29 __END__
« Build ↑ Summary _build/lib/MyBuilder.pm »