File Coverage

blib/lib/RapidApp/View/Printview.pm
Criterion Covered Total %
statement 9 15 60.0
branch 0 2 0.0
condition n/a
subroutine 3 4 75.0
pod 1 1 100.0
total 13 22 59.0


line stmt bran cond sub pod time code
1             package RapidApp::View::Printview;
2              
3 4     4   2505 use strict;
  4         8  
  4         105  
4 4     4   22 use warnings;
  4         8  
  4         129  
5              
6 4     4   20 use base 'Catalyst::View::TT';
  4         8  
  4         776  
7              
8             __PACKAGE__->config(TEMPLATE_EXTENSION => '.tt');
9              
10             sub process {
11 0     0 1   my ($self, $c)= @_;
12            
13 0           $c->response->header('Cache-Control' => 'no-cache');
14 0           $c->stash->{template} = 'templates/rapidapp/ext_printview.tt';
15            
16             # make sure config_params is a string of JSON
17 0 0         if (ref $c->stash->{config_params}) {
18 0           $c->stash->{config_params}= RapidApp::JSON::MixedEncoder::encode_json($c->stash->{config_params});
19             }
20            
21 0           return $self->SUPER::process($c);
22             }
23              
24             1;