Portal/Scripts/logoff.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 25 CC 2 SCAR 12.8
CC
2
Cov
0%
launch
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.6
1 package CGI::Portal::Scripts::logoff;
2 # Copyright (c) 2008 Alexander David P. All rights reserved.
3 #
4 # Remove session
5  
6 use strict;
7  
8 use CGI::Portal::Scripts;
9  
10 use vars qw(@ISA $VERSION);
11  
12 $VERSION = "0.12";
13  
14 @ISA = qw(CGI::Portal::Scripts);
15  
16 1;
17  
18 sub launch {
19 my $self = shift;
20  
21 # Authenticate
22 $self->authenticate_user();
23 if ($self->{'user'}){
24  
25 # Remove session
26 $self->logoff;
27 $self->{'tmpl_vars'}{'result'} = "You are logged off.";
28 }
29  
30 # Assign tmpl
31 $self->assign_tmpl("Sessions.html");
32 }