blib/lib/Tapper/Reports/Web/Controller/Base.pm

filter: Statementstmt 84.8% 28 / 33 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod n/a totaltotal 80.4% 37 / 46 CC 4 SCAR 6.5
CC
4
Cov
79%
prepare_filter_path
3.1
begin
2.0
reduced_filter_path
2.0
CRAP 1.9
« blib/script/tapper_reports_web_test.pl ↑ Summary blib/lib/Tapper/Reports/Web.pm »
1 package Tapper::Reports::Web::Controller::Base;
2 34 our $AUTHORITY = 'cpan:TAPPER';
3 34 $Tapper::Reports::Web::Controller::Base::VERSION = '5.0.17';
4 34 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 34 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 34 ▶use parent qw(Catalyst::Controller::HTML::FormFu);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9  
10 sub reduced_filter_path
11 0 ▶{
Subroutine reduced_filter_path: not called CC=1 SCAR=6.9
12 0 my ($self, $filters, $remove) = @_;
13 0 my %new_filters = %$filters;
14 0 delete $new_filters{$remove};
15 0 return join('/', %new_filters );
16 }
17  
18  
19 sub prepare_filter_path
20 2 ▶{
Subroutine prepare_filter_path: called CC=3 SCAR=11.2
21 2 my ($self, $c, $days) = @_;
22 2 my @args = @{$c->req->arguments};
23 2 my %args;
24 2 ▶ %args = @args if (int @args % 2 == 0);
Branch: 1 branch
BranchTrueFalseTotal
if int @args % 2 == 0 2 0 2
25  
26 2 ▶ $args{days} = $days if $days;
Branch: 1 branch
BranchTrueFalseTotal
if $days 0 2 2
27  
28 2 return join('/', %args );
29 }
30  
31  
32 21 ▶sub begin :Private
Subroutine begin: called CC=2 SCAR=7.1
33 {
34 21 my ( $self, $c ) = @_;
35  
36 21 require Tapper::Config;
37 21 ▶ if (Tapper::Config->subconfig->{web}->{we_have_a_problem}) {
Branch: 1 branch
BranchTrueFalseTotal
if ("Tapper::Config"->subconfig->{"web"}{"we_have_a_problem"}) 0 21 21
38 0 $c->stash->{we_have_a_problem} = Tapper::Config->subconfig->{web}->{we_have_a_problem};
39 }
40 21 $c->stash->{logo} = Tapper::Config->subconfig->{web}{logo};
41 21 $c->stash->{title} = Tapper::Config->subconfig->{web}{title};
42 21 $c->stash->{footer} = Tapper::Config->subconfig->{web}{footer};
43 34 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
44  
45  
46 34 1;
47  
48 __END__
« blib/script/tapper_reports_web_test.pl ↑ Summary blib/lib/Tapper/Reports/Web.pm »