self->{cache_safe} = 1; my @unsafe_cache_params = qw(file extensions include exclude search); my $c = $self->{params}; my $p = $self->{p_run_config}; { no warnings 'uninitialized'; for (@unsafe_cache_params){ if (defined $c->{$_} || defined $p->{$_}){ if (ref $c->{$_} eq 'ARRAY' || ref $p->{$_} eq 'ARRAY'){ if (! (@{$c->{$_}} ~~ @{$p->{$_}})){ $self->{cache_safe} = 0; last; } } elsif ($c->{$_} ne $p->{$_}){ $self->{cache_safe} = 0; last; } } } }