Filename | /mnt/catalyst/koha/C4/ClassSortRoutine/LCC.pm |
Statements | Executed 18 statements in 2.06ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 3.38ms | 28.1ms | BEGIN@23 | C4::ClassSortRoutine::LCC::
1 | 1 | 1 | 547µs | 559µs | BEGIN@21 | C4::ClassSortRoutine::LCC::
1 | 1 | 1 | 15µs | 92µs | get_class_sort_key | C4::ClassSortRoutine::LCC::
1 | 1 | 1 | 9µs | 30µs | BEGIN@25 | C4::ClassSortRoutine::LCC::
1 | 1 | 1 | 8µs | 12µs | BEGIN@22 | C4::ClassSortRoutine::LCC::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package C4::ClassSortRoutine::LCC; | ||||
2 | |||||
3 | # Copyright (C) 2007 LibLime | ||||
4 | # Copyright (C) 2012 Equinox Software, Inc. | ||||
5 | # | ||||
6 | # This file is part of Koha. | ||||
7 | # | ||||
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 | ||||
11 | # version. | ||||
12 | # | ||||
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. | ||||
16 | # | ||||
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. | ||||
20 | |||||
21 | 2 | 29µs | 2 | 572µs | # spent 559µs (547+13) within C4::ClassSortRoutine::LCC::BEGIN@21 which was called:
# once (547µs+13µs) by C4::ClassSource::BEGIN@25 at line 21 # spent 559µs making 1 call to C4::ClassSortRoutine::LCC::BEGIN@21
# spent 12µs making 1 call to strict::import |
22 | 2 | 21µs | 2 | 17µs | # spent 12µs (8+5) within C4::ClassSortRoutine::LCC::BEGIN@22 which was called:
# once (8µs+5µs) by C4::ClassSource::BEGIN@25 at line 22 # spent 12µs making 1 call to C4::ClassSortRoutine::LCC::BEGIN@22
# spent 5µs making 1 call to warnings::import |
23 | 2 | 1.61ms | 1 | 28.1ms | # spent 28.1ms (3.38+24.7) within C4::ClassSortRoutine::LCC::BEGIN@23 which was called:
# once (3.38ms+24.7ms) by C4::ClassSource::BEGIN@25 at line 23 # spent 28.1ms making 1 call to C4::ClassSortRoutine::LCC::BEGIN@23 |
24 | |||||
25 | 2 | 382µs | 2 | 51µs | # spent 30µs (9+21) within C4::ClassSortRoutine::LCC::BEGIN@25 which was called:
# once (9µs+21µs) by C4::ClassSource::BEGIN@25 at line 25 # spent 30µs making 1 call to C4::ClassSortRoutine::LCC::BEGIN@25
# spent 21µs making 1 call to vars::import |
26 | |||||
27 | # set the version for version checking | ||||
28 | 1 | 2µs | $VERSION = 3.07.00.049; | ||
29 | |||||
30 | =head1 NAME | ||||
31 | |||||
32 | C4::ClassSortRoutine::LCC - generic call number sorting key routine | ||||
33 | |||||
34 | =head1 SYNOPSIS | ||||
35 | |||||
36 | use C4::ClassSortRoutine; | ||||
37 | |||||
38 | my $cn_sort = GetClassSortKey('LCC', $cn_class, $cn_item); | ||||
39 | |||||
40 | =head1 FUNCTIONS | ||||
41 | |||||
42 | =head2 get_class_sort_key | ||||
43 | |||||
44 | my $cn_sort = C4::ClassSortRoutine::LCC::LCC($cn_class, $cn_item); | ||||
45 | |||||
46 | Generates sorting key for LC call numbers. | ||||
47 | |||||
48 | =cut | ||||
49 | |||||
50 | # spent 92µs (15+77) within C4::ClassSortRoutine::LCC::get_class_sort_key which was called:
# once (15µs+77µs) by C4::ClassSource::BEGIN@25 at line 1 of (eval 43)[C4/ClassSortRoutine.pm:58] | ||||
51 | 1 | 600ns | my ($cn_class, $cn_item) = @_; | ||
52 | |||||
53 | 1 | 200ns | $cn_class = '' unless defined $cn_class; | ||
54 | 1 | 0s | $cn_item = '' unless defined $cn_item; | ||
55 | 1 | 3µs | 1 | 5µs | my $call_number = Library::CallNumber::LC->new(uc "$cn_class $cn_item"); # spent 5µs making 1 call to Library::CallNumber::LC::new |
56 | 1 | 100ns | return '' unless defined $call_number; | ||
57 | 1 | 1µs | 1 | 72µs | my $key = $call_number->normalize(); # spent 72µs making 1 call to Library::CallNumber::LC::normalize |
58 | 1 | 100ns | $key = '' unless defined $key; | ||
59 | 1 | 7µs | return $key; | ||
60 | |||||
61 | } | ||||
62 | |||||
63 | 1 | 3µs | 1; | ||
64 | |||||
65 | =head1 AUTHOR | ||||
66 | |||||
67 | Koha Development Team <http://koha-community.org/> | ||||
68 | |||||
69 | =cut | ||||
70 |