]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchView.pm
treewide: run update-copyrights from gnulib for 2019
[public-inbox.git] / lib / PublicInbox / SearchView.pm
index 94a55b8d8a3b1a3cbac5b2b569c2f90160c7de88..828926c721790b2e9ad3176e6f7284c69eb2b873 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2015-2020 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
 # Displays search results for the web interface
@@ -14,7 +14,7 @@ use PublicInbox::SearchThread;
 our $LIM = 200;
 my %rmap_inc;
 
-sub noop {}
+my $noop = sub {};
 
 sub mbox_results {
        my ($ctx) = @_;
@@ -59,7 +59,7 @@ retry:
        if ($err) {
                $code = 400;
                $ctx->{-html_tip} = '<pre>'.err_txt($ctx, $err).'</pre><hr>';
-               $cb = *noop;
+               $cb = $noop;
        } elsif ($total == 0) {
                if (defined($ctx->{-uxs_retried})) {
                        # undo retry damage:
@@ -71,7 +71,7 @@ retry:
                }
                $code = 404;
                $ctx->{-html_tip} = "<pre>\n[No results found]</pre><hr>";
-               $cb = *noop;
+               $cb = $noop;
        } else {
                return adump($_[0], $mset, $q, $ctx) if $x eq 'A';
 
@@ -122,7 +122,7 @@ sub mset_summary {
                $$res .= "$pfx  - by $f @ $date UTC [$pct%]\n\n";
        }
        $$res .= search_nav_bot($mset, $q);
-       *noop;
+       $noop;
 }
 
 # shorten "/full/path/to/Foo/Bar.pm" to "Foo/Bar.pm" so error