ASP4/HandlerRunner.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 26 CC 2 SCAR 12.0
CC
2
Cov
0%
run_handler
6.0
new
2.0
context
2.0
CRAP 3.3
1  
2 package ASP4::HandlerRunner;
3  
4 use strict;
5 use warnings 'all';
6  
7  
8 sub new
9 {
10 my ($class, %args) = @_;
11
12 return bless \%args, $class;
13 }# end new()
14  
15  
16 sub context { ASP4::HTTPContext->current }
17  
18  
19 sub run_handler
20 {
21 my ($s, $handler_class, $args) = @_;
22
23 my $handler = $handler_class->new();
24 $handler_class->init_asp_objects( $s->context );
25 $handler_class->before_run( $s->context, $args );
26 if( ! $s->{did_end} )
27 {
28 $handler_class->run( $s->context, $args );
29 $handler_class->after_run( $s->context, $args );
30 }# end if()
31 }# end run_handler()
32  
33 1;# return true:
34