Bug 17600: Standardize our EXPORT_OK
[srvgit] / C4 / ClassSortRoutine.pm
index e8c9b5e..248baa7 100644 (file)
@@ -4,31 +4,34 @@ package C4::ClassSortRoutine;
 # 
 # This file is part of Koha.
 #
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
 #
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License along
-# with Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use strict;
 use warnings;
 
-require Exporter;
 use Class::Factory::Util;
 use C4::Context;
-use C4::Koha;
 
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
-# set the version for version checking
-$VERSION = 3.00;
+our (@ISA, @EXPORT_OK);
+BEGIN {
+    require Exporter;
+    @ISA    = qw(Exporter);
+    @EXPORT_OK = qw(
+       GetSortRoutineNames
+       GetClassSortKey
+    );
+}
 
 =head1 NAME 
 
@@ -43,20 +46,14 @@ use C4::ClassSortRoutine;
 
 =cut
 
-@ISA    = qw(Exporter);
-@EXPORT = qw(
-   &GetSortRoutineNames
-   &GetClassSortKey
-);
-
-# intialization code
+# initialization code
 my %loaded_routines = ();
 my @sort_routines = GetSortRoutineNames();
 foreach my $sort_routine (@sort_routines) {
     if (eval "require C4::ClassSortRoutine::$sort_routine") {
         my $ref;
-        eval "\$ref = \\\&C4::ClassSortRoutine::${sort_routine}::get_class_sort_key";
-        if (eval "\$ref->(\"a\", \"b\")") {
+        $ref = \&{"C4::ClassSortRoutine::${sort_routine}::get_class_sort_key"};
+        if (eval { $ref->("a", "b") }) {
             $loaded_routines{$sort_routine} = $ref;
         } else {
             $loaded_routines{$sort_routine} = \&_get_class_sort_key;
@@ -102,7 +99,7 @@ sub GetClassSortKey {
     # should replace with some way of getting column widths from
     # the DB schema -- since doing this should ideally be
     # independent of the DBMS, deferring for the moment.
-    return substr($key, 0, 30);
+    return substr($key, 0, 255);
 }
 
 =head2 _get_class_sort_key 
@@ -126,7 +123,7 @@ sub _get_class_sort_key {
 
 =head1 AUTHOR
 
-Koha Developement team <info@koha.org>
+Koha Development Team <http://koha-community.org/>
 
 =cut