Skip Menu |

This queue is for tickets about the Tree-MultiNode CPAN distribution.

Report information
The Basics
Id: 83606
Status: new
Priority: 0/
Queue: Tree-MultiNode

People
Owner: Nobody in particular
Requestors: degatcpan [...] ntlworld.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: v1.0.13
Fixed in: (no value)



Subject: Patch to enable removal of children
Patch tested via ./Build test. Removing children seems to work after applying this patch, but I am no expert on this module.
Subject: new.patch
--- /home/dan/Desktop/MultiNode.pm 2010-02-19 16:57:46.000000000 +0000 +++ /usr/local/share/perl/5.14.2/Tree/MultiNode.pm 2013-02-22 19:54:17.000000000 +0000 @@ -1193,7 +1193,8 @@ sub remove_child { my $self = shift; - my $pos = shift || $self->{'curr_pos'}; + my $pos = shift; + $pos = defined $pos ? $pos : $self->{'curr_pos'}; print __PACKAGE__, "::remove_child() pos is: $pos\n" if $Tree::MultiNode::debug; @@ -1210,7 +1211,7 @@ } my $node = splice(@{$children},$pos,1); - + $self->{'curr_node'}->{'children'} = $children; return ($node->key,$node->value); }