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;
}