line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DCI; |
2
|
12
|
|
|
12
|
|
2981273
|
use strict; |
|
12
|
|
|
|
|
30
|
|
|
12
|
|
|
|
|
427
|
|
3
|
12
|
|
|
12
|
|
62
|
use warnings; |
|
12
|
|
|
|
|
21
|
|
|
12
|
|
|
|
|
481
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = "0.013"; |
6
|
12
|
|
|
12
|
|
62
|
use Carp qw/croak/; |
|
12
|
|
|
|
|
20
|
|
|
12
|
|
|
|
|
3458
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub import { |
9
|
27
|
|
|
27
|
|
26400
|
my $class = shift; |
10
|
27
|
|
|
|
|
1101
|
my ( $type, @args ) = @_; |
11
|
27
|
|
|
|
|
130
|
my $caller = caller; |
12
|
|
|
|
|
|
|
|
13
|
27
|
|
|
|
|
486
|
my $meta; |
14
|
|
|
|
|
|
|
|
15
|
27
|
|
|
|
|
2210
|
for ( "DCI::Meta::$type", $type ) { |
16
|
27
|
|
|
|
|
2312
|
my $good = eval "require $_; 1"; |
17
|
27
|
|
|
|
|
105
|
my $error = $@; |
18
|
|
|
|
|
|
|
|
19
|
27
|
50
|
|
|
|
122
|
$meta = $_ if $good; |
20
|
27
|
50
|
|
|
|
945
|
last if $meta; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# Rethrow error that is not can't locate |
23
|
0
|
0
|
|
|
|
0
|
die "Error loading $_: $error" if $error !~ m/Can't locate/; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
27
|
50
|
33
|
|
|
382
|
croak "'Neither DCI::Meta::$type' nor '$type' appear to be 'DCI::Meta' packages" |
27
|
|
|
|
|
|
|
unless $meta |
28
|
|
|
|
|
|
|
&& $meta->isa( 'DCI::Meta' ); |
29
|
|
|
|
|
|
|
|
30
|
27
|
|
|
|
|
656
|
$meta->new( $caller ); |
31
|
27
|
|
|
|
|
129
|
$meta->export_to( $caller => @args ); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |