projects
/
irspy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Correct parsing of deep paths (head ends at first, not last, colon).
[irspy-moved-to-github.git]
/
lib
/
ZOOM
/
IRSpy
/
Node.pm
diff --git
a/lib/ZOOM/IRSpy/Node.pm
b/lib/ZOOM/IRSpy/Node.pm
index
84eadca
..
711d76b
100644
(file)
--- a/
lib/ZOOM/IRSpy/Node.pm
+++ b/
lib/ZOOM/IRSpy/Node.pm
@@
-1,4
+1,4
@@
-# $Id: Node.pm,v 1.2 2006-10-06 16:51:32 mike Exp $
+# $Id: Node.pm,v 1.4 2006-10-11 16:35:43 mike Exp $
package ZOOM::IRSpy::Node;
package ZOOM::IRSpy::Node;
@@
-98,6
+98,8
@@
Pretty-prints the node and, recursively, all its children. The
parameter is the level of indentation to use in printing the node;
this method recursively invokes itself with higher levels.
parameter is the level of indentation to use in printing the node;
this method recursively invokes itself with higher levels.
+=cut
+
sub print {
my $this = shift();
my($level) = @_;
sub print {
my $this = shift();
my($level) = @_;
@@
-157,7
+159,8
@@
sub select {
my @sub = $this->subnodes();
if ($address eq "") {
return $this;
my @sub = $this->subnodes();
if ($address eq "") {
return $this;
- } elsif (my($head, $tail) = $address =~ /(.*):(.*)/) {
+ } elsif (my($head, $tail) = $address =~ /(.*?):(.*)/) {
+ print "*** testing head='$head' tail='$tail'\n";
return $sub[$head]->select($tail);
} else {
return $sub[$address];
return $sub[$head]->select($tail);
} else {
return $sub[$address];