Subroutines specific to dealing with files. Maybe some day evolve to a true wrapper for all file operations.
Created attachment 68384 [details] [review] Bug 19512 - Koha::File - wrapper/utility routines for file handling Add getDiagnostics() usable by Exceptions to gather more information about a file and why accessing it failed.
Olle, first I have to say I like the idea of file wrapper, I've tried to test this but: test Koha/File.t is not passing for me Both test warn: Use of uninitialized value $ENV{"KOHA_PATH"} in concatenation (.) or string koha qa tools has also some complains: FAIL Koha/Exceptions/File.pm FAIL pod =head2 without preceding higher level *** WARNING: in file Koha/Exceptions/File.pm FAIL pod coverage POD is missing for Fields POD is missing for description POD is missing for path POD is missing for stat FAIL Koha/File.pm FAIL critic "return" statement with explicit "undef" at line 36, column 5. See page 199 of PBP. FAIL pod coverage POD is missing for 'getDiagnosticsString' FAIL t/Koha/Exceptions/File.t FAIL spelling throughly ==> thoroughly FAIL t/Koha/File.t FAIL critic Integer with leading zeros: "07777" at line 20, column 50. See page 58 of PBP.
Created attachment 68452 [details] [review] Bug 19512 - Koha::File - wrapper/utility routines for file handling Add getDiagnostics() usable by Exceptions to gather more information about a file and why accessing it failed. Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 68453 [details] [review] Bug 19512: silence noise when KOHA_PATH undefined. If you run the tests with KOHA_PATH unset, this bombs. Apply the patch, and it copes by guessing the current directory. Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 68454 [details] [review] Bug 19512: Make pass koha qa test tools Can't seem to get the pod coverage correct for one file. This fixes the others. Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
(In reply to Josef Moravec from comment #2) > FAIL pod coverage > POD is missing for Fields > POD is missing for description > POD is missing for path > POD is missing for stat Still Failed QA because of this. But I can't figure out where these subs are defined. It makes no sense.