projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Anpassung Upgrade-Script an neue Synthax
[kivitendo-erp.git]
/
SL
/
LXDebug.pm
diff --git
a/SL/LXDebug.pm
b/SL/LXDebug.pm
index
ffd4fa1
..
17009dd
100644
(file)
--- a/
SL/LXDebug.pm
+++ b/
SL/LXDebug.pm
@@
-157,7
+157,7
@@
sub warn {
}
sub dump {
}
sub dump {
- my ($self, $level, $name, $variable) = @_;
+ my ($self, $level, $name, $variable
, %options
) = @_;
if ($data_dumper_available) {
my $password;
if ($data_dumper_available) {
my $password;
@@
-168,7
+168,10
@@
sub dump {
my $dumper = Data::Dumper->new([$variable]);
$dumper->Sortkeys(1);
my $dumper = Data::Dumper->new([$variable]);
$dumper->Sortkeys(1);
- $self->message($level, "dumping ${name}:\n" . $dumper->Dump());
+ $dumper->Indent(2);
+ $dumper->$_($options{$_}) for keys %options;
+ my $output = $dumper->Dump();
+ $self->message($level, "dumping ${name}:\n" . $output);
$variable->{password} = $password if (defined $password);
$variable->{password} = $password if (defined $password);
@@
-179,10
+182,14
@@
sub dump {
keys %{ $variable };
}
keys %{ $variable };
}
+ return $output;
+
} else {
$self->message($level,
"dumping ${name}: Data::Dumper not available; "
. "variable cannot be dumped");
} else {
$self->message($level,
"dumping ${name}: Data::Dumper not available; "
. "variable cannot be dumped");
+
+ return undef;
}
}
}
}