Thread Ersatz für "wantarray" (33 answers)
Opened by Kuerbis at 2016-02-01 11:09

Kuerbis
 2016-02-02 16:06
#183695 #183695
User since
2011-03-20
936 Artikel
BenutzerIn
[default_avatar]
Meine jetzige Lösung schaut so aus:

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
sub choose ( Array $orig_list, %opt? ) is export {
    %opt<multiselect> = 0;
    return Term::Choose.new().choose( $orig_list, %opt );
}

sub choose_multi ( Array $orig_list, %opt? ) is export {
    %opt<multiselect> = 1;
    return Term::Choose.new().choose( $orig_list, %opt );
}


Ist das so in Ordnung oder gibt es hier irgendwelche Fallstricke, die ich nicht berücksichtigt habe?

View full thread Ersatz für "wantarray"