Permalink
Browse files

use #set

  • Loading branch information...
1 parent ee37da3 commit d0a05297d1ae1b96de5e2731430e6f23b83b7fc4 Ryo Anazawa committed Jul 30, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 examples/lib/CGI/Header/Extended.pm
@@ -5,16 +5,16 @@ use parent 'CGI::Header';
sub merge {
my ( $self, @args ) = @_;
- my $header = $self->header;
if ( @args == 1 ) {
my %header = %{ $args[0] };
+ my $header = $self->header;
ref( $self )->new( header => \%header ); # rehash %header
%$header = ( %$header, %header );
}
else {
while ( my ($key, $value) = splice @args, 0, 2 ) {
- $header->{ $self->normalize($key) } = $value; # overwrite
+ $self->set( $key => $value );
}
}

0 comments on commit d0a0529

Please sign in to comment.