From bf246586e8bafe3b9e36e0f26ea6450d6bb20de6 Mon Sep 17 00:00:00 2001 From: stdweird Date: Thu, 13 Aug 2015 12:32:06 +0200 Subject: [PATCH] Address remarks made --- src/main/conf/quattor-ccm | 2 +- src/main/perl/Options.pm | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/conf/quattor-ccm b/src/main/conf/quattor-ccm index 10155215..cd164f17 100644 --- a/src/main/conf/quattor-ccm +++ b/src/main/conf/quattor-ccm @@ -12,7 +12,7 @@ _quattor_find_bin() { local dir bin fn fn="$1" - # use the "slow" sed here + for dir in `echo $PATH | sed 's/:/ /g'`; do bin="$dir/$fn" if [ -x "$bin" ]; then diff --git a/src/main/perl/Options.pm b/src/main/perl/Options.pm index 35897c75..418409de 100644 --- a/src/main/perl/Options.pm +++ b/src/main/perl/Options.pm @@ -281,8 +281,7 @@ sub add_actions my ($self, $newactions) = @_; while (my ($action, $help) = each %$newactions) { - my $method = $self->can("action_$action"); - if($method) { + if($self->can("action_$action")) { $_actions->{$action} = $help; } else { $self->warn("Not adding non-existing action $action");