Skip Menu |

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

Report information
The Basics
Id: 79480
Status: resolved
Priority: 0/
Queue: Net-Patricia

People
Owner: Nobody in particular
Requestors: GRUBER [...] cpan.org
Cc: cvicente [...] nsrc.org
regnauld [...] nsrc.org
tobez [...] tobez.org
AdminCc:

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



CC: cvicente [...] nsrc.org, regnauld [...] nsrc.org, tobez [...] tobez.org
Subject: [PATCH] Provide Storable hooks so that one can freeze/thaw Net::Patricia objects
Hi, Currently, it is not possible to nfreeze/thaw or nstore/retrieve Net::Patricia instances. However, such possibility would be useful for working with large trees, since freezing/thawing can be made substantially faster than rebuilding the tree from scratch. Luckily, Storable provides a mechanism which makes it relatively easy to implement (see Hooks section in its manpage). Some other XS modules provide such hooks already, for example Tie::Hash::Indexed. The attached patch implements this functionality, including the tests. I tried to keep integers in the serialized data structure in network byte order to make it work across different platforms. The patch is tested on FreeBSD/amd64 and Linux/i686. I hope you will consider adding this to the next release of Net::Patricia. \Anton.
Subject: Net-Patricia-1.19-with-Storable-hooks.patch

Message body is not shown because it is too large.

Added in 1.20.