line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Setup::Plugin::Config::Basic; |
2
|
21
|
|
|
21
|
|
146
|
use strict; |
|
21
|
|
|
|
|
50
|
|
|
21
|
|
|
|
|
1005
|
|
3
|
21
|
|
|
21
|
|
123
|
use warnings; |
|
21
|
|
|
|
|
49
|
|
|
21
|
|
|
|
|
764
|
|
4
|
21
|
|
|
21
|
|
135
|
use base 'Module::Setup::Plugin'; |
|
21
|
|
|
|
|
45
|
|
|
21
|
|
|
|
|
17903
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub register { |
7
|
78
|
|
|
78
|
0
|
168
|
my($self, ) = @_; |
8
|
78
|
|
|
|
|
534
|
$self->add_trigger( before_dump_config => \&before_dump_config ); |
9
|
|
|
|
|
|
|
} |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub before_dump_config { |
12
|
36
|
|
|
36
|
1
|
2860
|
my($self, $config) = @_; |
13
|
|
|
|
|
|
|
|
14
|
36
|
|
100
|
|
|
351
|
$config->{author} ||= 'Default Name'; |
15
|
36
|
|
|
|
|
273
|
$config->{author} = $self->dialog("Your name: ", $config->{author}); |
16
|
|
|
|
|
|
|
|
17
|
36
|
|
100
|
|
|
485
|
$config->{email} ||= 'default {at} example.com'; |
18
|
36
|
|
|
|
|
163
|
$config->{email} = $self->dialog("Your email: ", $config->{email}); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |