Portal/Controls/logoff.pm untested

filter: Statementstmt 0.0% 0 / 22 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 30 CC 2 SCAR 12.0
CC
2
Cov
0%
launch
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.3
1 package CGI::Portal::Controls::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::logon;
9 use CGI::Portal::Scripts;
10  
11 use vars qw(@ISA $VERSION);
12  
13 $VERSION = "0.12";
14  
15 @ISA = qw(CGI::Portal::Scripts);
16  
17 1;
18  
19 sub launch {
20 my $self = shift;
21  
22 # Authenticate
23 $self->authenticate_user();
24 if ($self->{'user'}){
25  
26 # Remove session
27 $self->logoff;
28 $self->{'tmpl_vars'}{'result'} = "You are logged off.";
29 }
30  
31 # Redirect
32 $self->CGI::Portal::Scripts::logon::launch();
33 return;
34 }