Skip Menu |

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

Report information
The Basics
Id: 56453
Status: resolved
Priority: 0/
Queue: Tree-RB

People
Owner: Nobody in particular
Requestors: peter [...] cs.upt.ro
Cc:
AdminCc:

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



Subject: small documentation errors for Tree::RB
Date: Sat, 10 Apr 2010 09:00:17 +0300
To: bug-tree-rb [...] rt.cpan.org
From: Petre Mierlutiu <peter [...] cs.upt.ro>
Hello, I've been just using the Tree::RB module and found small errors in the documentation. First, it states it is documentation for version 0.1 while the module is 0.5. Next, in the Synopsis examples, there is the sample code: print $tree->get('Ireland'); # 'Dublin' that, in perl 5.10 at least, prints DublinTree::RB::Node=ARRAY(0x100830ef0) since it is interpreted in list context. I think the following should be more appropriate: print scalar($tree->get('Ireland')); # 'Dublin' And last, also in the Synopsis, you have the sample code: # print items in reverse order $it = $tree->rev_iter; while(my $node = $it->next) { sprintf "key = %s, value = %s\n", $node->key, $node->val; } Here, sprintf should be perhaps replaced with printf. The same goes in the code for reverse order. I hope this helps. Included you have a patch. Kind regards, Peter

Message body is not shown because sender requested not to inline it.