Koha/lib/CGI/Session/Serialize/yamlxs.pm
David Cook 40089a0a53 Bug 28519: Put CGI::Session::Serialize::yamlxs in lib directory
This patch adds a "lib" directory to the source tree which gets
mapped to the same directory as "C4" and "Koha" for single and
standard installations.

CGI::Session::Serialize::yamlxs is put into this "lib" directory.

This patch also includes some changes so that dev/git installations
work as well.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-06-17 10:07:36 +02:00

22 lines
415 B
Perl

package CGI::Session::Serialize::yamlxs;
use strict;
use warnings;
use CGI::Session::ErrorHandler;
use YAML::XS ();
$CGI::Session::Serialize::yamlxs::VERSION = '0.1';
@CGI::Session::Serialize::yamlxs::ISA = ( "CGI::Session::ErrorHandler" );
sub freeze {
my ($self, $data) = @_;
return YAML::XS::Dump($data);
}
sub thaw {
my ($self, $string) = @_;
return (YAML::XS::Load($string))[0];
}
1;