Skip Menu | will be shut down on March 1st, 2021.

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

Report information
The Basics
Id: 60144
Status: resolved
Priority: 0/
Queue: Net-DNS-ZoneFile-Fast

Owner: Nobody in particular
Requestors: chip [...]

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

Subject: $GENERATE padding issue
Date: Fri, 6 Aug 2010 11:36:01 -0400
To: bug-Net-DNS-ZoneFile-Fast [...]
From: Chip Marshall <chip [...]>
Download (untitled) / with headers
text/plain 1.2k
I think I've found a small bug in Net::DNS::ZoneFile::Fast with regards to the $GENERATE directive processing. It appears to be space-padding the replacement string rather than zero-padding it, which causes parsing issues when the replacement is in the middle of a string (and inaccurate parsing when it's at the beginning of a string.) Example: $GENERATE 0-31 $ PTR host${0,2,d} BIND expands that to 0 PTR 1 PTR ... 30 PTR 31 PTR But with Net::DNS::ZoneFile::Fast it results in a "bad name in PTR" parsing error. With some added debugging, I found it was expanding to "host". Module: Net-DNS-ZoneFile-Fast-1.12 Perl: v5.8.8 built for i386-freebsd-64int OS: FreeBSD 7.0-RELEASE-p5 i386 Here's a quick patch to switch from space-padding to zero-padding: --- 2010-08-06 15:23:29.000000000 +0000 +++ 2010-08-06 15:23:42.000000000 +0000 @@ -280,7 +280,7 @@ $offset ||= 0; $width ||= 0; $base ||= 'd'; - sprintf "%$width$base", $offset + $from; + sprintf "%0$width$base", $offset + $from; }xge; $parse->(); $from++; -- Chip Marshall <>
Thanks! fixed in the next release!

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to