line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package Devel::Hook; |
3
|
|
|
|
|
|
|
|
4
|
3
|
|
|
3
|
|
95541
|
use 5.006; |
|
3
|
|
|
|
|
24
|
|
5
|
3
|
|
|
3
|
|
12
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
48
|
|
6
|
3
|
|
|
3
|
|
11
|
use warnings; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
1213
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.011'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
require XSLoader; |
11
|
|
|
|
|
|
|
XSLoader::load( 'Devel::Hook', $Devel::Hook::VERSION ); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub unshift_BEGIN_hook { |
15
|
1
|
|
|
1
|
1
|
616
|
shift; |
16
|
1
|
|
|
|
|
4
|
_check( 'BEGIN', @_ ); |
17
|
0
|
|
|
|
|
0
|
unshift @{ _get_begin_array() }, @_; |
|
0
|
|
|
|
|
0
|
|
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub push_BEGIN_hook { |
21
|
1
|
|
|
1
|
1
|
69
|
shift; |
22
|
1
|
|
|
|
|
3
|
_check( 'BEGIN', @_ ); |
23
|
0
|
|
|
|
|
0
|
push @{ _get_begin_array() }, @_; |
|
0
|
|
|
|
|
0
|
|
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub unshift_UNITCHECK_hook { |
28
|
1
|
|
|
1
|
1
|
441
|
shift; |
29
|
1
|
|
|
|
|
4
|
_check( 'UNITCHECK', @_ ); |
30
|
0
|
|
|
|
|
0
|
unshift @{ _get_unitcheck_array() }, @_; |
|
0
|
|
|
|
|
0
|
|
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub push_UNITCHECK_hook { |
34
|
1
|
|
|
1
|
1
|
5
|
shift; |
35
|
1
|
|
|
|
|
2
|
_check( 'UNITCHECK', @_ ); |
36
|
0
|
|
|
|
|
0
|
push @{ _get_unitcheck_array() }, @_; |
|
0
|
|
|
|
|
0
|
|
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub unshift_CHECK_hook { |
41
|
1
|
|
|
1
|
1
|
443
|
shift; |
42
|
1
|
|
|
|
|
3
|
_check( 'CHECK', @_ ); |
43
|
0
|
|
|
|
|
0
|
unshift @{ _get_check_array() }, @_; |
|
0
|
|
|
|
|
0
|
|
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub push_CHECK_hook { |
47
|
1
|
|
|
1
|
1
|
497
|
shift; |
48
|
1
|
|
|
|
|
3
|
_check( 'CHECK', @_ ); |
49
|
0
|
|
|
|
|
0
|
push @{ _get_check_array() }, @_; |
|
0
|
|
|
|
|
0
|
|
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub unshift_INIT_hook { |
54
|
1
|
|
|
1
|
1
|
455
|
shift; |
55
|
1
|
|
|
|
|
14
|
_check( 'INIT', @_ ); |
56
|
0
|
|
|
|
|
0
|
unshift @{ _get_init_array() }, @_; |
|
0
|
|
|
|
|
0
|
|
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub push_INIT_hook { |
60
|
1
|
|
|
1
|
1
|
447
|
shift; |
61
|
1
|
|
|
|
|
4
|
_check( 'INIT', @_ ); |
62
|
0
|
|
|
|
|
0
|
push @{ _get_init_array() }, @_; |
|
0
|
|
|
|
|
0
|
|
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub unshift_END_hook { |
67
|
1
|
|
|
1
|
1
|
469
|
shift; |
68
|
1
|
|
|
|
|
4
|
_check( 'END', @_ ); |
69
|
0
|
|
|
|
|
0
|
unshift @{ _get_end_array() }, @_; |
|
0
|
|
|
|
|
0
|
|
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub push_END_hook { |
73
|
1
|
|
|
1
|
1
|
450
|
shift; |
74
|
1
|
|
|
|
|
4
|
_check( 'END', @_ ); |
75
|
0
|
|
|
|
|
0
|
push @{ _get_end_array() }, @_; |
|
0
|
|
|
|
|
0
|
|
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
my $has_support_for = _get_supported_types(); |
80
|
|
|
|
|
|
|
sub _has_support_for { |
81
|
1
|
|
|
1
|
|
442
|
shift; |
82
|
1
|
|
|
|
|
2
|
my $BLOCK = shift; |
83
|
1
|
|
|
|
|
3
|
return $has_support_for->{$BLOCK}; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
sub _check { |
87
|
10
|
|
|
10
|
|
17
|
my $BLOCK = shift; |
88
|
10
|
50
|
|
|
|
17
|
if ( grep { !UNIVERSAL::isa($_, "CODE") } @_ ) { |
|
17
|
|
|
|
|
49
|
|
89
|
10
|
|
|
|
|
45
|
require Carp; |
90
|
10
|
|
|
|
|
823
|
Carp::croak("$BLOCK blocks must be CODE references"); |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
1; |