Lines 22-28
pod2usage(1) if $help;
Link Here
|
22 |
$verbose = 1 unless $confirm; |
22 |
$verbose = 1 unless $confirm; |
23 |
|
23 |
|
24 |
# Load configuration from the syspref |
24 |
# Load configuration from the syspref |
25 |
my $syspref_content = C4::Context->preference('automatic_item_modification_by_age_configuration'); |
25 |
C4::Context::clear_syspref_cache; |
|
|
26 |
my $syspref_content = C4::Context->preference('automatic_item_modification_by_age_configuration') // q{}; |
27 |
pod2usage({ -message => 'Set up automatic item modifications by age rules in tools first!', -exitval => 1 }) if $syspref_content !~ /\S/xsm; |
28 |
|
26 |
my $rules = eval { JSON::from_json( $syspref_content ) }; |
29 |
my $rules = eval { JSON::from_json( $syspref_content ) }; |
27 |
pod2usage({ -message => "Unable to load the configuration : $@", -exitval => 1 }) |
30 |
pod2usage({ -message => "Unable to load the configuration : $@", -exitval => 1 }) |
28 |
if $@; |
31 |
if $@; |
29 |
- |
|
|