Skip to content

Commit

Permalink
Checking in changes prior to tagging of version 0.49.
Browse files Browse the repository at this point in the history
Changelog diff is:

diff --git a/Changes b/Changes
index 10d69bd..ed0ac03 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 Revision history for Perl extension CGI::Header.

+0.49 (RC-1.00) Apr 22nd, 2013
+
   - Remove rehash(). new() normalizes property names automatically.

 0.48 (RC-1.00) Apr 20th, 2013
  • Loading branch information
Ryo Anazawa committed Apr 22, 2013
1 parent 19b0861 commit 2d04d5e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Revision history for Perl extension CGI::Header.

0.49 (RC-1.00) Apr 22nd, 2013

- Remove rehash(). new() normalizes property names automatically.

0.48 (RC-1.00) Apr 20th, 2013
Expand Down
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ SYNOPSIS
$header->as_string; # => "Content-Type: text/html\n..."

VERSION
This document refers to CGI::Header version 0.48.
This document refers to CGI::Header version 0.49.

DEPENDENCIES
This module is compatible with CGI.pm 3.51 or higher.
Expand Down Expand Up @@ -231,7 +231,7 @@ DESCRIPTION

NORMALIZING PROPERTY NAMES
This class normalizes property names automatically. Normalized property
names are
names are:

1. lowercased
'Content-Length' -> 'content-length'
Expand Down
16 changes: 7 additions & 9 deletions lib/CGI/Header.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use strict;
use warnings;
use Carp qw/croak/;

our $VERSION = '0.48';
our $VERSION = '0.49';

my %Property_Alias = (
'content-type' => 'type',
Expand All @@ -24,17 +24,17 @@ sub _normalize {

sub new {
my $class = shift;
my $self = bless { header => {}, @_ }, $class;
my $header = $self->{header};
my %args = ( header => {}, @_ );
my $header = $args{header};

for my $key ( keys %{$header} ) {
my $prop = $self->_normalize( $key );
my $prop = $class->_normalize( $key );
next if $key eq $prop; # $key is normalized
croak "Property '$prop' already exists" if exists $header->{$prop};
$header->{$prop} = delete $header->{$key}; # rename $key to $prop
}

$self;
bless \%args, $class;
}

sub header {
Expand Down Expand Up @@ -155,7 +155,7 @@ CGI::Header - Handle CGI.pm-compatible HTTP header properties
=head1 VERSION
This document refers to CGI::Header version 0.48.
This document refers to CGI::Header version 0.49.
=head1 DEPENDENCIES
Expand Down Expand Up @@ -237,8 +237,6 @@ CGI response headers. See C<CGI::Header#as_string>.
=over 4
=item $value = $header->get( $field )
=item $value = $header->set( $field => $value )
Expand Down Expand Up @@ -416,7 +414,7 @@ content.
=head2 NORMALIZING PROPERTY NAMES
This class normalizes property names automatically.
Normalized property names are
Normalized property names are:
=over 4
Expand Down

0 comments on commit 2d04d5e

Please sign in to comment.