Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryo Anazawa committed Oct 3, 2012
1 parent da2d4e8 commit 613a319
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 30 deletions.
9 changes: 4 additions & 5 deletions lib/CGI/Header.pm
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ CGI::Header - Adapter for CGI::header()
my $h = CGI::Header->new( $header ); my $h = CGI::Header->new( $header );
# update $header # update $header
$h->set( Content-Length' => 3002 ); $h->set( 'Content-Length' => 3002 );
$h->delete( 'Content-Disposition' ); $h->delete( 'Content-Disposition' );
$h->clear; $h->clear;
Expand Down Expand Up @@ -493,8 +493,7 @@ Returns a Boolean value telling whether the specified field exists.
Deletes the specified field form CGI response headers. Deletes the specified field form CGI response headers.
Returns the value of the deleted field. Returns the value of the deleted field.
$header->delete( 'Content-Disposition' ); my $value = $header->delete( 'Content-Disposition' ); # => 'inline'
my $value = $header->delete( 'Content-Disposition' ); # inline
=item @fields = $header->field_names =item @fields = $header->field_names
Expand All @@ -512,7 +511,7 @@ Any return values of the callback routine are ignored.
my @lines; my @lines;
$self->each(sub { $header->each(sub {
my ( $field, $value ) = @_; my ( $field, $value ) = @_;
push @lines, "$field: $value"; push @lines, "$field: $value";
}); });
Expand Down Expand Up @@ -566,7 +565,7 @@ The following:
is identical to: is identical to:
my $CRLF = $CGI::CRLF; my $CRLF = $CGI::CRLF;
print $header->as_string( $CRLF ) . $CRLF; print $header->as_string( $CRLF ), $CRLF;
=item $header->attachment( $filename ) =item $header->attachment( $filename )
Expand Down
27 changes: 2 additions & 25 deletions t/11_basic.t
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ subtest 'flatten()' => sub {


my @expected = ( my @expected = (
'Status', '304 Not Modified', 'Status', '304 Not Modified',
'Set-Cookie', $cookie1, 'Set-Cookie', "$cookie1",
'Set-Cookie', $cookie2, 'Set-Cookie', "$cookie2",
'Date', expires(0, 'http'), 'Date', expires(0, 'http'),
'Content-length', '12345', 'Content-length', '12345',
'Content-Type', 'text/html; charset=ISO-8859-1', 'Content-Type', 'text/html; charset=ISO-8859-1',
Expand All @@ -126,29 +126,6 @@ subtest 'flatten()' => sub {
is_deeply \@got, \@expected; is_deeply \@got, \@expected;
}; };


subtest 'status()' => sub {
plan skip_all => 'obsolete';

%header = ();
is $header->status, 200;

$header->status( 304 );
is $header{-status}, '304 Not Modified';
is $header->status, '304';

my $expected = q{Unknown status code '999' passed to status()};
warning_is { $header->status( 999 ) } $expected;
};

subtest 'target()' => sub {
plan skip_all => 'obsolete';
%header = ();
is $header->target, undef;
$header->target( 'ResultsWindow' );
is $header->target, 'ResultsWindow';
is_deeply \%header, { -target => 'ResultsWindow' };
};

subtest 'clone()' => sub { subtest 'clone()' => sub {
my $orig = $class->new( -foo => 'bar' ); my $orig = $class->new( -foo => 'bar' );
my $clone = $orig->clone; my $clone = $orig->clone;
Expand Down

0 comments on commit 613a319

Please sign in to comment.