From: Michael Schroeder Date: Wed, 5 Jun 2013 17:15:09 +0000 (+0200) Subject: ok, no local in current perl code. Also, use ls instead of li as short form of list X-Git-Tag: BASE-SuSE-Code-13_1-Branch~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=788d830af95fcf9f44211c3bdab9e0dcf53de8d8;p=thirdparty%2Flibsolv.git ok, no local in current perl code. Also, use ls instead of li as short form of list --- diff --git a/examples/p5solv b/examples/p5solv index 9bee1027..f96067d5 100755 --- a/examples/p5solv +++ b/examples/p5solv @@ -493,7 +493,7 @@ sub load_stub { die("Usage: p5solv COMMAND [ARGS]\n") unless @ARGV; my $cmd = shift @ARGV; -my %cmdabbrev = ( 'li' => 'list', 'in' => 'install', 'rm' => 'erase', +my %cmdabbrev = ( 'ls' => 'list', 'in' => 'install', 'rm' => 'erase', 've' => 'verify', 'se' => 'search' ); $cmd = $cmdabbrev{$cmd} if $cmdabbrev{$cmd}; @@ -516,9 +516,9 @@ if (-d '/etc/zypp/repos.d') { } for my $reposdir (@reposdirs) { next unless -d $reposdir; - local *DIR; - next unless opendir(DIR, $reposdir); - for my $reponame (sort(grep {/\.repo$/} readdir(DIR))) { + my $dir; + next unless opendir($dir, $reposdir); + for my $reponame (sort(grep {/\.repo$/} readdir($dir))) { my $cfg = new Config::IniFiles('-file' => "$reposdir/$reponame"); for my $alias ($cfg->Sections()) { my $repoattr = {'alias' => $alias, 'enabled' => 0, 'priority' => 99, 'autorefresh' => 1, 'type' => 'rpm-md', 'metadata_expire' => 900}; diff --git a/examples/pysolv b/examples/pysolv index 98dfec1d..c4ddb086 100755 --- a/examples/pysolv +++ b/examples/pysolv @@ -579,7 +579,7 @@ if not args: cmd = args[0] args = args[1:] -cmdabbrev = {'li': 'list', 'in': 'install', 'rm': 'erase', 've': 'verify', 'se': 'search'} +cmdabbrev = {'ls': 'list', 'in': 'install', 'rm': 'erase', 've': 'verify', 'se': 'search'} if cmd in cmdabbrev: cmd = cmdabbrev[cmd] diff --git a/examples/rbsolv b/examples/rbsolv index e10e0fd4..741db943 100755 --- a/examples/rbsolv +++ b/examples/rbsolv @@ -503,7 +503,7 @@ end args = ARGV cmd = args.shift -cmdabbrev = { 'li' => 'list', 'in' => 'install', 'rm' => 'erase', +cmdabbrev = { 'ls' => 'list', 'in' => 'install', 'rm' => 'erase', 've' => 'verify', 'se' => 'search' } cmd = cmdabbrev[cmd] if cmdabbrev.has_key?(cmd)