Lines 321-327
sub operator {
Link Here
|
321 |
my $opname = shift; |
321 |
my $opname = shift; |
322 |
my $op = shift; |
322 |
my $op = shift; |
323 |
|
323 |
|
324 |
return undef unless ($opname); |
324 |
return unless ($opname); |
325 |
|
325 |
|
326 |
$parser_config{$class}{operators} ||= {}; |
326 |
$parser_config{$class}{operators} ||= {}; |
327 |
$parser_config{$class}{operators}{$opname} = $op if ($op); |
327 |
$parser_config{$class}{operators}{$opname} = $op if ($op); |
Lines 1488-1494
package OpenILS::QueryParser::query_plan;
Link Here
|
1488 |
|
1488 |
|
1489 |
sub QueryParser { |
1489 |
sub QueryParser { |
1490 |
my $self = shift; |
1490 |
my $self = shift; |
1491 |
return undef unless ref($self); |
1491 |
return unless ref($self); |
1492 |
return $self->{QueryParser}; |
1492 |
return $self->{QueryParser}; |
1493 |
} |
1493 |
} |
1494 |
|
1494 |
|
Lines 1540-1546
sub _merge_filters {
Link Here
|
1540 |
my $right_filter = shift; |
1540 |
my $right_filter = shift; |
1541 |
my $join = shift; |
1541 |
my $join = shift; |
1542 |
|
1542 |
|
1543 |
return undef unless $left_filter or $right_filter; |
1543 |
return unless $left_filter or $right_filter; |
1544 |
return $right_filter unless $left_filter; |
1544 |
return $right_filter unless $left_filter; |
1545 |
return $left_filter unless $right_filter; |
1545 |
return $left_filter unless $right_filter; |
1546 |
|
1546 |
|
Lines 1599-1605
sub collapse_filters {
Link Here
|
1599 |
sub find_filter { |
1599 |
sub find_filter { |
1600 |
my $self = shift; |
1600 |
my $self = shift; |
1601 |
my $needle = shift;; |
1601 |
my $needle = shift;; |
1602 |
return undef unless ($needle); |
1602 |
return unless ($needle); |
1603 |
|
1603 |
|
1604 |
my $filter = $self->collapse_filters($needle); |
1604 |
my $filter = $self->collapse_filters($needle); |
1605 |
|
1605 |
|
Lines 1613-1619
sub find_filter {
Link Here
|
1613 |
sub find_modifier { |
1613 |
sub find_modifier { |
1614 |
my $self = shift; |
1614 |
my $self = shift; |
1615 |
my $needle = shift;; |
1615 |
my $needle = shift;; |
1616 |
return undef unless ($needle); |
1616 |
return unless ($needle); |
1617 |
return grep { $_->name eq $needle } @{ $self->modifiers }; |
1617 |
return grep { $_->name eq $needle } @{ $self->modifiers }; |
1618 |
} |
1618 |
} |
1619 |
|
1619 |
|
Lines 2103-2127
sub new {
Link Here
|
2103 |
|
2103 |
|
2104 |
sub node { |
2104 |
sub node { |
2105 |
my $self = shift; |
2105 |
my $self = shift; |
2106 |
return undef unless (ref $self); |
2106 |
return unless (ref $self); |
2107 |
return $self->{node}; |
2107 |
return $self->{node}; |
2108 |
} |
2108 |
} |
2109 |
|
2109 |
|
2110 |
sub content { |
2110 |
sub content { |
2111 |
my $self = shift; |
2111 |
my $self = shift; |
2112 |
return undef unless (ref $self); |
2112 |
return unless (ref $self); |
2113 |
return $self->{content}; |
2113 |
return $self->{content}; |
2114 |
} |
2114 |
} |
2115 |
|
2115 |
|
2116 |
sub prefix { |
2116 |
sub prefix { |
2117 |
my $self = shift; |
2117 |
my $self = shift; |
2118 |
return undef unless (ref $self); |
2118 |
return unless (ref $self); |
2119 |
return $self->{prefix}; |
2119 |
return $self->{prefix}; |
2120 |
} |
2120 |
} |
2121 |
|
2121 |
|
2122 |
sub suffix { |
2122 |
sub suffix { |
2123 |
my $self = shift; |
2123 |
my $self = shift; |
2124 |
return undef unless (ref $self); |
2124 |
return unless (ref $self); |
2125 |
return $self->{suffix}; |
2125 |
return $self->{suffix}; |
2126 |
} |
2126 |
} |
2127 |
|
2127 |
|
2128 |
- |
|
|