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