| 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
| |||||||||||
| 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
| |||||||||||
| 25 | 4 | $_RECEIVER->on(@_); | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 2 | 1; | |||||||||
| 29 | __END__ | ||||||||||