| 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
| |||||||||||
| 25 | |||||||||||
| 26 | 2 | ▶ | $args{days} = $days if $days; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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
| |||||||||||
| 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__ | ||||||||||