]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Inbox.pm
Merge branch 'charclass'
[public-inbox.git] / lib / PublicInbox / Inbox.pm
index 2771a241aa5361f3067ef15f22a1463c4d6b75dc..c93303322194e024b8125b8d8b64ca014fe00483 100644 (file)
@@ -32,13 +32,12 @@ sub cleanup_task () {
                                # refcnt is zero when tmp is out-of-scope
                        }
                }
-               my $expire = time - 60;
                if (my $git = $ibx->{git}) {
-                       $again = $git->cleanup($expire);
+                       $again = $git->cleanup;
                }
                if (my $gits = $ibx->{-repo_objs}) {
                        foreach my $git (@$gits) {
-                               $again = 1 if $git->cleanup($expire);
+                               $again = 1 if $git->cleanup;
                        }
                }
                if ($have_devel_peek) {
@@ -75,7 +74,7 @@ sub _set_uint ($$$) {
        my $val = $opts->{$field};
        if (defined $val) {
                $val = $val->[-1] if ref($val) eq 'ARRAY';
-               $val = undef if $val !~ /\A\d+\z/;
+               $val = undef if $val !~ /\A[0-9]+\z/;
        }
        $opts->{$field} = $val || $default;
 }
@@ -88,7 +87,7 @@ sub _set_limiter ($$$) {
                my $mkey = $pfx.'max';
                my $val = $self->{$mkey} or return;
                my $lim;
-               if ($val =~ /\A\d+\z/) {
+               if ($val =~ /\A[0-9]+\z/) {
                        require PublicInbox::Qspawn;
                        $lim = PublicInbox::Qspawn::Limiter->new($val);
                } elsif ($val =~ /\A[a-z][a-z0-9]*\z/) {
@@ -162,7 +161,7 @@ sub max_git_part {
                if (opendir my $dh, $gits) {
                        my $max = -1;
                        while (defined(my $git_dir = readdir($dh))) {
-                               $git_dir =~ m!\A(\d+)\.git\z! or next;
+                               $git_dir =~ m!\A([0-9]+)\.git\z! or next;
                                $max = $1 if $1 > $max;
                        }
                        $part = $self->{-max_git_part} = $max if $max >= 0;