blib/script/cmdline.pl untested

filter: Statementstmt 0.0% 0 / 21 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 29 CC 2 SCAR 12.0
CC
2
Cov
0%
main
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.3
1 #!/usr/bin/env perl
2  
3 use strict;
4 use warnings;
5 use Getopt::Long;
6 use App::ProcTrends::Commandline;
7  
8 exit( main() );
9  
10 sub main {
11 my $ref = {};
12  
13 GetOptions(
14 $ref,
15 "start=s",
16 "end=s",
17 "interval=i",
18 "procs=s",
19 "command=s",
20 "rrd_dir=s",
21 "out_dir=s",
22 "debug",
23 );
24  
25 my $obj = App::ProcTrends::Commandline->new( $ref );
26 my $command = $obj->command();
27
28 my $handler = "${command}_handler";
29 if ( $obj->can( $handler ) ) {
30 $obj->$handler();
31 }
32 else {
33 die "command $command not supported\n";
34 }
35 }