[Koha-bugs] [Bug 28519] Add a 2nd directory for Perl modules

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jun 16 08:54:54 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28519

Julian Maurice <julian.maurice at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |julian.maurice at biblibre.com

--- Comment #12 from Julian Maurice <julian.maurice at biblibre.com> ---
You can replace

    foreach my $code (@dir_codes){
        my $path = $target_dirs->{ $code };
        if ($path){
            $unique_map{$path} = 1 unless $unique_map{$path};
        }
    }
    my @paths = sort keys %unique_map;

by

    my @paths = sort uniq map { $target_dirs->{$_} || () } @dir_codes;

and if you don't like List::MoreUtils or non-core dependencies, List::Util also
has a uniq subroutine.

But that was only a suggestion.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list