| 1 | package B::CompilerPhase::Hook; | ||||||||||
| 2 | # ABSTRACT: Programatically install BEGIN/CHECK/INIT/UNITCHECK/END blocks | ||||||||||
| 3 | |||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | our $VERSION; | |||||||||
| 8 | 1 | our $AUTHORITY; | |||||||||
| 9 | |||||||||||
| 10 | 1 | ▶ | use XSLoader; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | BEGIN { | ||||||||||
| 12 | 1 | ▶ | $VERSION = '0.02'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | 1 | $AUTHORITY = 'cpan:STEVAN'; | |||||||||
| 14 | 1 | XSLoader::load( __PACKAGE__, $VERSION ); | |||||||||
| 15 | } | ||||||||||
| 16 | |||||||||||
| 17 | sub import { | ||||||||||
| 18 | 1 | ▶ | shift; | ||||||||
|
Subroutine
import: called CC=3 SCAR=14.2
| |||||||||||
| 19 | 1 | ▶ | if ( @_ ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 0 | my $to = caller; | |||||||||
| 21 | 0 | my $from = __PACKAGE__; | |||||||||
| 22 | 0 | foreach ( @_ ) { | |||||||||
| 23 | 1 | ▶ | no strict 'refs'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 24 | 0 | *{ $to . '::' . $_ } = $from->can( $_ ); | |||||||||
| 25 | } | ||||||||||
| 26 | } | ||||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | 1 | 1; | |||||||||
| 30 | |||||||||||
| 31 | __END__ | ||||||||||