From a7ee99aa2d732986f2abdd5e7dc0524d5ea6d5f6 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Wed, 30 Apr 2014 18:42:55 +0100 Subject: [PATCH] mkaptsrc: Perl's scoping for `my' variables is bobbins. The scope for a `my' variable doesn't begin until the next statement, which is obviously stupid. --- mkaptsrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkaptsrc b/mkaptsrc index 684f964..b8da270 100755 --- a/mkaptsrc +++ b/mkaptsrc @@ -327,7 +327,7 @@ for my $pair (@SUB) { ## Build an output line. my $out = ""; - defined (my $opt = $a{options}) and $out .= "[ $opt ] "; + if (defined (my $opt = $a{options})) { $out .= "[ $opt ] "; } $out .= "$a{uri} $a{release} $a{components}"; ## Canonify whitespace. -- 2.11.0