Skip Menu |

This queue is for tickets about the Net-Bind CPAN distribution.

Report information
The Basics
Id: 5539
Status: new
Priority: 0/
Queue: Net-Bind

People
Owner: Nobody in particular
Requestors: martin.kutter [...] erl9.siemens.de
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Failure reading empty options in Net::Bind::Resolv
Hi * ! The options method in Net::Bind::Resolv causes an error when (Can't use undefined value as list reference) when called in list context as options(); on a resolv.conf file without any options. The patch attached fixes this. Regards, Martin Kutter
--- Net-Bind-0.05/lib/Net/Bind/Resolv.pm 2002-04-17 22:22:47.000000000 -0400 +++ Net-Bind-0.05/lib/Net/Bind/Resolv.pm.patched 2004-03-03 05:07:43.000000000 -0500 @@ -321,8 +321,11 @@ @$item : $item); } } - - return wantarray ? @{$self->{Options}} : $self->{Options}; + if (wantarray) { + return @{$self->{Options}} if ($self->{Options}); + return (); + } + return $self->{Options}; } =head2 comments([@strings])
From: martin.kutter [...] fen-net.de
[guest - Wed Mar 3 03:16:12 2004]: Show quoted text
> Hi * ! > > The options method in Net::Bind::Resolv causes an error when (Can't > use undefined value as list reference) when called in list context > as options(); on a resolv.conf file without any options. > > The patch attached fixes this. > > Regards, > > Martin Kutter
...same holds true for all other methods returning /etc/resolv.conf values as lists when these options are not set,