Koha/lib/CGI/Session/Serialize/yamlxs.pm
David Cook f4bede3469 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>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2021-06-18 11:23:42 -04: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;