--- trunk/lib/WebPAC/Lookup.pm 2005/12/15 14:12:00 251 +++ trunk/lib/WebPAC/Lookup.pm 2005/12/27 22:26:43 330 @@ -83,7 +83,7 @@ $log->logconfess("lookup config file isn't ARRAY but ", sub { Dumper( $self->{'lookup_def'} ) }) if ($self->{'lookup_def'} !~ /ARRAY/o); - $self->{'is_lookup_regex'} ||= 'lookup{\[[^\{\}]+\]}'; + $self->{'is_lookup_regex'} ||= 'lookup{[^\{\}]+}'; $self->{'save_lookup_regex'} ||= 'lookup{([^\{\}]+)}'; @@ -146,9 +146,9 @@ Perform lookups on format supplied to it. - my $text = $lookup->lookup('[v900]'); + my $text = $lookup->lookup('lookup{v900}'); -Lookups can be nested (like C<[d:[a:[v900]]]>). +Lookups can be nested (like lookup{Blookup{Blookup{B}}}). =cut @@ -162,8 +162,6 @@ if ($tmp =~ $self->{'LOOKUP_REGEX'}) { my @in = ( $tmp ); - $log->debug("lookup for: ",$tmp); - my @out; while (my $f = shift @in) { if ($f =~ $self->{'LOOKUP_REGEX_SAVE'}) { @@ -181,7 +179,10 @@ push @out, $f; } } + $log->debug("lookup for: ",$tmp, " returned: ", join(", ",@out)); + $log->logconfess("return is array and it's not expected!") unless wantarray; + return @out; } else { return $tmp;