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