]> eyrie.org Git - kerberos/krb5-strength.git/commitdiff
Fix Perl critic error in tests/tools/wordlist-t
authorRuss Allbery <eagle@eyrie.org>
Mon, 7 Nov 2016 02:11:16 +0000 (18:11 -0800)
committerRuss Allbery <eagle@eyrie.org>
Mon, 7 Nov 2016 02:11:16 +0000 (18:11 -0800)
Don't pass $_ explicitly as an argument to length().

tests/tools/wordlist-t

index 030a9601c2304c0ceec9d6102bc86f1e68e92240..967cfc1e6c6bfc405ed48ec209c9d585f70c0c30 100755 (executable)
@@ -3,6 +3,7 @@
 # Test suite for krb5-strength-wordlist filtering functions.
 #
 # Written by Russ Allbery <eagle@eyrie.org>
+# Copyright 2016 Russ Allbery <eagle@eyrie.org>
 # Copyright 2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
@@ -60,7 +61,7 @@ my @wordlist = slurp(test_file_path('data/wordlist'));
 # Generate a filtered version that should match the eventual output of
 # krb5-strength-wordlist, removing words containing the letter d and any
 # shorter than 8 characters.
-my @filtered = grep { !m{d}xms && length($_) >= 8 } @wordlist;
+my @filtered = grep { !m{d}xms && length >= 8 } @wordlist;
 
 # Add a non-ASCII word to test non-ASCII filtering.
 push(@wordlist, encode('UTF-8', "\N{U+0639}\N{U+0631}\N{U+0628}\N{U+649}"));