Skip Menu |

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

Report information
The Basics
Id: 38770
Status: resolved
Priority: 0/
Queue: Net-IPTrie

People
Owner: Nobody in particular
Requestors: marksmith [...] adam.com.au
Cc:
AdminCc:

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



Subject: Feature request - method to delete trie entries
Date: Thu, 28 Aug 2008 10:43:41 +0930
To: bug-Net-IPTrie [...] rt.cpan.org
From: Mark Smith <marksmith [...] adam.com.au>
Hi, A further feature request. I've noticed that the module doesn't have a method to delete a trie entry, which also be useful in our application. Possibly the data returned as a result of a 'find' operation would be the input to a delete method, to save two lookups (ie. a 'find' against the trie to determine if it exists, and then another inherent 'find' inside a delete method if the delete method had a prefix as it's input). Thanks, Mark.
Did you see the Net::IPTrie::Node documentation? There is a delete method already. You can surely do $tree->find('1.1.1.1')->delete(); cv On Wed Aug 27 21:14:11 2008, marksmith@adam.com.au wrote: Show quoted text
> Hi, > > A further feature request. I've noticed that the module doesn't have a > method to delete a trie entry, which also be useful in our application. > Possibly the data returned as a result of a 'find' operation would be > the input to a delete method, to save two lookups (ie. a 'find' against > the trie to determine if it exists, and then another inherent 'find' > inside a delete method if the delete method had a prefix as it's input). > > Thanks, > Mark.
Subject: Re: [rt.cpan.org #38770] Feature request - method to delete trie entries
Date: Tue, 28 Oct 2008 09:33:14 +1030
To: bug-Net-IPTrie [...] rt.cpan.org
From: Mark Smith <marksmith [...] adam.com.au>
Carlos Vicente via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=38770 > > > Did you see the Net::IPTrie::Node documentation? There is a delete > method already. >
No, I didn't see the Node documentation by the looks of it. The following page, with the add, find, traverse methods would seem to imply that you're looking at all the available IP trie object manipulation methods, and delete isn't there, so that's what confused me. http://search.cpan.org/~cvicente/Net-IPTrie-v0.4/lib/Net/IPTrie.pm Would it be possible to promote the delete method to the same call level as the add, find etc. methods? Thanks, Mark. Show quoted text
> You can surely do $tree->find('1.1.1.1')->delete(); > > cv > > On Wed Aug 27 21:14:11 2008, marksmith@adam.com.au wrote:
>> Hi, >> >> A further feature request. I've noticed that the module doesn't have a >> method to delete a trie entry, which also be useful in our application. >> Possibly the data returned as a result of a 'find' operation would be >> the input to a delete method, to save two lookups (ie. a 'find' against >> the trie to determine if it exists, and then another inherent 'find' >> inside a delete method if the delete method had a prefix as it's input). >> >> Thanks, >> Mark.
> > >
Show quoted text
> The following page, with the add, find, traverse methods would seem to > imply that you're looking at all the available IP trie object > manipulation methods, and delete isn't there, so that's what confused me. > > http://search.cpan.org/~cvicente/Net-IPTrie-v0.4/lib/Net/IPTrie.pm
There is now a reference to Net::IPTrie::Node in the "See Also" section. Show quoted text
> Would it be possible to promote the delete method to the same call level > as the add, find etc. methods? >
No. The delete method operates on the Node object, not on the IPTrie object. cv