Skip Menu |

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

Report information
The Basics
Id: 13669
Status: resolved
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: d.thomas [...] its.uq.edu.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.48
Fixed in: 0.52



Subject: bug in typesbyval
Net::DNS 0.48 on code inspection, this seems fixed in 0.52 but I think the following is simpler in sub typesbyval() defined in DNS.pm replace die "Net::DNS::typesbyval() argument ($val) is not numeric" unless $val =~ m/^\s*\d+\s*$/; $val =~ s/\s*//g; $val =~ s/^0*([0-9]+)/$1/; #remove leading zeros by die "Net::DNS::typesbyval() argument ($val) is not numeric" unless $val =~ m/^\s*0*(\d+)\s*$/; $val = $1; cheers, Danny Thomas PS the run-time message in 0.48 was Argument "" isn't numeric in numeric gt (>) at /opt/perl/perl-5.8.5/lib/site_perl/5.8.5/i386-freebsd/Net/DNS.pm line 167.
[guest - Wed Jul 13 01:41:31 2005]: Show quoted text
> Net::DNS 0.48 > on code inspection, this seems fixed in 0.52 but I think the following > is simpler > in sub typesbyval() defined in DNS.pm > replace > die "Net::DNS::typesbyval() argument ($val) is not numeric" unless > $val =~ m/^\s*\d+\s*$/; > > $val =~ s/\s*//g; > $val =~ s/^0*([0-9]+)/$1/; #remove leading zeros > by > die "Net::DNS::typesbyval() argument ($val) is not numeric" unless > $val =~ m/^\s*0*(\d+)\s*$/; > $val = $1; > > cheers, > Danny Thomas >
Aesthetics, aesthetics :-) But thanks, the patch has been applied. The line is a bit more elegant. Code is in the subversion trunk http://www.net-dns.net/svn/net-dns/trunk