line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package System::InitD::GenInit::Debian; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1091
|
use parent qw/System::InitD::Base/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
61
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
27
|
|
6
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
4
|
use Carp; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
63
|
|
9
|
1
|
|
|
1
|
|
798
|
use File::ShareDir qw/dist_file/; |
|
1
|
|
|
|
|
7586
|
|
|
1
|
|
|
|
|
84
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
10
|
use constant TEMPLATE => 'debian.tpl'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
152
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub generate { |
15
|
1
|
50
|
33
|
1
|
0
|
1702
|
if ( !ref $_[0] && $_[0] eq __PACKAGE__ ) { |
16
|
1
|
|
|
|
|
2
|
shift; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
else { |
19
|
0
|
|
|
|
|
0
|
croak 'Bad params'; |
20
|
|
|
|
|
|
|
} |
21
|
1
|
|
|
|
|
2
|
my ($options) = @_; |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
13
|
my $generator = __PACKAGE__->new($options); |
24
|
|
|
|
|
|
|
|
25
|
1
|
|
|
|
|
5
|
my $data_location = dist_file('System-InitD', TEMPLATE); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# пока-что так, MVP |
28
|
1
|
|
|
|
|
211
|
$generator->forward_render_params($options, keys %$options); |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
7
|
$generator->write_script($data_location); |
31
|
1
|
|
|
|
|
15
|
return 1; |
32
|
|
|
|
|
|
|
}; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |