summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2014-03-07 09:45:54 +0000
committerMarc Espie <espie@cvs.openbsd.org>2014-03-07 09:45:54 +0000
commitb36c0dcce0e8a3c8331bf7919c793fbca980ae02 (patch)
tree787b2b05ed1cc801eea508c6bdb749f12a3ee246 /usr.sbin/pkg_add
parent499a54d616a50ab3aada31afe2a70b9de4f1a8f9 (diff)
rename $_ for better style... lots more to be done
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgSpec.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm b/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm
index 6108d543224..a21cca4a74b 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgSpec.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PkgSpec.pm,v 1.44 2014/02/04 07:59:40 espie Exp $
+# $OpenBSD: PkgSpec.pm,v 1.45 2014/03/07 09:45:53 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -30,13 +30,13 @@ sub check_1flavor
{
my ($f, $spec) = @_;
- for my $_ (split /\-/o, $spec) {
+ for my $flavor (split /\-/o, $spec) {
# must not be here
- if (m/^\!(.*)$/o) {
+ if ($flavor =~ m/^\!(.*)$/o) {
return 0 if $f->{$1};
# must be here
} else {
- return 0 unless $f->{$_};
+ return 0 unless $f->{$flavor};
}
}
return 1;
@@ -47,8 +47,8 @@ sub match
my ($self, $h) = @_;
# check each flavor constraint
- for my $_ (split /\,/o, $$self) {
- if (check_1flavor($h->{flavors}, $_)) {
+ for my $c (split /\,/o, $$self) {
+ if (check_1flavor($h->{flavors}, $c)) {
return 1;
}
}