line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Hyper::Developer::Generator::Control::Flow; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
8021
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
62
|
|
4
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
37
|
|
5
|
1
|
|
|
1
|
|
6
|
use version; our $VERSION = qv('0.01'); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
14
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
131
|
use base qw(Hyper::Developer::Generator::Control::ContainerFlow); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
415
|
|
8
|
|
|
|
|
|
|
use Class::Std; |
9
|
|
|
|
|
|
|
use Hyper::Config::Reader::Flow; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub BUILD { |
12
|
|
|
|
|
|
|
my $self = shift; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
$self->set_type('package'); |
15
|
|
|
|
|
|
|
$self->set_sub_path('/Control/Flow/'); |
16
|
|
|
|
|
|
|
$self->set_suffix('pm'); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
return $self; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub create { |
22
|
|
|
|
|
|
|
my $self = shift; |
23
|
|
|
|
|
|
|
my $usecase = $self->get_usecase(); |
24
|
|
|
|
|
|
|
my $service = $self->get_service(); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
my $config = Hyper::Config::Reader::Flow->new({ |
27
|
|
|
|
|
|
|
base_path => $self->get_base_path(), |
28
|
|
|
|
|
|
|
config_for => $self->get_namespace() . "::Control::Flow::${service}::F${usecase}", |
29
|
|
|
|
|
|
|
}); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
my $data_ref = $self->_get_data_ref_of_steps( |
32
|
|
|
|
|
|
|
$config->get_steps() |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $attr_ref = $config->get_attributes(); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
if ( %{$data_ref} ) { |
38
|
|
|
|
|
|
|
$self->SUPER::create({ |
39
|
|
|
|
|
|
|
data => { |
40
|
|
|
|
|
|
|
attributes => $attr_ref, |
41
|
|
|
|
|
|
|
step_data => $data_ref, |
42
|
|
|
|
|
|
|
}, |
43
|
|
|
|
|
|
|
name => "_F$usecase", |
44
|
|
|
|
|
|
|
template => "Generator/Control/_flow.tpl", |
45
|
|
|
|
|
|
|
force => 1, |
46
|
|
|
|
|
|
|
}); |
47
|
|
|
|
|
|
|
$self->SUPER::create({ |
48
|
|
|
|
|
|
|
data => { |
49
|
|
|
|
|
|
|
attributes => $attr_ref, |
50
|
|
|
|
|
|
|
step_data => $data_ref, |
51
|
|
|
|
|
|
|
}, |
52
|
|
|
|
|
|
|
name => "F$usecase", |
53
|
|
|
|
|
|
|
template => "Generator/Control/flow.tpl", |
54
|
|
|
|
|
|
|
}); |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
return $self; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
__END__ |