summaryrefslogtreecommitdiffstats
path: root/perl-install/mirror.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-01-18 13:52:00 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-01-18 13:52:00 +0000
commitf29cd86fbd748de5a623bd75b2f8ac320c5ce2b9 (patch)
treeac68dd9ae9bc47815cd1b9ba53979dc25766280d /perl-install/mirror.pm
parent7ee91f13918cdf5e69091006cd9f7197dc583284 (diff)
downloaddrakx-f29cd86fbd748de5a623bd75b2f8ac320c5ce2b9.tar
drakx-f29cd86fbd748de5a623bd75b2f8ac320c5ce2b9.tar.gz
drakx-f29cd86fbd748de5a623bd75b2f8ac320c5ce2b9.tar.bz2
drakx-f29cd86fbd748de5a623bd75b2f8ac320c5ce2b9.tar.xz
drakx-f29cd86fbd748de5a623bd75b2f8ac320c5ce2b9.zip
"my $foo if 0" semantic has changed in some cases, using the new "state" keyword instead
Diffstat (limited to 'perl-install/mirror.pm')
-rw-r--r--perl-install/mirror.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/mirror.pm b/perl-install/mirror.pm
index acd0cd02c..b61f24066 100644
--- a/perl-install/mirror.pm
+++ b/perl-install/mirror.pm
@@ -2,6 +2,7 @@ package mirror; # $Id$
use diagnostics;
use strict;
+use feature 'state';
use common;
use log;
@@ -86,7 +87,7 @@ sub list {
my ($product_id, $type, $o_arch) = @_;
our @mirrors_raw;
- my $prev_arch if 0;
+ state $prev_arch;
undef @mirrors_raw if $prev_arch ne $o_arch;
$prev_arch = $o_arch || arch();
if (!@mirrors_raw) {