File Coverage

blib/lib/Data/Session/Base.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition 1 2 50.0
subroutine 5 5 100.0
pod 0 1 0.0
total 21 23 91.3


line stmt bran cond sub pod time code
1             package Data::Session::Base;
2              
3 2     2   658 no autovivification;
  2         5  
  2         19  
4 2     2   167 use strict;
  2         3  
  2         57  
5 2     2   13 use warnings;
  2         5  
  2         75  
6              
7 2     2   20 use Hash::FieldHash ':all';
  2         4  
  2         1484  
8              
9             fieldhash my %cache => 'cache';
10             fieldhash my %data_col_name => 'data_col_name';
11             fieldhash my %data_source => 'data_source';
12             fieldhash my %data_source_attr => 'data_source_attr';
13             fieldhash my %dbh => 'dbh';
14             fieldhash my %debug => 'debug';
15             fieldhash my %deleted => 'deleted';
16             fieldhash my %directory => 'directory';
17             fieldhash my %driver_cless => 'driver_class';
18             fieldhash my %driver_option => 'driver_option';
19             fieldhash my %expired => 'expired';
20             fieldhash my %file_name => 'file_name';
21             fieldhash my %host => 'host';
22             fieldhash my %id => 'id';
23             fieldhash my %id_base => 'id_base';
24             fieldhash my %id_col_name => 'id_col_name';
25             fieldhash my %id_file => 'id_file';
26             fieldhash my %id_class => 'id_class';
27             fieldhash my %id_option => 'id_option';
28             fieldhash my %id_step => 'id_step';
29             fieldhash my %is_new => 'is_new';
30             fieldhash my %modified => 'modified';
31             fieldhash my %name => 'name';
32             fieldhash my %no_flock => 'no_flock';
33             fieldhash my %no_follow => 'no_follow';
34             fieldhash my %password => 'password';
35             fieldhash my %pg_bytea => 'pg_bytea';
36             fieldhash my %pg_text => 'pg_text';
37             fieldhash my %port => 'port';
38             fieldhash my %query => 'query';
39             fieldhash my %query_class => 'query_class';
40             fieldhash my %serializer_class => 'serializer_class';
41             fieldhash my %serializer_option => 'serializer_option';
42             fieldhash my %session => 'session';
43             fieldhash my %socket => 'socket';
44             fieldhash my %table_name => 'table_name';
45             fieldhash my %type => 'type';
46             fieldhash my %umask => 'umask';
47             fieldhash my %username => 'username';
48             fieldhash my %verbose => 'verbose';
49              
50             our $errstr = '';
51             our $VERSION = '1.17';
52              
53             # -----------------------------------------------
54              
55             sub log
56             {
57 1     1 0 4 my($self, $s) = @_;
58 1   50     3 $s ||= '';
59              
60 1         38 print STDERR "# $s\n";
61              
62             } # End of log.
63              
64             # -----------------------------------------------
65              
66             1;
67              
68             =pod
69              
70             =head1 NAME
71              
72             L - A persistent session manager
73              
74             =head1 Synopsis
75              
76             See L for details.
77              
78             =head1 Description
79              
80             Provide a set of methods for all derived classes, including log().
81              
82             =head1 Method: new()
83              
84             This class is never used on its own.
85              
86             =head1 Method: log($s)
87              
88             Print the string to STDERR.
89              
90             If $s is empty, use '' (the empty string), to avoid a warning message.
91              
92             Lastly, the string is output preceeded by a '#', so it does not interfere with test output.
93             That is, log($s) emulates diag $s.
94              
95             =head1 Support
96              
97             Log a bug on RT: L.
98              
99             =head1 Author
100              
101             L was written by Ron Savage Iron@savage.net.auE> in 2010.
102              
103             Home page: L.
104              
105             =head1 Copyright
106              
107             Australian copyright (c) 2010, Ron Savage.
108              
109             All Programs of mine are 'OSI Certified Open Source Software';
110             you can redistribute them and/or modify them under the terms of
111             The Artistic License, a copy of which is available at:
112             http://www.opensource.org/licenses/index.html
113              
114             =cut