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   1620 use strict;
  2         3  
  2         51  
10 2     2   10 use warnings;
  2         2  
  2         42  
11 2     2   356 use version;
  2         1463  
  2         10  
12 2     2   109 use Carp;
  2         3  
  2         113  
13 2     2   509 use Data::Dumper qw/Dumper/;
  2         5606  
  2         129  
14 2     2   404 use English qw/ -no_match_vars /;
  2         1365  
  2         22  
15 2     2   979 use YAML;
  2         5738  
  2         96  
16 2     2   12 use base qw/App::TemplateCMD::Command/;
  2         4  
  2         736  
17              
18             our $VERSION = version->new('0.6.11');
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__