line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package B::CompilerPhase::Hook; |
2
|
|
|
|
|
|
|
# ABSTRACT: Programatically install BEGIN/CHECK/INIT/UNITCHECK/END blocks |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
16347
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
35
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
52
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION; |
8
|
|
|
|
|
|
|
our $AUTHORITY; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
4
|
use XSLoader; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
65
|
|
11
|
|
|
|
|
|
|
BEGIN { |
12
|
1
|
|
|
1
|
|
7
|
$VERSION = '0.02'; |
13
|
1
|
|
|
|
|
2
|
$AUTHORITY = 'cpan:STEVAN'; |
14
|
1
|
|
|
|
|
566
|
XSLoader::load( __PACKAGE__, $VERSION ); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub import { |
18
|
1
|
|
|
1
|
|
6
|
shift; |
19
|
1
|
50
|
|
|
|
14
|
if ( @_ ) { |
20
|
0
|
|
|
|
|
|
my $to = caller; |
21
|
0
|
|
|
|
|
|
my $from = __PACKAGE__; |
22
|
0
|
|
|
|
|
|
foreach ( @_ ) { |
23
|
1
|
|
|
1
|
|
6
|
no strict 'refs'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
95
|
|
24
|
0
|
|
|
|
|
|
*{ $to . '::' . $_ } = $from->can( $_ ); |
|
0
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |