https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36419
Bug ID: 36419
Summary: Ambiguous return value in GetPlugins
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Bug 35536 introduced some better error handling, but made the return value more
erratic.
We you previously had code like this:
```perl
my @plugins = Koha::Plugins->new()->GetPlugins(
{
method => 'ill_backend',
metadata => { name => $backend_id },
all => 1,
errors => 1
}
);
foreach my $plugin (@plugins) { ... }
```
And now the new return value for GetPlugins is:
```perl
return $errors ? ( \@plugins, \@failing ) : @plugins;
```
This means the caller will need to check the return value, and if the arity is
two (?), check that the second element has some specific structure so we
determine... it is not actually a plugin!
I propose we return a hashref with the plugins and (possibly) the errors.
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/