Skip to contentSkip to conversation

timeconst.pl: remove deprecated defined(@array)

PATCH New Dagfinn Ilmari Mannsåker 1 participant 1 message Feb 15, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 timeconst.pl: remove deprecated defined(@array)

The use of defined() on arrays and hashes has been deprecated since perl 5.6, but until 5.17.6 it only warned on lexicals, not package globals.

---
 kernel/timeconst.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/timeconst.pl +1 -1
index eb51d76..0461239 100644
@@ -370,7 +370,7 @@ if ($hz eq '--can') {
 	}
 
 	@val = @{$canned_values{$hz}};
-	if (!defined(@val)) {
+	if (!@val) {
 		@val = compute_values($hz);
 	}
 	output($hz, @val);
Signature · 1 line
1.7.5.4