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:
5712091
)
Funktion zum Dumpen von Objekten via YAML hinzugefĆ¼gt. Ist manchmal besser lesbar...
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Fri, 1 Jun 2007 07:39:05 +0000
(07:39 +0000)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Fri, 1 Jun 2007 07:39:05 +0000
(07:39 +0000)
SL/LXDebug.pm
patch
|
blob
|
history
diff --git
a/SL/LXDebug.pm
b/SL/LXDebug.pm
index
6da1a72
..
cbb32f9
100644
(file)
--- a/
SL/LXDebug.pm
+++ b/
SL/LXDebug.pm
@@
-14,6
+14,8
@@
use constant STDERR_TARGET => 1;
use POSIX qw(strftime);
+use YAML;
+
my $data_dumper_available;
our $global_level;
@@
-133,6
+135,12
@@
sub dump {
}
}
+sub dump_yaml {
+ my ($self, $level, $name, $variable) = @_;
+
+ $self->message($level, "dumping ${name}:\n" . YAML::Dump($variable));
+}
+
sub enable_sub_tracing {
my ($self) = @_;
$self->{level} | TRACE;