There were several perlcritic violations for returning explicit undef,
and splitting up the various driver classes resulted in POD compliance
errors, where the POD was starting with head2 rather than head1. This
patch fixes those errors (but has no functional impact).
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
use strict;
use warnings;
use strict;
use warnings;
+=head1 NAME
+
+ Koha::QueryParser::Driver::PQF::Util - Utility module for PQF QueryParser driver
+
+=head1 FUNCTIONS
+
+=head2 attributes_to_attr_string
+
+ Koha::QueryParser::Driver::PQF::Util(%attributes);
+
+ Koha::QueryParser::Driver::PQF::Util({ '1' => '1003', '4' => '6' });
+
+Convert a hashref with a Bib-1 mapping into its PQF string representation.
+
+=cut
+
sub attributes_to_attr_string {
my ($attributes) = @_;
my $attr_string = '';
sub attributes_to_attr_string {
my ($attributes) = @_;
my $attr_string = '';
use strict;
use warnings;
use strict;
use warnings;
+=head1 NAME
+
+Koha::QueryParser::Driver::PQF::query_plan - query_plan subclass for PQF driver
+
+=head1 FUNCTIONS
+
=head2 Koha::QueryParser::Driver::PQF::query_plan::target_syntax
my $pqf = $query_plan->target_syntax($server);
=head2 Koha::QueryParser::Driver::PQF::query_plan::target_syntax
my $pqf = $query_plan->target_syntax($server);
use strict;
use warnings;
use strict;
use warnings;
+=head1 NAME
+
+Koha::QueryParser::Driver::PQF::query_plan::facet - facet subclass for PQF driver
+
+=head1 FUNCTIONS
+
=head2 Koha::QueryParser::Driver::PQF::query_plan::facet::target_syntax
my $pqf = $facet->target_syntax($server);
=head2 Koha::QueryParser::Driver::PQF::query_plan::facet::target_syntax
my $pqf = $facet->target_syntax($server);
use strict;
use warnings;
use strict;
use warnings;
+=head1 NAME
+
+Koha::QueryParser::Driver::PQF::query_plan::filter - filter subclass for PQF driver
+
+=head1 FUNCTIONS
+
=head2 Koha::QueryParser::Driver::PQF::query_plan::filter::target_syntax
my $pqf = $filter->target_syntax($server);
=head2 Koha::QueryParser::Driver::PQF::query_plan::filter::target_syntax
my $pqf = $filter->target_syntax($server);
use strict;
use warnings;
use strict;
use warnings;
+=head1 NAME
+
+Koha::QueryParser::Driver::PQF::query_plan::modifer - modifier subclass for PQF driver
+
+=head1 FUNCTIONS
+
=head2 Koha::QueryParser::Driver::PQF::query_plan::modifier::target_syntax
my $pqf = $modifier->target_syntax($server, $query_plan);
=head2 Koha::QueryParser::Driver::PQF::query_plan::modifier::target_syntax
my $pqf = $modifier->target_syntax($server, $query_plan);
use strict;
use warnings;
use strict;
use warnings;
+=head1 NAME
+
+Koha::QueryParser::Driver::PQF::query_plan::node - node subclass for PQF driver
+
+=head1 FUNCTIONS
+
=head2 Koha::QueryParser::Driver::PQF::query_plan::node::target_syntax
my $pqf = $node->target_syntax($server);
=head2 Koha::QueryParser::Driver::PQF::query_plan::node::target_syntax
my $pqf = $node->target_syntax($server);
use strict;
use warnings;
use strict;
use warnings;
+=head1 NAME
+
+Koha::QueryParser::Driver::PQF::query_plan::node::atom - atom subclass for PQF driver
+
+=head1 FUNCTIONS
+
=head2 Koha::QueryParser::Driver::PQF::query_plan::node::atom::target_syntax
my $pqf = $atom->target_syntax($server);
=head2 Koha::QueryParser::Driver::PQF::query_plan::node::atom::target_syntax
my $pqf = $atom->target_syntax($server);
my $opname = shift;
my $op = shift;
my $opname = shift;
my $op = shift;
- return undef unless ($opname);
+ return unless ($opname);
$parser_config{$class}{operators} ||= {};
$parser_config{$class}{operators}{$opname} = $op if ($op);
$parser_config{$class}{operators} ||= {};
$parser_config{$class}{operators}{$opname} = $op if ($op);
sub QueryParser {
my $self = shift;
sub QueryParser {
my $self = shift;
- return undef unless ref($self);
+ return unless ref($self);
return $self->{QueryParser};
}
return $self->{QueryParser};
}
my $right_filter = shift;
my $join = shift;
my $right_filter = shift;
my $join = shift;
- return undef unless $left_filter or $right_filter;
+ return unless $left_filter or $right_filter;
return $right_filter unless $left_filter;
return $left_filter unless $right_filter;
return $right_filter unless $left_filter;
return $left_filter unless $right_filter;
sub find_filter {
my $self = shift;
my $needle = shift;;
sub find_filter {
my $self = shift;
my $needle = shift;;
- return undef unless ($needle);
+ return unless ($needle);
my $filter = $self->collapse_filters($needle);
my $filter = $self->collapse_filters($needle);
sub find_modifier {
my $self = shift;
my $needle = shift;;
sub find_modifier {
my $self = shift;
my $needle = shift;;
- return undef unless ($needle);
+ return unless ($needle);
return grep { $_->name eq $needle } @{ $self->modifiers };
}
return grep { $_->name eq $needle } @{ $self->modifiers };
}
sub node {
my $self = shift;
sub node {
my $self = shift;
- return undef unless (ref $self);
+ return unless (ref $self);
return $self->{node};
}
sub content {
my $self = shift;
return $self->{node};
}
sub content {
my $self = shift;
- return undef unless (ref $self);
+ return unless (ref $self);
return $self->{content};
}
sub prefix {
my $self = shift;
return $self->{content};
}
sub prefix {
my $self = shift;
- return undef unless (ref $self);
+ return unless (ref $self);
return $self->{prefix};
}
sub suffix {
my $self = shift;
return $self->{prefix};
}
sub suffix {
my $self = shift;
- return undef unless (ref $self);
+ return unless (ref $self);
return $self->{suffix};
}
return $self->{suffix};
}