Bugzilla – Attachment 14953 Details for
Bug 9239
Koha should share Evergreen's QueryParser module for parsing queries
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[Signed off] Bug 9239 follow-up: POD and perlcritic fixes
Bug-9239-follow-up-POD-and-perlcritic-fixes.patch (text/plain), 7.33 KB, created by
Elliott Davis
on 2013-01-30 15:12:40 UTC
(
hide
)
Description:
[Signed off] Bug 9239 follow-up: POD and perlcritic fixes
Filename:
MIME Type:
Creator:
Elliott Davis
Created:
2013-01-30 15:12:40 UTC
Size:
7.33 KB
patch
obsolete
>From 93e0d566ec41c8bd0183dd8aa33c7aa5f23b8651 Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Fri, 25 Jan 2013 07:45:22 -0500 >Subject: [PATCH] Bug 9239 follow-up: POD and perlcritic fixes > >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> >--- > Koha/QueryParser/Driver/PQF/Util.pm | 16 ++++++++++++++++ > Koha/QueryParser/Driver/PQF/query_plan.pm | 6 ++++++ > Koha/QueryParser/Driver/PQF/query_plan/facet.pm | 6 ++++++ > Koha/QueryParser/Driver/PQF/query_plan/filter.pm | 6 ++++++ > Koha/QueryParser/Driver/PQF/query_plan/modifier.pm | 6 ++++++ > Koha/QueryParser/Driver/PQF/query_plan/node.pm | 6 ++++++ > .../QueryParser/Driver/PQF/query_plan/node/atom.pm | 6 ++++++ > OpenILS/QueryParser.pm | 18 +++++++++--------- > 8 files changed, 61 insertions(+), 9 deletions(-) > >diff --git a/Koha/QueryParser/Driver/PQF/Util.pm b/Koha/QueryParser/Driver/PQF/Util.pm >index f2e018b..be7639b 100644 >--- a/Koha/QueryParser/Driver/PQF/Util.pm >+++ b/Koha/QueryParser/Driver/PQF/Util.pm >@@ -4,6 +4,22 @@ use Scalar::Util qw(looks_like_number); > 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 = ''; >diff --git a/Koha/QueryParser/Driver/PQF/query_plan.pm b/Koha/QueryParser/Driver/PQF/query_plan.pm >index 5435fe6..8b0df42 100644 >--- a/Koha/QueryParser/Driver/PQF/query_plan.pm >+++ b/Koha/QueryParser/Driver/PQF/query_plan.pm >@@ -4,6 +4,12 @@ use base 'OpenILS::QueryParser::query_plan'; > 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); >diff --git a/Koha/QueryParser/Driver/PQF/query_plan/facet.pm b/Koha/QueryParser/Driver/PQF/query_plan/facet.pm >index 0407e58..217cd29 100644 >--- a/Koha/QueryParser/Driver/PQF/query_plan/facet.pm >+++ b/Koha/QueryParser/Driver/PQF/query_plan/facet.pm >@@ -4,6 +4,12 @@ use base 'OpenILS::QueryParser::query_plan::facet'; > 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); >diff --git a/Koha/QueryParser/Driver/PQF/query_plan/filter.pm b/Koha/QueryParser/Driver/PQF/query_plan/filter.pm >index c632eee..587ad81 100644 >--- a/Koha/QueryParser/Driver/PQF/query_plan/filter.pm >+++ b/Koha/QueryParser/Driver/PQF/query_plan/filter.pm >@@ -4,6 +4,12 @@ use base 'OpenILS::QueryParser::query_plan::filter'; > 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); >diff --git a/Koha/QueryParser/Driver/PQF/query_plan/modifier.pm b/Koha/QueryParser/Driver/PQF/query_plan/modifier.pm >index c3a66e4..2092232 100644 >--- a/Koha/QueryParser/Driver/PQF/query_plan/modifier.pm >+++ b/Koha/QueryParser/Driver/PQF/query_plan/modifier.pm >@@ -4,6 +4,12 @@ use base 'OpenILS::QueryParser::query_plan::modifier'; > 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); >diff --git a/Koha/QueryParser/Driver/PQF/query_plan/node.pm b/Koha/QueryParser/Driver/PQF/query_plan/node.pm >index 62417a1..e93bb4b 100644 >--- a/Koha/QueryParser/Driver/PQF/query_plan/node.pm >+++ b/Koha/QueryParser/Driver/PQF/query_plan/node.pm >@@ -4,6 +4,12 @@ use base 'OpenILS::QueryParser::query_plan::node'; > 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); >diff --git a/Koha/QueryParser/Driver/PQF/query_plan/node/atom.pm b/Koha/QueryParser/Driver/PQF/query_plan/node/atom.pm >index afdb4c4..6a69c35 100644 >--- a/Koha/QueryParser/Driver/PQF/query_plan/node/atom.pm >+++ b/Koha/QueryParser/Driver/PQF/query_plan/node/atom.pm >@@ -4,6 +4,12 @@ use base 'OpenILS::QueryParser::query_plan::node::atom'; > 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); >diff --git a/OpenILS/QueryParser.pm b/OpenILS/QueryParser.pm >index f1a5662..e5aaf09 100644 >--- a/OpenILS/QueryParser.pm >+++ b/OpenILS/QueryParser.pm >@@ -321,7 +321,7 @@ sub operator { > 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); >@@ -1488,7 +1488,7 @@ package OpenILS::QueryParser::query_plan; > > sub QueryParser { > my $self = shift; >- return undef unless ref($self); >+ return unless ref($self); > return $self->{QueryParser}; > } > >@@ -1540,7 +1540,7 @@ sub _merge_filters { > 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; > >@@ -1599,7 +1599,7 @@ sub collapse_filters { > sub find_filter { > my $self = shift; > my $needle = shift;; >- return undef unless ($needle); >+ return unless ($needle); > > my $filter = $self->collapse_filters($needle); > >@@ -1613,7 +1613,7 @@ sub find_filter { > sub find_modifier { > my $self = shift; > my $needle = shift;; >- return undef unless ($needle); >+ return unless ($needle); > return grep { $_->name eq $needle } @{ $self->modifiers }; > } > >@@ -2103,25 +2103,25 @@ sub new { > > sub node { > my $self = shift; >- return undef unless (ref $self); >+ return unless (ref $self); > 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 undef unless (ref $self); >+ return unless (ref $self); > return $self->{prefix}; > } > > sub suffix { > my $self = shift; >- return undef unless (ref $self); >+ return unless (ref $self); > return $self->{suffix}; > } > >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9239
:
14020
|
14021
|
14022
|
14023
|
14172
|
14173
|
14174
|
14175
|
14180
|
14181
|
14182
|
14183
|
14847
|
14949
|
14950
|
14951
|
14952
|
14953
|
15121
|
15437
|
15865
|
15867
|
15929
|
15999
|
16004
|
16051
|
16125
|
16130
|
16131
|
16132
|
16133
|
16136
|
16140
|
16141
|
16142
|
16143
|
16144
|
16145
|
16146
|
16147
|
16148
|
16149
|
16150
|
16151
|
16152
|
16153
|
16154
|
16155
|
16180
|
16181
|
16182
|
16183
|
16184
|
16185
|
16186
|
16187
|
16188
|
16189
|
16190
|
16191
|
16192
|
16193
|
16194
|
16195