Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: csr1 [...] ziobro.rochester.ny.us
Cc:
AdminCc:

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



CC: Jim Ziobro <csr1 [...] ziobro.rochester.ny.us>
Subject: Net::DNS::ZoneFile bug in "$ORIGIN ."
Date: Sun, 05 Oct 2014 21:30:20 -0400
To: bug-Net-DNS [...] rt.cpan.org
From: z <csr1 [...] ziobro.rochester.ny.us>
Try: use Net::DNS::ZoneFile; $zonefile = new Net::DNS::ZoneFile( 'named.example' ); while ( $rr = $zonefile->read ) { $rr->print; } With named.example: $ORIGIN . 1 A 127.0.0.1 Results in double "." like: 1.. 0 IN A 127.0.0.1 perl -v: This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi
From: rwfranks [...] acm.org
The simplest, although not the most efficient, fix is shown below: *** /home/rwf/svn/net-dns/lib/Net/DNS/Domain.pm 2014-06-24 13:30:08.503161000 +0100 --- Domain.pm 2014-10-07 12:36:48.007543163 +0100 *************** *** 151,157 **** my $head = _decode_ascii( join chr(46), map _escape($_), @$lref ); my $tail = $self->{origin} || return $self->{name} = $head || $dot; return $self->{name} = $tail->name unless length $head; ! return $self->{name} = join $dot, $head, $tail->name; } --- 151,157 ---- my $head = _decode_ascii( join chr(46), map _escape($_), @$lref ); my $tail = $self->{origin} || return $self->{name} = $head || $dot; return $self->{name} = $tail->name unless length $head; ! return $self->{name} = join $dot, $head, $tail->label; }
Fix is in the repository and will be in the next release, Thanks