Lines 52-61
use C4::ClassSortRoutine;
Link Here
|
52 |
my %loaded_routines = (); |
52 |
my %loaded_routines = (); |
53 |
my @sort_routines = GetSortRoutineNames(); |
53 |
my @sort_routines = GetSortRoutineNames(); |
54 |
foreach my $sort_routine (@sort_routines) { |
54 |
foreach my $sort_routine (@sort_routines) { |
55 |
if (eval "require C4::ClassSortRoutine::$sort_routine") { |
55 |
if (eval {require C4::ClassSortRoutine::$sort_routine}) { |
56 |
my $ref; |
56 |
my $ref; |
57 |
eval "\$ref = \\\&C4::ClassSortRoutine::${sort_routine}::get_class_sort_key"; |
57 |
eval {\$ref = \\\&C4::ClassSortRoutine::${sort_routine}::get_class_sort_key}; |
58 |
if (eval "\$ref->(\"a\", \"b\")") { |
58 |
if (eval { \$ref->(\"a\", \"b\")} ) { |
59 |
$loaded_routines{$sort_routine} = $ref; |
59 |
$loaded_routines{$sort_routine} = $ref; |
60 |
} else { |
60 |
} else { |
61 |
$loaded_routines{$sort_routine} = \&_get_class_sort_key; |
61 |
$loaded_routines{$sort_routine} = \&_get_class_sort_key; |
62 |
- |
|
|