projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Module: gebundletes YAML durch dünnen Wrapper über YAML::XS & YAML ersetzt
[kivitendo-erp.git]
/
SL
/
DB
/
BackgroundJob.pm
diff --git
a/SL/DB/BackgroundJob.pm
b/SL/DB/BackgroundJob.pm
index
2040297
..
1fc8d99
100644
(file)
--- a/
SL/DB/BackgroundJob.pm
+++ b/
SL/DB/BackgroundJob.pm
@@
-11,6
+11,7
@@
use SL::DB::MetaSetup::BackgroundJob;
use SL::DB::Manager::BackgroundJob;
use SL::System::Process;
use SL::DB::Manager::BackgroundJob;
use SL::System::Process;
+use SL::YAML;
__PACKAGE__->meta->initialize;
__PACKAGE__->meta->initialize;
@@
-75,16
+76,19
@@
sub run {
sub data_as_hash {
my $self = shift;
sub data_as_hash {
my $self = shift;
+
+ $self->data(SL::YAML::Dump($_[0])) if @_;
+
return {} if !$self->data;
return $self->data if ref($self->{data}) eq 'HASH';
return {} if !$self->data;
return $self->data if ref($self->{data}) eq 'HASH';
- return YAML::Load($self->{data}) if !ref($self->{data});
+ return
SL::
YAML::Load($self->{data}) if !ref($self->{data});
return {};
}
sub set_data {
my ($self, %data) = @_;
return {};
}
sub set_data {
my ($self, %data) = @_;
- $self->data(YAML::Dump({
+ $self->data(
SL::
YAML::Dump({
%{ $self->data_as_hash },
%data,
}));
%{ $self->data_as_hash },
%data,
}));