summaryrefslogtreecommitdiff
path: root/dselect/methods
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-09-12 06:08:37 +0200
committerGuillem Jover <guillem@debian.org>2014-10-06 00:48:13 +0200
commit24df99399ba5b63dc354ff49ea8622a8ca1cd17d (patch)
treed13eda06e0a54575a15d9ab70829004d757c959b /dselect/methods
parente7ec307653c124fa6c2a68385beddbd2f3a4f091 (diff)
downloaddpkg-24df99399ba5b63dc354ff49ea8622a8ca1cd17d.tar.gz
perl: Use length instead of /^$/ to test for an empty string
Addresses RegularExpressions::ProhibitFixedStringMatches. Warned-by: perlcritic
Diffstat (limited to 'dselect/methods')
-rwxr-xr-xdselect/methods/ftp/install4
1 files changed, 2 insertions, 2 deletions
diff --git a/dselect/methods/ftp/install b/dselect/methods/ftp/install
index f5251c4e8..c217fa95d 100755
--- a/dselect/methods/ftp/install
+++ b/dselect/methods/ftp/install
@@ -85,13 +85,13 @@ sub getblk {
my %flds;
my $fld;
while (<$fh>) {
- if ( ! /^$/ ) {
+ if (length != 0) {
FLDLOOP: while (1) {
if ( /^(\S+):\s*(.*)\s*$/ ) {
$fld = lc($1);
$flds{$fld} = $2;
while (<$fh>) {
- if ( /^$/ ) {
+ if (length == 0) {
return %flds;
} elsif ( /^(\s.*)$/ ) {
$flds{$fld} = $flds{$fld} . "\n" . $1;