#
# 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
=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;
# 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
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <http://koha-community.org/>
=cut