I propose adding a switch to the koha_perl_deps.pl script so it is more batch friendly. I propose -B (for batch) and make it output just the library name, preserving the other switches semantics. It could be useful to do things like: for k in $(for i in $(./koha_perl_deps.pl -m -B | perl -pi -e 's/::/-/g' | tr '[A-Z]' '[a-z]') do echo lib$i-perl done) do apt-cache search $k done (fix it) to maintain a list of debian packages needed, and stuff like that.
I'd suggestion -b, since hitting shift is an extra key. ;) Additionally, a -r for "Required = Yes" type modules only. I'm working on this, but I am not able to submit patches, as I'm working on this under CentOS. :) See bug 8517. It is related, but not required for this.
Created attachment 11220 [details] [review] Added -b and -r options to koha_perl_deps.pl, fixed up help information. This patch should apply to 3.6.X, 3.8.X, and master. koha_perl_deps.pl was identical in all of them. :)
I set the version to unspecified, as this patch applies to 3.6.x, 3.8.x, AND master. Let me know if there are any problems.
Created attachment 11255 [details] [review] Bug 8485 - Make koha_perl_deps.pl batch friendly Added a -b flag for brief which outputs only the perl library name (Foo::BaR), and added a -r flag for required which filters the list to required=Yes perl libraries. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Created attachment 11342 [details] [review] Bug 8485 - Make koha_perl_deps.pl batch friendly Added a -b flag for brief which outputs only the perl library name (Foo::BaR), and added a -r flag for required which filters the list to required=Yes perl libraries. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
QA comments: Works as expected, marked as Passed QA
Patch pushed chris_c = Could be worth porting it to 3.8
I know with 3.10 out in November that 3.6.x will approach EOL, but perhaps 3.6.x too?