diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2014-03-18 18:53:30 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2014-03-18 18:53:30 +0000 |
commit | 08a7747feb51aa087d605d2ee6137343dfa270ce (patch) | |
tree | a0da9ed86cd0554c8ebc6b2a2a162ab68ce10052 /usr.sbin/pkg_add/OpenBSD/PackageRepository | |
parent | 3f38936de38607059fe8d34c3a78165f2a64d69d (diff) |
remove $_ usage that warns under perl 5.18
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackageRepository')
-rwxr-xr-x | usr.sbin/pkg_add/OpenBSD/PackageRepository/HTTP.pm | 15 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageRepository/Persistant.pm | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm | 5 |
3 files changed, 9 insertions, 15 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository/HTTP.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository/HTTP.pm index 8702e1ece7f..6cfcdea6301 100755 --- a/usr.sbin/pkg_add/OpenBSD/PackageRepository/HTTP.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository/HTTP.pm @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: HTTP.pm,v 1.10 2011/07/19 18:09:41 espie Exp $ +# $OpenBSD: HTTP.pm,v 1.11 2014/03/18 18:53:29 espie Exp $ # # Copyright (c) 2011 Marc Espie <espie@openbsd.org> # @@ -104,18 +104,18 @@ sub send_header sub get_header { my $o = shift; - my $_ = $o->getline; - if (!m,^HTTP/1\.1\s+(\d\d\d),) { + my $l = $o->getline; + if ($l !~ m,^HTTP/1\.1\s+(\d\d\d),) { return undef; } my $h = _Proxy::Header->new; $h->{code} = $1; - while ($_ = $o->getline) { - last if m/^$/; - if (m/^([\w\-]+)\:\s*(.*)$/) { + while ($l = $o->getline) { + last if $l =~ m/^$/; + if ($l =~ m/^([\w\-]+)\:\s*(.*)$/) { $h->{$1} = $2; } else { - print STDERR "unknown line: $_\n"; + print STDERR "unknown line: $l\n"; } } if (defined $h->{'Content-Length'}) { @@ -336,7 +336,6 @@ sub get_file sub main { my $self = shift; - my $_; my $o = _Proxy::Connection->new($self->{host}, "www"); while (<STDIN>) { chomp; diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository/Persistant.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository/Persistant.pm index 3aaeeed153c..dcac9993407 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageRepository/Persistant.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository/Persistant.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Persistant.pm,v 1.3 2014/01/09 20:20:01 espie Exp $ +# $OpenBSD: Persistant.pm,v 1.4 2014/03/18 18:53:29 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org> # @@ -38,7 +38,6 @@ sub grab_object my $getfh = $self->{getfh}; print $cmdfh "ABORT\n"; - my $_; while (<$getfh>) { last if m/^ABORTED/o; } @@ -98,7 +97,6 @@ sub list my $path = $self->{path}; my $l = []; print $cmdfh "LIST $path\n"; - my $_; $_ = <$getfh>; if (!defined $_) { $self->{state}->fatal("Could not initiate #1 session", diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm index e0aa597a2dd..cf5f7ee6859 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: SCP.pm,v 1.27 2011/07/19 17:30:05 espie Exp $ +# $OpenBSD: SCP.pm,v 1.28 2014/03/18 18:53:29 espie Exp $ # # Copyright (c) 2003-2006 Marc Espie <espie@openbsd.org> # @@ -45,8 +45,6 @@ sub initiate $self->{cmdfh} = $wrfh; $self->{getfh} = $rdfh; $wrfh->autoflush(1); - my $_; - while(<DATA>) { # compress script a bit next if m/^\#/o && !m/^\#!/o; @@ -103,7 +101,6 @@ sub expand_tilde return $dirs->{$arg} //= (getpwnam($arg))[7]."/"; } -my $_; while (<STDIN>) { chomp; if (m/^LIST\s+(.*)$/o) { |