lilalo
diff l3-agent @ 86:3058ada85a58
Сортировка командных строк выполняется только по известным временным параметрам.
Добавлена проверка определённости параметров
Добавлена проверка определённости параметров
author | devi |
---|---|
date | Sat Feb 25 08:31:35 2006 +0200 (2006-02-25) |
parents | 3f92cd706473 |
children | 4c02cf4123ee |
line diff
1.1 --- a/l3-agent Sat Feb 25 08:22:20 2006 +0200 1.2 +++ b/l3-agent Sat Feb 25 08:31:35 2006 +0200 1.3 @@ -582,14 +582,22 @@ 1.4 } 1.5 1.6 @Command_Lines_Index = sort { 1.7 - defined($Command_Lines[$index[$a]]->{"time"}) 1.8 + defined($Command_Lines[$index[$a]]->{"time"}) 1.9 + && defined($Command_Lines[$index[$b]]->{"time"}) 1.10 ? $Command_Lines[$index[$a]]->{"time"} <=> $Command_Lines[$index[$b]]->{"time"} 1.11 : defined($Command_Lines[$index[$a]]->{"day"}) 1.12 - ? $Command_Lines[$index[$a]]->{"day"} cmp $Command_Lines[$index[$b]]->{"day"} 1.13 - || $Command_Lines[$index[$a]]->{"hour"} <=> $Command_Lines[$index[$b]]->{"hour"} 1.14 - || $Command_Lines[$index[$a]]->{"min"} <=> $Command_Lines[$index[$b]]->{"min"} 1.15 - || $Command_Lines[$index[$a]]->{"sec"} <=> $Command_Lines[$index[$b]]->{"sec"} 1.16 - : 0 1.17 + && defined($Command_Lines[$index[$b]]->{"day"}) 1.18 + && defined($Command_Lines[$index[$a]]->{"hour"}) 1.19 + && defined($Command_Lines[$index[$b]]->{"hour"}) 1.20 + && defined($Command_Lines[$index[$a]]->{"min"}) 1.21 + && defined($Command_Lines[$index[$b]]->{"min"}) 1.22 + && defined($Command_Lines[$index[$a]]->{"sec"}) 1.23 + && defined($Command_Lines[$index[$b]]->{"sec"}) 1.24 + ? $Command_Lines[$index[$a]]->{"day"} cmp $Command_Lines[$index[$b]]->{"day"} 1.25 + || $Command_Lines[$index[$a]]->{"hour"} <=> $Command_Lines[$index[$b]]->{"hour"} 1.26 + || $Command_Lines[$index[$a]]->{"min"} <=> $Command_Lines[$index[$b]]->{"min"} 1.27 + || $Command_Lines[$index[$a]]->{"sec"} <=> $Command_Lines[$index[$b]]->{"sec"} 1.28 + : 0 1.29 } @index; 1.30 1.31 print "finished\n" if $Config{"verbose"} =~ /y/;