line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MySQL::Admin::Actions; |
2
|
2
|
|
|
2
|
|
6
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
41
|
|
3
|
2
|
|
|
2
|
|
6
|
use warnings; |
|
2
|
|
|
|
|
1
|
|
|
2
|
|
|
|
|
32
|
|
4
|
2
|
|
|
2
|
|
4
|
use utf8; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
6
|
|
5
|
|
|
|
|
|
|
require Exporter; |
6
|
2
|
|
|
2
|
|
47
|
use vars qw($m_hrActions $DefaultClass @EXPORT @ISA $defaultconfig); |
|
2
|
|
|
|
|
1
|
|
|
2
|
|
|
|
|
112
|
|
7
|
|
|
|
|
|
|
@MySQL::Admin::Actions::EXPORT = qw(loadActions saveActions $m_hrActions); |
8
|
2
|
|
|
2
|
|
6
|
use MySQL::Admin::Config; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
535
|
|
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 = '%CONFIG%'; |
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
|
2
|
|
|
2
|
1
|
6
|
my ($class, @initializer) = @_; |
58
|
2
|
|
|
|
|
3
|
my $self = {}; |
59
|
2
|
|
33
|
|
|
14
|
bless $self, ref $class || $class || $DefaultClass; |
60
|
2
|
|
|
|
|
6
|
return $self; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 loadActions |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=cut |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub loadActions { |
68
|
2
|
|
|
2
|
1
|
6
|
my ($self, @p) = getSelf(@_); |
69
|
2
|
50
|
|
|
|
5
|
my $do = (defined $p[0]) ? $p[0] : $defaultconfig; |
70
|
2
|
50
|
|
|
|
21
|
if (-e $do) { do $do; } |
|
0
|
|
|
|
|
0
|
|
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head2 saveActions |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub saveActions { |
78
|
0
|
|
|
0
|
1
|
0
|
my ($self, @p) = getSelf(@_); |
79
|
0
|
|
|
|
|
0
|
$self->SUPER::saveConfig(@p, $m_hrActions, 'actions'); |
80
|
|
|
|
|
|
|
} |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 Private |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 getSelf |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=cut |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
sub getSelf { |
89
|
2
|
0
|
33
|
2
|
1
|
8
|
return @_ if defined($_[0]) && (!ref($_[0])) && ($_[0] eq 'MySQL::Admin::Actions'); |
|
|
|
33
|
|
|
|
|
90
|
2
|
50
|
33
|
|
|
22
|
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; |