Revision 6b89ba35
Von Moritz Bunkus vor mehr als 5 Jahren hinzugefügt
SL/DB/Helper/AttrSorted.pm | ||
---|---|---|
|
||
croak 'not an accessor' if @_ > 1;
|
||
|
||
my $next_position = (max map { $_->$position_sub // 0 } @{ $self->$unsorted_sub }) + 1;
|
||
my $next_position = ((max map { $_->$position_sub // 0 } @{ $self->$unsorted_sub }) // 0) + 1;
|
||
return [
|
||
map { $_->[1] }
|
||
sort { $a->[0] <=> $b->[0] }
|
Auch abrufbar als: Unified diff
AttrSorted-Helfer: Warnungen wegen nicht initialisierten Werten vermeiden
Durch Tests getriggert, konkret: durch t/controllers/csvimport/parts.t