Revision ed944ca3
Von Sven Schöling vor etwa 15 Jahren hinzugefügt
SL/DBUtils.pm | ||
---|---|---|
1 | 1 |
package SL::DBUtils; |
2 | 2 |
|
3 | 3 |
require Exporter; |
4 |
@ISA = qw(Exporter); |
|
4 |
our @ISA = qw(Exporter);
|
|
5 | 5 |
|
6 |
@EXPORT = qw(conv_i conv_date conv_dateq do_query selectrow_query do_statement |
|
6 |
our @EXPORT = qw(conv_i conv_date conv_dateq do_query selectrow_query do_statement
|
|
7 | 7 |
dump_query quote_db_date |
8 | 8 |
selectfirst_hashref_query selectfirst_array_query |
9 | 9 |
selectall_hashref_query selectall_array_query |
... | ... | |
36 | 36 |
|
37 | 37 |
my ($form, $dbh, $query) = splice(@_, 0, 3); |
38 | 38 |
|
39 |
dump_query(LXDebug::QUERY, '', $query, @_);
|
|
39 |
dump_query(LXDebug->QUERY(), '', $query, @_);
|
|
40 | 40 |
|
41 | 41 |
my $result; |
42 | 42 |
if (0 == scalar(@_)) { |
... | ... | |
57 | 57 |
|
58 | 58 |
my ($form, $sth, $query) = splice(@_, 0, 3); |
59 | 59 |
|
60 |
dump_query(LXDebug::QUERY, '', $query, @_);
|
|
60 |
dump_query(LXDebug->QUERY(), '', $query, @_);
|
|
61 | 61 |
|
62 | 62 |
my $result; |
63 | 63 |
if (0 == scalar(@_)) { |
... | ... | |
74 | 74 |
sub dump_query { |
75 | 75 |
my ($level, $msg, $query) = splice(@_, 0, 3); |
76 | 76 |
|
77 |
my $filename = $self_filename = 'SL/DBUtils.pm'; |
|
78 |
my $caller_level; |
|
77 |
my $self_filename = 'SL/DBUtils.pm'; |
|
78 |
my $filename = $self_filename; |
|
79 |
my ($caller_level, $line, $subroutine); |
|
79 | 80 |
while ($filename eq $self_filename) { |
80 | 81 |
(undef, $filename, $line, $subroutine) = caller $caller_level++; |
81 | 82 |
} |
... | ... | |
111 | 112 |
|
112 | 113 |
my ($form, $dbh, $query) = splice(@_, 0, 3); |
113 | 114 |
|
114 |
dump_query(LXDebug::QUERY, '', $query, @_);
|
|
115 |
dump_query(LXDebug->QUERY(), '', $query, @_);
|
|
115 | 116 |
|
116 | 117 |
my $sth = $dbh->prepare($query) || $form->dberror($query); |
117 | 118 |
|
... | ... | |
125 | 126 |
|
126 | 127 |
my ($form, $dbh, $query) = splice(@_, 0, 3); |
127 | 128 |
|
128 |
dump_query(LXDebug::QUERY, '', $query, @_);
|
|
129 |
dump_query(LXDebug->QUERY(), '', $query, @_);
|
|
129 | 130 |
|
130 | 131 |
my $sth = $dbh->prepare($query) || $form->dberror($query); |
131 | 132 |
if (scalar(@_) != 0) { |
Auch abrufbar als: Unified diff
Bugfix in SL/Menu und weitere stricts.