line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MySQL::Admin::Actions; |
2
|
2
|
|
|
2
|
|
383
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
57
|
|
3
|
2
|
|
|
2
|
|
7
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
41
|
|
4
|
2
|
|
|
2
|
|
569
|
use utf8; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
7
|
|
5
|
|
|
|
|
|
|
require Exporter; |
6
|
2
|
|
|
2
|
|
74
|
use vars qw($m_hrActions $DefaultClass @EXPORT @ISA $defaultconfig); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
144
|
|
7
|
|
|
|
|
|
|
@MySQL::Admin::Actions::EXPORT = qw(loadActions saveActions $m_hrActions); |
8
|
2
|
|
|
2
|
|
327
|
use MySQL::Admin::Config; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
585
|
|
9
|
|
|
|
|
|
|
@MySQL::Admin::Actions::ISA = qw( Exporter MySQL::Admin::Config); |
10
|
|
|
|
|
|
|
$MySQL::Admin::Actions::VERSION = '1.12'; |
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
|
9
|
my ($class, @initializer) = @_; |
58
|
4
|
|
|
|
|
2
|
my $self = {}; |
59
|
4
|
|
33
|
|
|
18
|
bless $self, ref $class || $class || $DefaultClass; |
60
|
4
|
|
|
|
|
11
|
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
|
|
|
|
8
|
my $do = (defined $p[0]) ? $p[0] : $defaultconfig; |
70
|
3
|
100
|
|
|
|
30
|
if (-e $do) { do $do; } |
|
1
|
|
|
|
|
51
|
|
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head2 saveActions |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub saveActions { |
78
|
1
|
|
|
1
|
1
|
15
|
my ($self, @p) = getSelf(@_); |
79
|
1
|
|
|
|
|
12
|
$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
|
32
|
return @_ if defined($_[0]) && (!ref($_[0])) && ($_[0] eq 'MySQL::Admin::Actions'); |
|
|
|
66
|
|
|
|
|
90
|
4
|
50
|
66
|
|
|
44
|
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; |