Matt Sergeant wrote:
> I didn't think you could do that because in newer versions of Net::DNS
> the id is a lexical variable. The only way to reinitialise it is to
> reload the module.

If I remember it correctly, Justin's code keeps its own counter and sets the
packet ID after creating the packet, making it independent of Net:DNS's counter.

I guess that would break down if there are any uses of Net::DNS by the same
process that do not go through his code. If that is what is happening and it
results in ID collision, the fix would be to use code like yours to reload
the module and rely on its own counter. I'll try that now that I can
reproduce the problem myself (painful as it is).

 -- sidney

Reply via email to