David Cook
f4bede3469
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>
22 lines
415 B
Perl
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;
|