File Coverage

lib/Code/Statistics/App.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 2 2 100.0
total 26 26 100.0


line stmt bran cond sub pod time code
1 1     1   126554 use strict;
  1         3  
  1         35  
2 1     1   6 use warnings;
  1         2  
  1         68  
3              
4             package Code::Statistics::App;
5             {
6             $Code::Statistics::App::VERSION = '1.112980';
7             }
8              
9             # ABSTRACT: handles global command configuration and cstat instantiation
10              
11 1     1   732 use App::Cmd::Setup -app;
  1         84348  
  1         9  
12              
13 1     1   498 use Code::Statistics;
  1         4  
  1         201  
14              
15             sub global_opt_spec {
16 6     6 1 128867 my @opts = (
17             [ 'global_conf_file|g=s' => 'path to the global config file' ],
18             [ 'conf_file|c=s' => 'path to the local config file' ],
19             [ 'profile|p=s' => 'a configuration profile' ],
20             );
21 6         54 return @opts;
22             }
23              
24              
25             sub cstat {
26 3     3 1 49 my ( $self, %command_args ) = @_;
27              
28 3         6 my %args = ( %{ $self->global_options }, command => ( $self->get_command( @ARGV ) )[0], );
  3         16  
29              
30 3         3863 return Code::Statistics->new( %args, args => \%command_args );
31             }
32              
33             1;
34              
35             __END__
36             =pod
37              
38             =head1 NAME
39              
40             Code::Statistics::App - handles global command configuration and cstat instantiation
41              
42             =head1 VERSION
43              
44             version 1.112980
45              
46             =head2 cstat
47             Creates a Code::Statistics object with the given commandline args.
48              
49             =head1 AUTHOR
50              
51             Christian Walde <mithaldu@yahoo.de>
52              
53             =head1 COPYRIGHT AND LICENSE
54              
55             This software is Copyright (c) 2010 by Christian Walde.
56              
57             This is free software, licensed under:
58              
59             DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE, Version 2, December 2004
60              
61             =cut
62