Permalink
Browse files

tidy code

  • Loading branch information...
1 parent 3c02783 commit f2f9ba34201c18be5b350724f93bea5176163ee4 Ryo Anazawa committed Jul 30, 2013
Showing with 2 additions and 3 deletions.
  1. +2 −3 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 ) {

0 comments on commit f2f9ba3

Please sign in to comment.