File Coverage

blib/lib/Data/Session/ID.pm
Criterion Covered Total %
statement 28 28 100.0
branch n/a
condition 9 17 52.9
subroutine 7 7 100.0
pod 0 1 0.0
total 44 53 83.0


line stmt bran cond sub pod time code
1             package Data::Session::ID;
2              
3 2     2   965 use parent 'Data::Session::Base';
  2         4  
  2         16  
4 2     2   144 no autovivification;
  2         5  
  2         16  
5 2     2   138 use strict;
  2         4  
  2         143  
6 2     2   15 use warnings;
  2         3  
  2         89  
7              
8 2     2   11 use File::Spec;
  2         12  
  2         57  
9              
10 2     2   11 use Hash::FieldHash ':all';
  2         4  
  2         801  
11              
12             fieldhash my %id_length => 'id_length';
13              
14             our $errstr = '';
15             our $VERSION = '1.18';
16              
17             # -----------------------------------------------
18              
19             sub init
20             {
21 60     60 0 232 my($class, $arg) = @_;
22 60   50     380 $$arg{debug} ||= 0;
23 60   100     313 $$arg{id} ||= 0;
24 60   50     185 $$arg{id_base} ||= 0; # For AutoIncrement (AI).
25 60   33     182 $$arg{id_file} ||= File::Spec -> catdir(File::Spec -> tmpdir, 'data.session.id'); # For AI.
26 60         156 $$arg{id_length} = 0; # For UUID.
27 60   50     178 $$arg{id_step} ||= 1; # For AI.
28 60   50     277 $$arg{no_flock} ||= 0;
29 60   50     247 $$arg{umask} ||= 0660;
30 60   50     213 $$arg{verbose} ||= 0;
31              
32             } # End of init.
33              
34             # -----------------------------------------------
35              
36             1;
37              
38             =pod
39              
40             =head1 NAME
41              
42             L - A persistent session manager
43              
44             =head1 Synopsis
45              
46             See L for details.
47              
48             =head1 Description
49              
50             L is the parent of all L modules.
51              
52             =head1 Case-sensitive Options
53              
54             See L for important information.
55              
56             =head1 Support
57              
58             Log a bug on RT: L.
59              
60             =head1 Author
61              
62             L was written by Ron Savage Iron@savage.net.auE> in 2010.
63              
64             Home page: L.
65              
66             =head1 Copyright
67              
68             Australian copyright (c) 2010, Ron Savage.
69              
70             All Programs of mine are 'OSI Certified Open Source Software';
71             you can redistribute them and/or modify them under the terms of
72             The Artistic License, a copy of which is available at:
73             http://www.opensource.org/licenses/index.html
74              
75             =cut