chiark / gitweb /
expire-iso8601: break out $use->()
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 19 Aug 2020 23:58:33 +0000 (00:58 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 19 Aug 2020 23:59:54 +0000 (00:59 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
scripts/expire-iso8601

index 530be6b7ec4f7d5f67073fe6d69d6cb6e301c440..1f7c78758e206285be5c72a214ffe98f4772d89f 100755 (executable)
@@ -128,8 +128,13 @@ sub flag ($) {
     $i++;
   }
 
-  for (;;) {
+  my $use = sub {
+    my ($i, $spec) = @_;
     push @{ $files[$i]{U} }, $spec;
+  };
+
+  for (;;) {
+    $use->($i, $spec);
 
     # find $j, the closest to $i, preferably no more than $dmax younger
     my $j = $i;