Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

tidy code

  • Loading branch information...
commit f2f9ba34201c18be5b350724f93bea5176163ee4 1 parent 3c02783
Ryo Anazawa authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 examples/lib/CGI/Header/Extended.pm
View
5 examples/lib/CGI/Header/Extended.pm
@@ -7,10 +7,9 @@ sub merge {
my ( $self, @args ) = @_;
if ( @args == 1 ) {
- my %other = %{ $args[0] };
my $header = $self->header;
- ref( $self )->new( header => \%other ); # rehash %other
- %$header = ( %$header, %other );
+ my $other = ref( $self )->new( header => { %{$args[0]} } );
+ %$header = ( %$header, %{ $other->header } );
}
else {
while ( my ($key, $value) = splice @args, 0, 2 ) {
Please sign in to comment.
Something went wrong with that request. Please try again.