File Coverage

blib/lib/App/TemplateCMD/Command/Conf.pm
Criterion Covered Total %
statement 24 32 75.0
branch 0 2 0.0
condition n/a
subroutine 8 10 80.0
pod 2 2 100.0
total 34 46 73.9


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   1910 use strict;
  2         5  
  2         63  
10 2     2   11 use warnings;
  2         5  
  2         68  
11 2     2   497 use version;
  2         2222  
  2         11  
12 2     2   151 use Carp;
  2         6  
  2         159  
13 2     2   693 use Data::Dumper qw/Dumper/;
  2         7825  
  2         153  
14 2     2   573 use English qw/ -no_match_vars /;
  2         1960  
  2         13  
15 2     2   1244 use YAML;
  2         7710  
  2         107  
16 2     2   14 use base qw/App::TemplateCMD::Command/;
  2         4  
  2         929  
17              
18             our $VERSION = version->new('0.6.10');
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__