line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::TemplateCMD::Command::Conf; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Created on: 2008-03-26 13:43:41 |
4
|
|
|
|
|
|
|
# Create by: ivanw |
5
|
|
|
|
|
|
|
# $Id$ |
6
|
|
|
|
|
|
|
# $Revision$, $HeadURL$, $Date$ |
7
|
|
|
|
|
|
|
# $Revision$, $Source$, $Date$ |
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
1365
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
47
|
|
10
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
36
|
|
11
|
2
|
|
|
2
|
|
315
|
use version; |
|
2
|
|
|
|
|
1436
|
|
|
2
|
|
|
|
|
9
|
|
12
|
2
|
|
|
2
|
|
105
|
use Carp; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
87
|
|
13
|
2
|
|
|
2
|
|
462
|
use Data::Dumper qw/Dumper/; |
|
2
|
|
|
|
|
5336
|
|
|
2
|
|
|
|
|
87
|
|
14
|
2
|
|
|
2
|
|
380
|
use English qw/ -no_match_vars /; |
|
2
|
|
|
|
|
1246
|
|
|
2
|
|
|
|
|
10
|
|
15
|
2
|
|
|
2
|
|
922
|
use YAML; |
|
2
|
|
|
|
|
5365
|
|
|
2
|
|
|
|
|
105
|
|
16
|
2
|
|
|
2
|
|
11
|
use base qw/App::TemplateCMD::Command/; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
685
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our $VERSION = version->new('0.6.12'); |
19
|
|
|
|
|
|
|
our @EXPORT_OK = qw//; |
20
|
|
|
|
|
|
|
our %EXPORT_TAGS = (); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub process { |
23
|
0
|
|
|
0
|
1
|
|
my ($self, $cmd, %options) = @_; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
my $conf = $cmd->config(); |
26
|
|
|
|
|
|
|
|
27
|
0
|
0
|
|
|
|
|
if ($options{verbose}) { |
28
|
0
|
|
|
|
|
|
print {*STDERR} "Default config is $cmd->{config_default}\n"; |
|
0
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
return Dump $conf; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub help { |
35
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
return <<"HELP"; |
38
|
|
|
|
|
|
|
$0 conf [options] |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Options |
41
|
|
|
|
|
|
|
-v --verbose Gives more information about config files used/found |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Displays the configuration as generated by all found config files and any |
44
|
|
|
|
|
|
|
generated values so that you can see what your values templates are actually |
45
|
|
|
|
|
|
|
getting. The verbose prints the config files used and which ones were |
46
|
|
|
|
|
|
|
actually found. |
47
|
|
|
|
|
|
|
HELP |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
__END__ |