[Koha-bugs] [Bug 28317] Remove CGI::Session::Serialize::yaml dependency by using the default serializer

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed May 12 08:43:54 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28317

--- Comment #24 from Julian Maurice <julian.maurice at biblibre.com> ---
(In reply to David Cook from comment #20)
> I have third-party apps that can use Koha session data by parsing the YAML.
> It looks like I'll have to think of something much more complicated to deal
> with the change in serialization.
It's not very complicated, you just have to use
`CGI::Session::Serialize::default->thaw($session_data)`

> We could fork CGI::Session::Serialize::yaml and make a
> CGI::Session::Serialize::Koha.
> 
> Ahhh CGI::Session::Serialize::yaml also has an undocumented feature. If you
> look at the source code, you'll see that you can set
> $CGI::Session::Serialize::yaml::Flavour to whatever YAML module you want
> that can use Dump/Load methods. (Note that you'd have to preload it yourself
> with 'use' or 'require'.)
> 
> So... it looks like CGI::Session::Serialize::yaml can work with YAML::XS.
> 
> Personally, it would be awesome if we could retain the use of
> CGI::Session::Serialize::yaml. 
If we really want to stick with YAML, I'd prefer Koha to have its own
implementation rather than relying on an undocumented "feature" (from my point
of view that is not a feature, this is just messing with a module's internal
variables)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list