Bug 27760: (QA follow-up) Improve POD
This patch improves the POD for the added helper, and also adds references to the JSON::Validator issue that explains the current implementation. A FIXME is added for when we upgrade our used JSON::Validator version. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
25b08f9989
commit
c80d4655cc
1 changed files with 12 additions and 0 deletions
|
@ -268,7 +268,19 @@ Merges parameters from $q_params into $filtered_params.
|
|||
|
||||
=head3 stash_overrides
|
||||
|
||||
# Stash the overrides
|
||||
$c->stash_overrides();
|
||||
#Use it
|
||||
my $overrides = $c->stash('koha.overrides');
|
||||
if ( $overrides->{pickup_location} ) { ... }
|
||||
|
||||
This helper method parses 'x-koha-override' headers and stashes the passed overriders
|
||||
in the for of a I<hashref> for easy use in controller methods.
|
||||
|
||||
FIXME: With the currently used JSON::Validator version we use, it is not possible to
|
||||
use the validated and coerced data (it doesn't validate array-type headers) so this
|
||||
implementation relies on manual parsing. Look at the JSON::Validator changelog for
|
||||
reference: https://metacpan.org/changes/distribution/JSON-Validator#L14
|
||||
|
||||
=cut
|
||||
|
||||
|
|
Loading…
Reference in a new issue