| 1 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | package B::Hooks::OP::Check::EntersubForCV; | ||||||||||
| 5 | |||||||||||
| 6 | 2 | ▶ | use parent qw/DynaLoader/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 2 | ▶ | use B::Hooks::OP::Check 0.19; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 2 | ▶ | use Scalar::Util qw/refaddr/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 2 | ▶ | use B::Utils 0.19 (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 2 | our $VERSION = '0.10'; | |||||||||
| 12 | |||||||||||
| 13 | 2 | ▶ | sub dl_load_flags { 0x01 } | ||||||||
|
Subroutine
dl_load_flags: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 14 | |||||||||||
| 15 | 2 | __PACKAGE__->bootstrap($VERSION); | |||||||||
| 16 | |||||||||||
| 17 | 2 | my %CALLBACKS; | |||||||||
| 18 | |||||||||||
| 19 | 2 | ▶ | sub import { | ||||||||
|
Subroutine
import: called CC=3 SCAR=11.0
| |||||||||||
| 20 | 2 | my $class = shift; | |||||||||
| 21 | |||||||||||
| 22 | 2 | ▶ | die 'odd number of arguments' | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | unless @_ % 2 == 0; | ||||||||||
| 24 | |||||||||||
| 25 | 2 | ▶ | while (@_) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | 3 | my ($cv, $cb) = (shift, shift); | |||||||||
| 27 | 3 | $CALLBACKS{ refaddr $cv } = register($cv, $cb); | |||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 2 | return; | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 1 | ▶ | sub unimport { | ||||||||
|
Subroutine
unimport: called CC=2 SCAR=6.9
| |||||||||||
| 34 | 1 | my $class = shift; | |||||||||
| 35 | |||||||||||
| 36 | 1 | unregister($_) for delete @CALLBACKS{ map { refaddr $_ } @_ }; | |||||||||
| 37 | 1 | return; | |||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | 2 | 1; | |||||||||
| 41 | |||||||||||
| 42 | __END__ | ||||||||||