[Bug 43391] Add POD to all private subroutines/methods
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43391 --- Comment #19 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 208445 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208445&action=edit Bug 43391: Harmonize _type and object_class POD This patch makes the POD of every _type and object_class method in the Koha::Object(s) subclasses identical. Each one is documented under an '=head2 Internal methods' section with one class-agnostic sentence, so it can be copied into new classes unchanged: =head2 Internal methods =head3 _type Returns the name of the DBIx::Class result source this class maps to. =cut =head3 object_class Returns the name of the Koha::Object class this set is made of. =cut Koha::Object and Koha::Objects now show this as the form to use. Changes: - 452 _type and 227 object_class subs use the standard POD. The object_class in Koha::File::Transports is computed, so it keeps its own POD. - The previous variants are removed: empty headings, hand-written descriptions, 49 placeholders from bug 39367, and 140 '=head3 type' headings (a typo for '_type'). - An '=head2 Internal methods' section is added to the 242 files that had none, and 11 'Internal Methods' headings are lower-cased. - 132 '=head2 Class Methods' headings whose only content was _type are removed, as they would be left empty. - In Koha/Report.pm, Koha/StockRotationItem.pm, Koha/StockRotationItems.pm, Koha/StockRotationStage.pm and Koha/Suggestion.pm public methods followed _type, so the constant _type/object_class subs are moved after the last method. This keeps public methods out of the new section. No functional changes. The patch was generated with a script. Apart from the subs moved in those 5 files, the code is identical once POD is stripped. Test plan: 1. Apply this patch 2. Run: $ ktd --shell k$ prove xt/author/pod_checker.t => SUCCESS: Tests pass! 3. Check the POD of a few classes, e.g.: k$ perldoc Koha::Cities k$ perldoc Koha::Objects => SUCCESS: _type and object_class are listed under 'Internal methods' with the standard text, and Koha::Objects shows it as the form to use in new classes 4. Sign off :-D Assisted-by: Opus 5.5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org