| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package App::RecordStream::Deaggregator::Unarray; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
720
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
37
|
|
|
4
|
1
|
|
|
1
|
|
9
|
use warnings; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
36
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
8
|
use App::RecordStream::Deaggregator::Field; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
23
|
|
|
7
|
1
|
|
|
1
|
|
6
|
use App::RecordStream::Deaggregator; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
21
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use App::RecordStream::DomainLanguage::Registry; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
32
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
8
|
use base 'App::RecordStream::Deaggregator::Field'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
328
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new |
|
13
|
|
|
|
|
|
|
{ |
|
14
|
1
|
|
|
1
|
0
|
6
|
my $class = shift; |
|
15
|
1
|
|
|
|
|
4
|
my $old_field = shift; |
|
16
|
1
|
|
|
|
|
4
|
my $new_field = shift; |
|
17
|
|
|
|
|
|
|
|
|
18
|
1
|
|
|
|
|
18
|
my $this = $class->SUPER::new($old_field); |
|
19
|
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
17
|
$this->{'new_field'} = $new_field; |
|
21
|
|
|
|
|
|
|
|
|
22
|
1
|
|
|
|
|
9
|
return $this; |
|
23
|
|
|
|
|
|
|
} |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub new_from_valuation |
|
26
|
|
|
|
|
|
|
{ |
|
27
|
0
|
|
|
0
|
0
|
0
|
my $class = shift; |
|
28
|
0
|
|
|
|
|
0
|
my $valuation = shift; |
|
29
|
0
|
|
|
|
|
0
|
my $new_field = shift; |
|
30
|
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
0
|
my $this = $class->SUPER::new_from_valuation($valuation); |
|
32
|
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
0
|
$this->{'new_field'} = $new_field; |
|
34
|
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
0
|
return $this; |
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub deaggregate_field |
|
39
|
|
|
|
|
|
|
{ |
|
40
|
1
|
|
|
1
|
0
|
4
|
my $this = shift; |
|
41
|
1
|
|
|
|
|
4
|
my $values = shift; |
|
42
|
|
|
|
|
|
|
|
|
43
|
1
|
|
|
|
|
2
|
my @ret; |
|
44
|
|
|
|
|
|
|
|
|
45
|
1
|
|
|
|
|
6
|
for my $value (@$values) |
|
46
|
|
|
|
|
|
|
{ |
|
47
|
3
|
|
|
|
|
13
|
push @ret, {$this->{'new_field'} => $value}; |
|
48
|
|
|
|
|
|
|
} |
|
49
|
|
|
|
|
|
|
|
|
50
|
1
|
|
|
|
|
7
|
return \@ret; |
|
51
|
|
|
|
|
|
|
} |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub long_usage |
|
54
|
|
|
|
|
|
|
{ |
|
55
|
0
|
|
|
0
|
0
|
0
|
return <
|
|
56
|
|
|
|
|
|
|
Usage: unarray,, |
|
57
|
|
|
|
|
|
|
Split the array into individual \"element\" records |
|
58
|
|
|
|
|
|
|
EOF |
|
59
|
|
|
|
|
|
|
} |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub short_usage |
|
62
|
|
|
|
|
|
|
{ |
|
63
|
0
|
|
|
0
|
0
|
0
|
return "split the provided array"; |
|
64
|
|
|
|
|
|
|
} |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub argct |
|
67
|
|
|
|
|
|
|
{ |
|
68
|
1
|
|
|
1
|
0
|
6
|
return 2; |
|
69
|
|
|
|
|
|
|
} |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
App::RecordStream::Deaggregator->register_implementation('unarray', __PACKAGE__); |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
App::RecordStream::DomainLanguage::Registry::register_vfn(__PACKAGE__, 'new_from_valuation', 'unarray', 'VALUATION', 'SCALAR'); |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
1; |