https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43391

--- Comment #20 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 208446
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208446&action=edit
Bug 43391: Add POD to private subroutines/methods

This patch adds POD for the 232 private subs in C4/, Koha/ and t/lib/
that had none, as now required by xt/author/pod_coverage.t. Each entry
describes what the sub does, its parameters, return value and
non-obvious side effects. Only POD changes; the code is identical once
POD is stripped.

It also keeps a few POD structure fixes from Jonathan Druart's original
patch on this bug (missing NAME section, misplaced headings).

IMPORTANT: The POD in this patch is LLM-generated and human-curated.
Each entry was written after reading the sub and its callers, but it
still needs other human eyes before it can be trusted. Wrong POD is
worse than no POD, so please review it critically.

Most entries are trivial. The entries below involve non-trivial logic
or behaviour that is easy to misdescribe, and deserve a careful review
against the code:

Complex:
- C4/Acquisition.pm: _cancel_items_receipt
- C4/Auth_with_cas.pm: _get_cas_and_service (authentication)
- C4/Breeding.pm: _add_custom_field_rowdata, _handle_one_result
- C4/Budgets.pm: _recursiveAdd (recursive fund totals)
- C4/Creators/Lib.pm: _build_query, _SELECT (dynamic SQL)
- C4/ImportExportFramework.pm: _import_table (deletes rows)
- C4/Labels/Label.pm: _get_barcode_data (format string parser)
- C4/Reports/Guided.pm: _build_query (dynamic SQL)
- C4/Search.pm: _build_weighted_query
- C4/Serials.pm: _can_do_on_subscription (permissions),
  _delta_units, _get_next_date_week
- C4/SIP/ILS/Transaction/Checkin.pm: _get_sort_bin
- Koha/BackgroundJob/CreateEHoldingsFromBiblios.pm:
  _get_unimarc_mapping
- Koha/Cache/Object.pm: FETCH
- Koha/Edifact/Line.pm: _parse_lines
- Koha/FrameworkPlugin.pm: _load
- Koha/Token.pm: _add_default_csrf_params, _chk_csrf (CSRF)
- Koha/Uploader.pm: _create_file
- t/lib/TestBuilder.pm: _buildColumnValue

Requires care (behaviour differs from what the name suggests, or
depends on caller assumptions):
- C4/Auth_with_cas.pm: _url_with_get_params
- C4/Auth_with_shibboleth.pm: _sync
- C4/Budgets.pm: _round (truncates, does not round)
- C4/ImportExportFramework.pm: _getDataFields, _openODS
- C4/Search.pm: _build_stemmed_operand
- C4/Serials.pm: _handle_seqno
- C4/Service.pm: _output
- C4/Tags.pm: _set_weight, _set_weight_total
- Koha/Authority/ControlledIndicators.pm: _load_pref
- Koha/BackgroundJob/CreateEHoldingsFromBiblios.pm:
  _get_marc21_mapping
- Koha/Cache/Object.pm: CLEAR
- Koha/CookieManager.pm: _should_be_removed
- Koha/Database.pm: _new_schema
- Koha/Notice/Util.pm: _convert_unit, _get_domain_count
- Koha/Token.pm: _chk_jwt
- Koha/Uploader.pm: _hook

While writing this, several possible bugs were spotted in the existing
code. They are documented as-is here (no behaviour change) and will be
reported separately.

Test plan:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove xt/author/pod_coverage.t xt/author/pod_checker.t
=> SUCCESS: Tests pass!
3. Confirm no placeholder POD is added:
  k$ git diff origin/main | grep -c '^+Missing POD for '
=> SUCCESS: 0
4. Review the POD, paying special attention to the entries listed
   above
5. Sign off :-D

Assisted-by: Opus 5.5 (Anthropic)

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to