projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
727d806
)
LXDebug::dump_object zum Dumpen von den Spalten von RDBO-Instanzen
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Tue, 6 Aug 2013 13:54:44 +0000
(15:54 +0200)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 8 Aug 2013 09:38:22 +0000
(11:38 +0200)
Dumpt keine Datenbankhandle, keine Relationships
SL/LXDebug.pm
patch
|
blob
|
history
diff --git
a/SL/LXDebug.pm
b/SL/LXDebug.pm
index
6517d9c
..
d32f458
100644
(file)
--- a/
SL/LXDebug.pm
+++ b/
SL/LXDebug.pm
@@
-213,6
+213,17
@@
sub dump_sql_result {
$self->message($level, $prefix . sprintf('(%d row%s)', scalar @{ $results }, scalar @{ $results } > 1 ? 's' : ''));
}
+sub dump_object {
+ my ($self, $level, $text, $object) = @_;
+
+ my $copy;
+ if ($object) {
+ $copy->{$_} = $object->$_ for $object->meta->columns;
+ }
+
+ $self->dump($level, $text, $copy);
+}
+
sub show_diff {
my ($self, $level, $item1, $item2, %params) = @_;