1 package C4::ClassSortRoutine::LCC;
3 # Copyright (C) 2007 LibLime
4 # Copyright (C) 2012 Equinox Software, Inc.
6 # This file is part of Koha.
8 # Koha is free software; you can redistribute it and/or modify it under the
9 # terms of the GNU General Public License as published by the Free Software
10 # Foundation; either version 2 of the License, or (at your option) any later
13 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
14 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License along
18 # with Koha; if not, write to the Free Software Foundation, Inc.,
19 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 use Library::CallNumber::LC;
25 use vars qw($VERSION);
27 # set the version for version checking
28 $VERSION = 3.07.00.049;
32 C4::ClassSortRoutine::LCC - generic call number sorting key routine
36 use C4::ClassSortRoutine;
38 my $cn_sort = GetClassSortKey('LCC', $cn_class, $cn_item);
42 =head2 get_class_sort_key
44 my $cn_sort = C4::ClassSortRoutine::LCC::LCC($cn_class, $cn_item);
46 Generates sorting key for LC call numbers.
50 sub get_class_sort_key {
51 my ($cn_class, $cn_item) = @_;
53 $cn_class = '' unless defined $cn_class;
54 $cn_item = '' unless defined $cn_item;
55 my $call_number = Library::CallNumber::LC->new(uc "$cn_class $cn_item");
56 return '' unless defined $call_number;
57 my $key = $call_number->normalize();
58 $key = '' unless defined $key;
67 Koha Development Team <http://koha-community.org/>