| Filename | /usr/share/koha/lib/C4/ClassSortRoutine/Generic.pm |
| Statements | Executed 20 statements in 265µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 24µs | 31µs | C4::ClassSortRoutine::Generic::BEGIN@20 |
| 1 | 1 | 1 | 23µs | 161µs | C4::ClassSortRoutine::Generic::get_class_sort_key |
| 4 | 4 | 1 | 21µs | 138µs | C4::ClassSortRoutine::Generic::CORE:subst (opcode) |
| 1 | 1 | 1 | 12µs | 46µs | C4::ClassSortRoutine::Generic::BEGIN@23 |
| 1 | 1 | 1 | 11µs | 32µs | C4::ClassSortRoutine::Generic::BEGIN@21 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package C4::ClassSortRoutine::Generic; | ||||
| 2 | |||||
| 3 | # Copyright (C) 2007 LibLime | ||||
| 4 | # | ||||
| 5 | # This file is part of Koha. | ||||
| 6 | # | ||||
| 7 | # Koha is free software; you can redistribute it and/or modify it under the | ||||
| 8 | # terms of the GNU General Public License as published by the Free Software | ||||
| 9 | # Foundation; either version 2 of the License, or (at your option) any later | ||||
| 10 | # version. | ||||
| 11 | # | ||||
| 12 | # Koha is distributed in the hope that it will be useful, but WITHOUT ANY | ||||
| 13 | # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||||
| 14 | # A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||||
| 15 | # | ||||
| 16 | # You should have received a copy of the GNU General Public License along | ||||
| 17 | # with Koha; if not, write to the Free Software Foundation, Inc., | ||||
| 18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||||
| 19 | |||||
| 20 | 3 | 31µs | 2 | 37µs | # spent 31µs (24+7) within C4::ClassSortRoutine::Generic::BEGIN@20 which was called:
# once (24µs+7µs) by C4::ClassSource::BEGIN@25 at line 20 # spent 31µs making 1 call to C4::ClassSortRoutine::Generic::BEGIN@20
# spent 7µs making 1 call to strict::import |
| 21 | 3 | 34µs | 2 | 52µs | # spent 32µs (11+20) within C4::ClassSortRoutine::Generic::BEGIN@21 which was called:
# once (11µs+20µs) by C4::ClassSource::BEGIN@25 at line 21 # spent 32µs making 1 call to C4::ClassSortRoutine::Generic::BEGIN@21
# spent 20µs making 1 call to warnings::import |
| 22 | |||||
| 23 | 3 | 152µs | 2 | 81µs | # spent 46µs (12+35) within C4::ClassSortRoutine::Generic::BEGIN@23 which was called:
# once (12µs+35µs) by C4::ClassSource::BEGIN@25 at line 23 # spent 46µs making 1 call to C4::ClassSortRoutine::Generic::BEGIN@23
# spent 35µs making 1 call to vars::import |
| 24 | |||||
| 25 | # set the version for version checking | ||||
| 26 | 1 | 2µs | $VERSION = 3.07.00.049; | ||
| 27 | |||||
| 28 | =head1 NAME | ||||
| 29 | |||||
| - - | |||||
| 53 | # spent 161µs (23+138) within C4::ClassSortRoutine::Generic::get_class_sort_key which was called:
# once (23µs+138µs) by C4::ClassSource::BEGIN@25 at line 1 of (eval 1001)[/usr/share/koha/lib/C4/ClassSortRoutine.pm:58] | ||||
| 54 | 9 | 34µs | my ($cn_class, $cn_item) = @_; | ||
| 55 | |||||
| 56 | $cn_class = '' unless defined $cn_class; | ||||
| 57 | $cn_item = '' unless defined $cn_item; | ||||
| 58 | my $key = uc "$cn_class $cn_item"; | ||||
| 59 | 1 | 2µs | $key =~ s/^\s+//; # spent 2µs making 1 call to C4::ClassSortRoutine::Generic::CORE:subst | ||
| 60 | 1 | 2µs | $key =~ s/\s+$//; # spent 2µs making 1 call to C4::ClassSortRoutine::Generic::CORE:subst | ||
| 61 | 1 | 1µs | $key =~ s/\s+/_/g; # spent 1µs making 1 call to C4::ClassSortRoutine::Generic::CORE:subst | ||
| 62 | 1 | 9µs | 2 | 249µs | $key =~ s/[^\p{IsAlnum}_]//g; # spent 133µs making 1 call to C4::ClassSortRoutine::Generic::CORE:subst
# spent 117µs making 1 call to utf8::SWASHNEW |
| 63 | return $key; | ||||
| 64 | |||||
| 65 | } | ||||
| 66 | |||||
| 67 | 1 | 3µs | 1; | ||
| 68 | |||||
| 69 | =head1 AUTHOR | ||||
| 70 | |||||
| - - | |||||
# spent 138µs (21+117) within C4::ClassSortRoutine::Generic::CORE:subst which was called 4 times, avg 35µs/call:
# once (16µs+117µs) by C4::ClassSortRoutine::Generic::get_class_sort_key at line 62
# once (2µs+0s) by C4::ClassSortRoutine::Generic::get_class_sort_key at line 59
# once (2µs+0s) by C4::ClassSortRoutine::Generic::get_class_sort_key at line 60
# once (1µs+0s) by C4::ClassSortRoutine::Generic::get_class_sort_key at line 61 |