--- Devel-FindRef/FindRef.pm 2007/02/07 21:34:02 1.5 +++ Devel-FindRef/FindRef.pm 2007/03/24 19:18:18 1.6 @@ -80,6 +80,8 @@ C<$local> in the sub C and also in the hash referenced by C<$Test::hash2>. +=back + =head1 EXPORTS None. @@ -102,14 +104,19 @@ sub track { my $buf = ""; + my %ignore; my $track; $track = sub { - my (undef, $depth, $indent) = @_; + my ($target, $depth, $indent) = @_; + @_ = (); + local $ignore{$target+0} = undef; if ($depth) { - my (@about) = find $_[0]; + my (@about) = grep !exists $ignore{$_->[1]}, find $target; if (@about) { + local @ignore{map $_->[1]+0, @about} = (); for my $about (@about) { + local $ignore{$about+0} = undef; $buf .= (" ") x $indent; $buf .= $about->[0]; if (@$about > 1) { @@ -148,8 +155,8 @@ sub find($) { my ($about, $excl) = &find_; - my %excl = map +($_ => 1), @$excl; - grep !$excl{$_->[1] + 0}, @$about + my %excl = map +($_ => undef), @$excl; + grep !exists $excl{$_->[1] + 0}, @$about } =item $ref = Devel::FindRef::ref2ptr $ptr