View | Details | Raw Unified | Return to bug 20817
Collapse All | Expand All

(-)a/Koha/Acquisition/Utils.pm (-3 / +4 lines)
Lines 17-22 package Koha::Acquisition::Utils; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use YAML::XS;
21
20
use C4::Context;
22
use C4::Context;
21
23
22
=head1 NAME
24
=head1 NAME
Lines 43-49 sub GetMarcFieldsToOrderValues { Link Here
43
    my $syspref = C4::Context->preference('MarcFieldsToOrder');
45
    my $syspref = C4::Context->preference('MarcFieldsToOrder');
44
    $syspref = "$syspref\n\n"; # YAML is anal on ending \n. Surplus does not hurt
46
    $syspref = "$syspref\n\n"; # YAML is anal on ending \n. Surplus does not hurt
45
    my $yaml = eval {
47
    my $yaml = eval {
46
        YAML::Load($syspref);
48
        YAML::XS::Load($syspref);
47
    };
49
    };
48
    if ( $@ ) {
50
    if ( $@ ) {
49
        warn "Unable to parse $syspref syspref : $@";
51
        warn "Unable to parse $syspref syspref : $@";
Lines 87-93 sub GetMarcItemFieldsToOrderValues { Link Here
87
    my $syspref = C4::Context->preference('MarcItemFieldsToOrder');
89
    my $syspref = C4::Context->preference('MarcItemFieldsToOrder');
88
    $syspref = "$syspref\n\n"; # YAML is anal on ending \n. Surplus does not hurt
90
    $syspref = "$syspref\n\n"; # YAML is anal on ending \n. Surplus does not hurt
89
    my $yaml = eval {
91
    my $yaml = eval {
90
        YAML::Load($syspref);
92
        YAML::XS::Load($syspref);
91
    };
93
    };
92
    if ( $@ ) {
94
    if ( $@ ) {
93
        warn "Unable to parse $syspref syspref : $@";
95
        warn "Unable to parse $syspref syspref : $@";
94
- 

Return to bug 20817