`%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.
}
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);