From 55369919ba83cea0be2dfb6cb1649414b7a6369d Mon Sep 17 00:00:00 2001 From: Alex Sassmannshausen Date: Mon, 15 May 2017 15:26:07 +0200 Subject: [PATCH] Bug 7317: Bugfix: remove `my` statements & dereference. * Koha/Illrequest.pm (available_backends): Remove incorrect `my` statements for @backends variable. (custom_capability): Explicitly dereference `$self->capabilities`. --- Koha/Illrequest.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm index 7778dbe802..145c55ac9a 100644 --- a/Koha/Illrequest.pm +++ b/Koha/Illrequest.pm @@ -355,7 +355,7 @@ $PARAMS, or 0 if $CANDIDATE is an unknown method on backend. sub custom_capability { my ( $self, $candidate, $params ) = @_; - foreach my $capability ( values $self->capabilities ) { + foreach my $capability ( values %{$self->capabilities} ) { if ( $candidate eq $capability->{method} ) { my $response = $self->_backend->$candidate({ @@ -372,8 +372,8 @@ sub available_backends { my ( $self ) = @_; my $backend_dir = $self->_config->backend_dir; my @backends = (); - my @backends = <$backend_dir/*> if ( $backend_dir ); - my @backends = map { basename($_) } @backends; + @backends = <$backend_dir/*> if ( $backend_dir ); + @backends = map { basename($_) } @backends; return \@backends; } -- 2.13.4