[otrs-cvs] otrs/Kernel/System/Scheduler TaskManager.pm,1.20,1.21

"CVS commits notifications of OTRS.org" <[email protected]>
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/otrs/Kernel/System/Scheduler
In directory lancelot:/tmp/cvs-serv9398/Kernel/System/Scheduler

Modified Files:
	TaskManager.pm 
Log Message:
Re-implemented Kernel::System::YAML as OOP.

Author: cr

Index: TaskManager.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/System/Scheduler/TaskManager.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -2 -u -d -r1.20 -r1.21
--- TaskManager.pm	16 Jan 2013 22:56:44 -0000	1.20
+++ TaskManager.pm	17 Jan 2013 03:39:21 -0000	1.21
@@ -90,4 +90,7 @@
     }
 
+    # create additional objects
+    $Self->{YAMLObject} = Kernel::System::YAML->new( %{$Self} );
+
     return $Self;
 }
@@ -135,20 +138,6 @@
     }
 
-    my $Data;
-
-    # eval if data can be converted to YAML
-    eval {
-        # dump data as string
-        $Data = Kernel::System::YAML::Dump( $Param{Data} );
-    };
-
-    # display any YAML error message as a normal otrs error message and return
-    if ($@) {
-        $Self->{LogObject}->Log(
-            Priority => 'error',
-            Message  => $@,
-        );
-        return;
-    }
+    # dump data as string
+    my $Data = $Self->{YAMLObject}->Dump( Data => $Param{Data} );
 
     # check if Data fits in the database
@@ -227,5 +216,5 @@
     while ( my @Data = $Self->{DBObject}->FetchrowArray() ) {
 
-        my $DataParam = Kernel::System::YAML::Load( $Data[0] );
+        my $DataParam = $Self->{YAMLObject}->Load( Data => $Data[0] );
 
         if ( !$DataParam ) {
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.