| 1 | # -*- Mode: Perl; indent-tabs-mode: nil; -*- | ||||||||||||
| 2 | |||||||||||||
| 3 | package Servlet::GenericServlet; | ||||||||||||
| 4 | |||||||||||||
| 5 | 2 | ▶ | use fields qw(config); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | 2 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | 2 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | |||||||||||||
| 9 | 0 | ▶ | sub new { | ||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 10 | 0 | my $self = shift; | |||||||||||
| 11 | |||||||||||||
| 12 | 0 | ▶ | $self = fields::new($self) unless ref $self; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 13 | |||||||||||||
| 14 | 0 | $self->{config} = undef; | |||||||||||
| 15 | |||||||||||||
| 16 | 0 | return $self; | |||||||||||
| 17 | } | ||||||||||||
| 18 | |||||||||||||
| 19 | 0 | ▶ | sub destroy { | ||||||||||
|
Subroutine
destroy: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 20 | 0 | my $self = shift; | |||||||||||
| 21 | |||||||||||||
| 22 | 0 | $self->log('destroy'); | |||||||||||
| 23 | |||||||||||||
| 24 | 0 | return 1; | |||||||||||
| 25 | } | ||||||||||||
| 26 | |||||||||||||
| 27 | 0 | ▶ | sub getInitParameter { | ||||||||||
|
Subroutine
getInitParameter: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 28 | 0 | my $self = shift; | |||||||||||
| 29 | 0 | my $name = shift; | |||||||||||
| 30 | |||||||||||||
| 31 | 0 | return $self->getServletConfig()->getInitParameter($name); | |||||||||||
| 32 | } | ||||||||||||
| 33 | |||||||||||||
| 34 | 0 | ▶ | sub getInitParameterNames { | ||||||||||
|
Subroutine
getInitParameterNames: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 35 | 0 | my $self = shift; | |||||||||||
| 36 | |||||||||||||
| 37 | 0 | return $self->getServletConfig()->getInitParameterNames(); | |||||||||||
| 38 | } | ||||||||||||
| 39 | |||||||||||||
| 40 | 0 | ▶ | sub getServletConfig { | ||||||||||
|
Subroutine
getServletConfig: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 41 | 0 | my $self = shift; | |||||||||||
| 42 | |||||||||||||
| 43 | 0 | return $self->{config}; | |||||||||||
| 44 | } | ||||||||||||
| 45 | |||||||||||||
| 46 | 0 | ▶ | sub getServletContext { | ||||||||||
|
Subroutine
getServletContext: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 47 | 0 | my $self = shift; | |||||||||||
| 48 | |||||||||||||
| 49 | 0 | return $self->getServletConfig()->getServletContext(); | |||||||||||
| 50 | } | ||||||||||||
| 51 | |||||||||||||
| 52 | 0 | ▶ | sub getServletInfo { | ||||||||||
|
Subroutine
getServletInfo: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 53 | 0 | my $self = shift; | |||||||||||
| 54 | |||||||||||||
| 55 | 0 | return ''; | |||||||||||
| 56 | } | ||||||||||||
| 57 | |||||||||||||
| 58 | 0 | ▶ | sub getServletName { | ||||||||||
|
Subroutine
getServletName: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 59 | 0 | my $self = shift; | |||||||||||
| 60 | |||||||||||||
| 61 | 0 | return $self->getServletConfig()->getServletName(); | |||||||||||
| 62 | } | ||||||||||||
| 63 | |||||||||||||
| 64 | 0 | ▶ | sub init { | ||||||||||
|
Subroutine
init: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 65 | 0 | my $self = shift; | |||||||||||
| 66 | 0 | my $config = shift; | |||||||||||
| 67 | |||||||||||||
| 68 | 0 | $self->{config} = $config; | |||||||||||
| 69 | 0 | $self->log('init'); | |||||||||||
| 70 | |||||||||||||
| 71 | 0 | return 1; | |||||||||||
| 72 | } | ||||||||||||
| 73 | |||||||||||||
| 74 | 0 | ▶ | sub log { | ||||||||||
|
Subroutine
log: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 75 | 0 | my $self = shift; | |||||||||||
| 76 | 0 | ▶ | my $msg = shift || ''; | ||||||||||
|
Condition0%0/2
shift() || ''
MC/DC0%0/1
shift() || ''
shift()
Truth table0%0/2
A
A= shift()
| |||||||||||||
| 77 | 0 | my $e = shift; | |||||||||||
| 78 | |||||||||||||
| 79 | 0 | my $logmsg = sprintf "%s: %s", $self->getServletName(), $msg; | |||||||||||
| 80 | 0 | return $self->getServletContext()->log($logmsg, $e); | |||||||||||
| 81 | } | ||||||||||||
| 82 | |||||||||||||
| 83 | 0 | ▶ | sub service { | ||||||||||
|
Subroutine
service: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 84 | 0 | my $self = shift; | |||||||||||
| 85 | 0 | my $request = shift; | |||||||||||
| 86 | 0 | my $response = shift; | |||||||||||
| 87 | |||||||||||||
| 88 | 0 | $self->log('service'); | |||||||||||
| 89 | |||||||||||||
| 90 | 0 | return 1; | |||||||||||
| 91 | } | ||||||||||||
| 92 | |||||||||||||
| 93 | 2 | 1; | |||||||||||
| 94 | __END__ | ||||||||||||