From 268c80fda1e7620c658adb9106095ca64674ea17 Mon Sep 17 00:00:00 2001 From: Hilko Bengen Date: Wed, 30 Mar 2011 20:39:46 +0200 Subject: [PATCH] perlcritic: Variable declared in conditional statement This should not cause any behavioral changes. --- lib/WB/QD.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/WB/QD.pm b/lib/WB/QD.pm index 25d2fb0..58b4527 100644 --- a/lib/WB/QD.pm +++ b/lib/WB/QD.pm @@ -52,8 +52,9 @@ sub readsourcebins { if ($srcs->{$p->{'name'}}) { next if (vercmp($srcs->{$p->{'name'}}->{'version'}, $p->{'version'}) > 0); } - my @a = split(/,? /, $p->{'binary'}) if $p->{'binary'}; - $p->{'binary'} = \@a; + if ($p->{'binary'}) { + $p->{'binary'} = [ split(/,? /, $p->{'binary'}) ]; + } $srcs->{$p->{'name'}} = $p; } close $S; -- 2.39.2