blib/lib/App/Lorem/Tickit.pm

filter: Statementstmt 77.7% 7 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 83.3% 10 / 12 CC 1 SCAR 0.9
CC
1
Cov
78%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
↑ Summary blib/lib/App/Lorem/Tickit/TextWidget.pm »
1 package App::Lorem::Tickit;
2  
3 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 0 ▶use App::Lorem::Tickit::Widget;
Subroutine BEGIN: called CC=1 SCAR=2.6
7 use Getopt::Std;
8 use Tickit;
9  
10 our $VERSION = 0.01;
11  
12 sub new {
13 my ($class, @params) = @_;
14  
15 # Create object.
16 my $self = bless {}, $class;
17  
18 # Object.
19 return $self;
20 }
21  
22 sub run {
23 my $self = shift;
24  
25 # Process arguments.
26 $self->{'_opts'} = {
27 'h' => 0,
28 };
29 if (! getopts('h', $self->{'_opts'})
30 || $self->{'_opts'}->{'h'}) {
31  
32 print STDERR "Usage: $0 [-h] [--version]\n";
33 print STDERR "\t-h\t\tPrint help.\n";
34 print STDERR "\t--version\tPrint version.\n";
35 return 1;
36 }
37  
38 my $widget = App::Lorem::Tickit::Widget->new(
39 'version' => $VERSION,
40 );
41  
42 Tickit->new('root' => $widget)->run;
43  
44 return 0;
45 }
46  
47 1;
48  
49 __END__
↑ Summary blib/lib/App/Lorem/Tickit/TextWidget.pm »