Overview

Request 885502 superseded

Extend reproducible.patch to sort file lists (boo#1041090)


Tina Müller's avatar

Note that using sort as a return value of a function can be harmful. sort in scalar context is undefined, so if you have a sub like this:

    sub foo {
        return sort [@x](https://build.opensuse.org/users/x);
    }
    my $num = foo();

and call it in scalar context, you will get back undef and not the number of elements. In the case of this patch I don't know if the function find_file is called in scalar context anywhere, I just wanted to note that one should avoid doing a sort on return directly and rather do something like:

    [@x](https://build.opensuse.org/users/x) = sort [@x](https://build.opensuse.org/users/x);
    return [@x](https://build.opensuse.org/users/x);

I don't know how to prevent "at-sign letter" being interpreted as a link to a user, sorry.


Tina Müller's avatar

I extended the patch to enforce list context: https://build.opensuse.org/request/show/886980


Request History
Bernhard Wiedemann's avatar

bmwiedemann created request

Extend reproducible.patch to sort file lists (boo#1041090)


Saul Goodman's avatar

licensedigger accepted review

ok


Wolfgang Engel's avatar

bigironman added as a reviewer

Being evaluated by staging project "openSUSE:Backports:SLE-15-SP3:Staging:adi:19"


Wolfgang Engel's avatar

bigironman accepted review

Picked "openSUSE:Backports:SLE-15-SP3:Staging:adi:19"


Bernhard Wiedemann's avatar

bmwiedemann superseded request

superseded by 888942

openSUSE Build Service is sponsored by