File dnswalk-fix-defined-array-is-deprecated.patch of Package dnswalk
Description: Fix deprecated use of defined(@array)
Author: Ruud van Melick <ruud@vanmelick.com>
Origin: other, https://github.com/vanmelick/dnswalk/commit/8de083b573125cb333083f789cc5773f34c8ef8d
Bug: https://github.com/davebarr/dnswalk/pull/1
Bug-Debian: https://bugs.debian.org/658998
Last-Update: 2015-07-28
This fixes the following Perl messages:
defined(@array) is deprecated at /usr/bin/dnswalk line 59.
(Maybe you should just omit the defined()?)
defined(@array) is deprecated at /usr/bin/dnswalk line 61.
(Maybe you should just omit the defined()?)
defined(@array) is deprecated at /usr/bin/dnswalk line 87.
(Maybe you should just omit the defined()?)
defined(@array) is deprecated at /usr/bin/dnswalk line 107.
(Maybe you should just omit the defined()?)
--- a/dnswalk
+++ b/dnswalk
@@ -56,9 +56,9 @@ sub dowalk {
return unless $domain;
print "Checking $domain\n";
@subdoms=&doaxfr($domain);
- &check_zone($domain) if (defined(@zone) && @zone);
+ &check_zone($domain) if (@zone);
undef @zone;
- return if (!(defined(@subdoms) && @subdoms));
+ return if (!@subdoms);
@sortdoms = sort byhostname @subdoms;
local ($subdom);
if ($opt_r) {
@@ -86,7 +86,7 @@
my $res = new Net::DNS::Resolver;
$res->nameservers($server);
@zone=$res->axfr($domain);
- unless (defined(@zone) && @zone) {
+ unless (@zone) {
print STDERR "failed\n";
&printerr("FAIL",
"Zone transfer of $domain from $server failed: "
@@ -104,7 +104,7 @@ sub doaxfr {
print STDERR "done.\n";
last SERVER;
} # foreach #
- unless (defined(@zone) && @zone) {
+ unless (@zone) {
&printerr("BAD","All zone transfer attempts of $domain failed!\n");
return undef;
}