File Coverage

blib/lib/WebDyne/Session/Constant.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             #
2             #
3             # Copyright (C) 2006-2010 Andrew Speer .
4             # All rights reserved.
5             #
6             # This file is part of WebDyne::Session.
7             #
8             # WebDyne::Session is free software; you can redistribute it and/or modify
9             # it under the terms of the GNU General Public License as published by
10             # the Free Software Foundation; either version 2 of the License, or
11             # (at your option) any later version.
12             #
13             # This program is distributed in the hope that it will be useful,
14             # but WITHOUT ANY WARRANTY; without even the implied warranty of
15             # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16             # GNU General Public License for more details.
17             #
18             # You should have received a copy of the GNU General Public License
19             # along with this program; if not, write to the Free Software
20             # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21             #
22             #
23              
24              
25             # Constants
26             #
27             package WebDyne::Session::Constant;
28 1     1   7 use strict qw(vars);
  1         1  
  1         38  
29 1     1   5 use vars qw($VERSION @ISA %EXPORT_TAGS @EXPORT_OK @EXPORT %Constant);
  1         2  
  1         106  
30 1     1   6 no warnings qw(uninitialized);
  1         1  
  1         210  
31             local $^W=0;
32              
33              
34             # Version information. Must be all on one line
35             #
36             $VERSION='1.004';
37              
38              
39             # The guts
40             #
41             %Constant = (
42              
43             # This is the name of the cookie the browser will receive to keep session id
44             #
45             WEBDYNE_SESSION_ID_COOKIE_NAME => 'session',
46              
47              
48             );
49              
50              
51             # Export constants to namespace, place in export tags
52             #
53             require Exporter;
54             require WebDyne::Constant;
55             @ISA=qw(Exporter WebDyne::Constant);
56             +__PACKAGE__->local_constant_load(\%Constant);
57             foreach (keys %Constant) { ${$_}=$Constant{$_} }
58             @EXPORT=map { '$'.$_ } keys %Constant;
59             @EXPORT_OK=@EXPORT;
60             %EXPORT_TAGS=(all => [@EXPORT_OK]);
61             $_=\%Constant;