diff options
author | Michael Schroeder <mls@suse.de> | 2013-06-05 19:15:09 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2013-06-05 19:15:09 +0200 |
commit | 788d830af95fcf9f44211c3bdab9e0dcf53de8d8 (patch) | |
tree | bd0e05ea0470637442b379bf07eba72b507297a4 /examples | |
parent | 65fc23b007331aa3c2634c549b70ac2ba2cdb4da (diff) | |
download | libsolv-788d830af95fcf9f44211c3bdab9e0dcf53de8d8.tar.gz libsolv-788d830af95fcf9f44211c3bdab9e0dcf53de8d8.tar.bz2 libsolv-788d830af95fcf9f44211c3bdab9e0dcf53de8d8.zip |
ok, no local in current perl code. Also, use ls instead of li as short form of list
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/p5solv | 8 | ||||
-rwxr-xr-x | examples/pysolv | 2 | ||||
-rwxr-xr-x | examples/rbsolv | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/examples/p5solv b/examples/p5solv index 9bee102..f96067d 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 98dfec1..c4ddb08 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 e10e0fd..741db94 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) |