line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ODS::Utils; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
18
|
use base 'Import::Export'; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
237
|
|
4
|
|
|
|
|
|
|
|
5
|
3
|
|
|
3
|
|
16
|
use YAOO; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
12
|
|
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
2007
|
use Data::GUID; |
|
3
|
|
|
|
|
49395
|
|
|
3
|
|
|
|
|
15
|
|
8
|
3
|
|
|
3
|
|
1690
|
use File::Copy qw/move/; |
|
3
|
|
|
|
|
5949
|
|
|
3
|
|
|
|
|
148
|
|
9
|
3
|
|
|
3
|
|
18
|
use Carp qw/croak/; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
105
|
|
10
|
3
|
|
|
3
|
|
2848
|
use Data::Dumper qw/Dumper/; |
|
3
|
|
|
|
|
15701
|
|
|
3
|
|
|
|
|
680
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our %EX = ( |
13
|
|
|
|
|
|
|
load => [qw/all/], |
14
|
|
|
|
|
|
|
clone => [qw/all/], |
15
|
|
|
|
|
|
|
unique_id => [qw/all/], |
16
|
|
|
|
|
|
|
build_temp_class => [qw/all/], |
17
|
|
|
|
|
|
|
move => [qw/all/], |
18
|
|
|
|
|
|
|
croak => [qw/error/], |
19
|
|
|
|
|
|
|
Dumper => [qw/error/] |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub clone { |
23
|
64
|
|
|
64
|
0
|
100
|
my ($c) = @_; |
24
|
64
|
|
|
|
|
104
|
my $n = bless YAOO::deep_clone_ordered_hash($c), ref $c; |
25
|
64
|
|
|
|
|
9465
|
return $n; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub load { |
29
|
56
|
|
|
56
|
0
|
75
|
my ($module) = shift; |
30
|
56
|
|
|
|
|
199
|
(my $require = $module) =~ s/\:\:/\//g; |
31
|
56
|
|
|
|
|
7477
|
require $require . '.pm'; |
32
|
48
|
|
|
|
|
94
|
return $module; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub unique_class_name { |
36
|
4
|
|
|
4
|
0
|
25
|
return 'A' . join("", split("-", Data::GUID->new->as_string())); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub build_temp_class { |
40
|
4
|
|
|
4
|
0
|
9
|
my ($class) = @_; |
41
|
4
|
|
|
|
|
9
|
load $class; |
42
|
4
|
|
|
|
|
16
|
my $temp = $class . '::' . unique_class_name(); |
43
|
4
|
|
|
|
|
3320
|
my $c = sprintf( |
44
|
|
|
|
|
|
|
q| |
45
|
|
|
|
|
|
|
package %s; |
46
|
|
|
|
|
|
|
use YAOO; |
47
|
|
|
|
|
|
|
extends '%s'; |
48
|
|
|
|
|
|
|
1; |
49
|
|
|
|
|
|
|
|, $temp, $class ); |
50
|
4
|
|
|
2
|
|
356
|
eval $c; |
|
2
|
|
|
2
|
|
16
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
12
|
|
51
|
4
|
|
|
|
|
23
|
return $temp; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |