Created attachment 191469 [details] [review] Bug 41622: Make patron export use Koha::CSV This patch introduces Koha::CSV::Patrons and updates misc/export_borrowers.pl to use it, providing consistent CSV generation with proper quoting and delimiter handling. Changes: - Add Koha::CSV::Patrons with dynamic field support - Update misc/export_borrowers.pl to use Koha::CSV::Patrons - Simplify export logic by removing manual CSV handling - Maintain all existing functionality (field selection, custom separator) The new class supports configurable field lists, making it flexible for different patron export scenarios while ensuring consistent CSV formatting. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/CSV/Patrons.t => SUCCESS: Tests pass! 3. Test patron export: k$ misc/export_borrowers.pl --show-header > patrons.csv => SUCCESS: CSV generated with all fields 4. Test with specific fields: k$ misc/export_borrowers.pl -H -f cardnumber -f surname -f firstname > patrons.csv => SUCCESS: Only specified fields exported 5. Test with custom separator: k$ misc/export_borrowers.pl -H -s=";" > patrons.csv => SUCCESS: Semicolon separator used 6. Open CSV in Excel => SUCCESS: Fields display correctly without quote issues 7. Sign off :-D