ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/Pod.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/Pod.pm (file contents):
Revision 1.9 by root, Sun Aug 13 21:46:10 2006 UTC vs.
Revision 1.10 by root, Mon Aug 14 01:54:08 2006 UTC

23sub is_prefix_of($@) { 23sub is_prefix_of($@) {
24 my ($node, @path) = @_; 24 my ($node, @path) = @_;
25 25
26 return 1 unless @path; 26 return 1 unless @path;
27 27
28 my $kw = pop @path; 28 my $kw = lc pop @path;
29 29
30 $node = $node->{parent} 30 $node = $node->{parent}
31 or return 0; 31 or return 0;
32 32
33 return ! ! grep $_ eq $kw, @{ $node->{kw} }; 33 return ! ! grep $_ eq $kw, @{ $node->{kw} };
36sub find(@) { 36sub find(@) {
37 my (@path) = @_; 37 my (@path) = @_;
38 38
39 return unless @path; 39 return unless @path;
40 40
41 my $kw = pop @path; 41 my $kw = lc pop @path;
42 42
43 # TODO: make sure results are unique 43 # TODO: make sure results are unique
44 44
45 grep { is_prefix_of $_, @path } 45 grep { is_prefix_of $_, @path }
46 map @$_, 46 map @$_,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines