line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MySQL::Admin::Session; |
2
|
2
|
|
|
2
|
|
574
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
53
|
|
3
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
48
|
|
4
|
2
|
|
|
2
|
|
880
|
use utf8; |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
8
|
|
5
|
|
|
|
|
|
|
require Exporter; |
6
|
2
|
|
|
2
|
|
79
|
use vars qw( $session $DefaultClass @EXPORT @ISA $defaultconfig); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
195
|
|
7
|
|
|
|
|
|
|
@MySQL::Admin::Session::EXPORT = qw(loadSession saveSession $session); |
8
|
2
|
|
|
2
|
|
524
|
use MySQL::Admin::Config; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
774
|
|
9
|
|
|
|
|
|
|
@MySQL::Admin::Session::ISA = qw(Exporter MySQL::Admin::Config); |
10
|
|
|
|
|
|
|
$MySQL::Admin::Session::VERSION = '1.11'; |
11
|
|
|
|
|
|
|
$DefaultClass = 'MySQL::Admin::Session' unless defined $MySQL::Admin::Session::DefaultClass; |
12
|
|
|
|
|
|
|
$defaultconfig = '/var/www/cgi-bin/config/session.pl'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 NAME |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
MySQL::Admin::Session - store the sessions for MySQL::Admin |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 SYNOPSIS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
see l |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 DESCRIPTION |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
session for MySQL::Admin. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head2 EXPORT |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
loadConfig() saveSession() $session |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 Public |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head2 new |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub new { |
37
|
4
|
|
|
4
|
1
|
6
|
my ($class, @initializer) = @_; |
38
|
4
|
|
|
|
|
6
|
my $self = {}; |
39
|
4
|
|
33
|
|
|
21
|
bless $self, ref $class || $class || $DefaultClass; |
40
|
4
|
|
|
|
|
10
|
return $self; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head2 loadSession |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
load session via do from disk. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub loadSession { |
50
|
3
|
|
|
3
|
1
|
303
|
my ($self, @p) = getSelf(@_); |
51
|
3
|
100
|
|
|
|
9
|
my $do = (defined $p[0]) ? $p[0] : $defaultconfig; |
52
|
3
|
100
|
|
|
|
31
|
if (-e $do) { do $do; } |
|
1
|
|
|
|
|
63
|
|
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 saveSession |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub saveSession { |
60
|
1
|
|
|
1
|
1
|
17
|
my ($self, @p) = getSelf(@_); |
61
|
1
|
50
|
|
|
|
3
|
my $l = defined $p[0] ? $p[0] : $defaultconfig; |
62
|
1
|
|
|
|
|
30
|
$self->SUPER::saveConfig($l, $session, 'session'); |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 Private |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 getSelf |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=cut |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub getSelf { |
72
|
4
|
50
|
66
|
4
|
1
|
25
|
return @_ if defined($_[0]) && (!ref($_[0])) && ($_[0] eq 'MySQL::Admin::Session'); |
|
|
|
66
|
|
|
|
|
73
|
4
|
50
|
66
|
|
|
43
|
return (defined($_[0]) |
74
|
|
|
|
|
|
|
&& (ref($_[0]) eq 'MySQL::Admin::Session' |
75
|
|
|
|
|
|
|
|| UNIVERSAL::isa($_[0], 'MySQL::Admin::Session'))) |
76
|
|
|
|
|
|
|
? @_ |
77
|
|
|
|
|
|
|
: ($MySQL::Admin::Session::DefaultClass->new, @_); |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 AUTHOR |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Dirk Lindner |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 see Also |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
L L L L L L |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 LICENSE |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Copyright (C) 2005-2015 by Hr. Dirk Lindner |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or |
93
|
|
|
|
|
|
|
modify it under the terms of the GNU Lesser General Public License |
94
|
|
|
|
|
|
|
as published by the Free Software Foundation; |
95
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, |
96
|
|
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
97
|
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
98
|
|
|
|
|
|
|
GNU Lesser General Public License for more details. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=cut |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
1; |