File Coverage

lib/Code/Statistics/App/Command/collect.pm
Criterion Covered Total %
statement 15 16 93.7
branch n/a
condition n/a
subroutine 5 6 83.3
pod 3 3 100.0
total 23 25 92.0


line stmt bran cond sub pod time code
1 1     1   16586 use strict;
  1         2  
  1         46  
2 1     1   8 use warnings;
  1         2  
  1         88  
3              
4             package Code::Statistics::App::Command::collect;
5             {
6             $Code::Statistics::App::Command::collect::VERSION = '1.112980';
7             }
8              
9             # ABSTRACT: the shell command handler for stat collection
10              
11 1     1   8 use Code::Statistics::App -command;
  1         2  
  1         12  
12              
13 0     0 1 0 sub abstract { return 'gather measurements on targets and write them to disk' }
14              
15             sub opt_spec {
16 2     2 1 39233 my ( $self ) = @_;
17 2         20 my @opts = (
18             [ 'dirs=s' => 'the directories in which to to search for perl code files' ],
19             [ 'no_dump' => 'prevents writing of measurements to disk' ],
20             [ 'relative_paths' => 'switches file paths in dump from absolute to relative format' ],
21             [ 'foreign_paths=s' => 'file paths in dump are printed in indicated system format; see File::Spec' ],
22             [ 'targets=s' => 'specifies targets that will be looked for inside of files; see C::S::Target::*' ],
23             [ 'metrics=s' => 'specifies metrics that be tried to be measured on targets; see C::S::Metric::*' ],
24             );
25 2         32 return @opts;
26             }
27              
28             sub execute {
29 2     2 1 3415 my ( $self, $opt, $arg ) = @_;
30              
31 2         7 return $self->cstat( %{$opt} )->collect;
  2         38  
32             }
33              
34             1;
35              
36             __END__
37             =pod
38              
39             =head1 NAME
40              
41             Code::Statistics::App::Command::collect - the shell command handler for stat collection
42              
43             =head1 VERSION
44              
45             version 1.112980
46              
47             =head1 AUTHOR
48              
49             Christian Walde <mithaldu@yahoo.de>
50              
51             =head1 COPYRIGHT AND LICENSE
52              
53             This software is Copyright (c) 2010 by Christian Walde.
54              
55             This is free software, licensed under:
56              
57             DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE, Version 2, December 2004
58              
59             =cut
60