Summary: | Ambiguous return value in GetPlugins | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Architecture, internals, and plumbing | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | In Discussion --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | jonathan.druart, kyle, m.de.rooy, martin.renvoize, nick, pedro.amorim, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 35536 | ||
Bug Blocks: | |||
Attachments: |
[POC] Bug 36419: Use wantarray to control return value
Bug 36419: Use wantarray to control return value |
Description
Tomás Cohen Arazi (tcohen)
2024-03-25 17:01:32 UTC
I have now noticed that the `errors => 1` from the original code was the one preventing it to work. So I'll lower the importance to enhancement, but want to propose a signature change here. For discussion. Created attachment 163850 [details] [review] [POC] Bug 36419: Use wantarray to control return value Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 163895 [details] [review] Bug 36419: Use wantarray to control return value Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Looks good to me! Idea is fine with me, current implementation would fail. Should we only return this good, bad (and ugly) if the errors param was passed? Otherwise we will need to examine all calls of GetPlugins without errors => 1 too. Plugins.t fails on a call now with errors, expecting the old returns. (In reply to Marcel de Rooy from comment #5) > Idea is fine with me, current implementation would fail. > Should we only return this good, bad (and ugly) if the errors param was > passed? > Otherwise we will need to examine all calls of GetPlugins without errors => > 1 too. > > Plugins.t fails on a call now with errors, expecting the old returns. Correct! I believe this patch is just a POC and not expected to fully function. |