about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-02-26 00:44:05 +0000
committerEric Wong <e@yhbt.net>2020-02-27 08:48:52 +0000
commit815f07f300a4f1e95a50cba76bbff449fa653325 (patch)
treee613e84857eae945c1533b98116824e1c397c674 /lib
parent6e2f31b8b81ccc99fe17e8a639d66c84c04558dd (diff)
downloadpublic-inbox-815f07f300a4f1e95a50cba76bbff449fa653325.tar.gz
`%over' could be confused for the overview SQLite DB
instance, so call it `%override', instead.  There's
also no need to write a loop to override a hash when
the language can do it for us.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/SearchView.pm10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm
index 0bd94774..287b0a28 100644
--- a/lib/PublicInbox/SearchView.pm
+++ b/lib/PublicInbox/SearchView.pm
@@ -366,14 +366,10 @@ sub new {
 }
 
 sub qs_html {
-        my ($self, %over) = @_;
+        my ($self, %override) = @_;
 
-        if (keys %over) {
-                my $tmp = bless { %$self }, ref($self);
-                foreach my $k (keys %over) {
-                        $tmp->{$k} = $over{$k};
-                }
-                $self = $tmp;
+        if (scalar(keys(%override))) {
+                $self = bless { (%$self, %override) }, ref($self);
         }
 
         my $q = uri_escape($self->{'q'}, MID_ESC);