File Coverage

blib/lib/WebDyne/Chain/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::Chain.
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::Chain::Constant;
28 1     1   5 use strict qw(vars);
  1         2  
  1         47  
29 1     1   6 use vars qw($VERSION @ISA %EXPORT_TAGS @EXPORT_OK @EXPORT %Constant);
  1         1  
  1         145  
30 1     1   6 no warnings qw(uninitialized);
  1         2  
  1         211  
31             local $^W=0;
32              
33              
34             # Version information. Must be all on one line
35             #
36             $VERSION='1.003';
37              
38              
39             # Constants are empty, but havin this file allows for import of DEBUG and othe
40             # vars from /etc/constant;
41             #
42             %Constant=();
43              
44              
45             # Export constants to namespace, place in export tags
46             #
47             require Exporter;
48             require WebDyne::Constant;
49             @ISA=qw(Exporter WebDyne::Constant);
50             +__PACKAGE__->local_constant_load(\%Constant);
51             foreach (keys %Constant) { ${$_}=$Constant{$_} }
52             @EXPORT=map { '$'.$_ } keys %Constant;
53             @EXPORT_OK=@EXPORT;
54             %EXPORT_TAGS=(all => [@EXPORT_OK]);
55             $_=\%Constant;