X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy%2FNode.pm;h=711d76b348658da9e032095b361509c04da9ae36;hb=465d9f18e3a20bb13028fdd05c7808421d7e93b2;hp=84eadcaee10c50572c9f01194ebe6296c501ee36;hpb=9475a7e57e6620d064387dc485067655517c9a1b;p=irspy-moved-to-github.git diff --git a/lib/ZOOM/IRSpy/Node.pm b/lib/ZOOM/IRSpy/Node.pm index 84eadca..711d76b 100644 --- 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; @@ -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. +=cut + sub print { my $this = shift(); my($level) = @_; @@ -157,7 +159,8 @@ sub select { 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];