[Koha-devel] some thoughts on #28519 regarding lib

Thomas Klausner domm at plix.at
Tue Jun 15 10:48:19 CEST 2021


Hi!

without knowing a lot of Koha-internals (still..), I'd strongly prefer 
to have all the code in a lib dir (as is standard in Perl apps / modules 
for ages).

There are also a lot of tools available to make using code stored `lib` 
(but not "installed" in the system, i.e. only available in the checkout) 
easy. The simplest is of course 'lib': https://perldoc.perl.org/lib

Or more complex like https://metacpan.org/pod/lib::projectroot (which I 
wrote some time ago to handle a Monorepo setup; it also includes a 
comparison of different modules in the SEE ALSO section)

OTOH, CGI::Session::Serialize is a cpan module, so technically it should 
not be checked out into the app code `lib`, but installed as a 
dependency. There are even more ways to handle installing of 
dependencies and the finding them, but the currently most comfortable 
one is https://metacpan.org/pod/Carton. Or (if running everything via 
Carton is too much of a change), a combination of 
https://metacpan.org/pod/local::lib and a modern CPAN client 
(https://metacpan.org/pod/App::cpanminus or 
https://metacpan.org/pod/App::cpm.

I did not want to spam the actuall ticket with this, as I'm not sure if 
any of this is in fact relevant to the bug, and/or matches the current 
plans for Koha.

Greetings,
domm


-- 
#!/usr/bin/perl                             https://domm.plix.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}


More information about the Koha-devel mailing list