summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor van den Elzen <victor.vde@gmail.com>2010-11-07 17:20:23 +0100
committerVictor van den Elzen <victor.vde@gmail.com>2010-11-07 17:20:23 +0100
commitbc8522e3a08ae3124bdf60d27dd0a24baee535f0 (patch)
tree7b309d6c2c5c14f26dbe476e676aa4b9a344b28d
parentaf43b9751494b45f6aca068694db032749db0709 (diff)
downloadnasm-bc8522e3a08ae3124bdf60d27dd0a24baee535f0.tar.gz
nasm-bc8522e3a08ae3124bdf60d27dd0a24baee535f0.tar.bz2
nasm-bc8522e3a08ae3124bdf60d27dd0a24baee535f0.zip
Fix Perl deprecation warnings.
Use of defined on aggregates (hashes and arrays) is deprecated. You should instead use a simple test for size.
-rwxr-xr-xdirectiv.pl2
-rw-r--r--perllib/phash.ph2
-rwxr-xr-xphash.pl2
-rwxr-xr-xpptok.pl2
-rwxr-xr-xtokhash.pl2
5 files changed, 5 insertions, 5 deletions
diff --git a/directiv.pl b/directiv.pl
index 684f542..0417f56 100755
--- a/directiv.pl
+++ b/directiv.pl
@@ -95,7 +95,7 @@ if ($output eq 'h') {
}
@hashinfo = gen_perfect_hash(\%directive);
- if (!defined(@hashinfo)) {
+ if (!@hashinfo) {
die "$0: no hash found\n";
}
diff --git a/perllib/phash.ph b/perllib/phash.ph
index 5bc2744..936978a 100644
--- a/perllib/phash.ph
+++ b/perllib/phash.ph
@@ -161,7 +161,7 @@ sub gen_perfect_hash($) {
for ($j = 0; $j < $maxj; $j++) {
$sv = $random_sv_vectors[$j];
@hashinfo = gen_hash_n($n, $sv, $href, $run++);
- return @hashinfo if (defined(@hashinfo));
+ return @hashinfo if (@hashinfo);
}
$n <<= 1;
}
diff --git a/phash.pl b/phash.pl
index cc9ca74..3ef6e71 100755
--- a/phash.pl
+++ b/phash.pl
@@ -75,7 +75,7 @@ sub main() {
%data = read_input();
@hashinfo = gen_perfect_hash(\%data);
- if (!defined(@hashinfo)) {
+ if (!@hashinfo) {
die "$0: no hash found\n";
}
diff --git a/pptok.pl b/pptok.pl
index c9738d3..be85b94 100755
--- a/pptok.pl
+++ b/pptok.pl
@@ -164,7 +164,7 @@ if ($what eq 'c') {
}
my @hashinfo = gen_perfect_hash(\%tokens);
- if (!defined(@hashinfo)) {
+ if (!@hashinfo) {
die "$0: no hash found\n";
}
diff --git a/tokhash.pl b/tokhash.pl
index 0c69c03..6c05802 100755
--- a/tokhash.pl
+++ b/tokhash.pl
@@ -183,7 +183,7 @@ if ($output eq 'h') {
#
@hashinfo = gen_perfect_hash(\%tokens);
- if (!defined(@hashinfo)) {
+ if (!@hashinfo) {
die "$0: no hash found\n";
}