Permalink
Browse files

fix typo

  • Loading branch information...
Ryo Anazawa
Ryo Anazawa committed Oct 3, 2012
1 parent da2d4e8 commit 613a319ca5e1b81755c01211a7507efef7fc46ed
Showing with 6 additions and 30 deletions.
  1. +4 −5 lib/CGI/Header.pm
  2. +2 −25 t/11_basic.t
View
@@ -428,7 +428,7 @@ CGI::Header - Adapter for CGI::header()
my $h = CGI::Header->new( $header );
# update $header
- $h->set( Content-Length' => 3002 );
+ $h->set( 'Content-Length' => 3002 );
$h->delete( 'Content-Disposition' );
$h->clear;
@@ -493,8 +493,7 @@ Returns a Boolean value telling whether the specified field exists.
Deletes the specified field form CGI response headers.
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
@@ -512,7 +511,7 @@ Any return values of the callback routine are ignored.
my @lines;
- $self->each(sub {
+ $header->each(sub {
my ( $field, $value ) = @_;
push @lines, "$field: $value";
});
@@ -566,7 +565,7 @@ The following:
is identical to:
my $CRLF = $CGI::CRLF;
- print $header->as_string( $CRLF ) . $CRLF;
+ print $header->as_string( $CRLF ), $CRLF;
=item $header->attachment( $filename )
View
@@ -116,8 +116,8 @@ subtest 'flatten()' => sub {
my @expected = (
'Status', '304 Not Modified',
- 'Set-Cookie', $cookie1,
- 'Set-Cookie', $cookie2,
+ 'Set-Cookie', "$cookie1",
+ 'Set-Cookie', "$cookie2",
'Date', expires(0, 'http'),
'Content-length', '12345',
'Content-Type', 'text/html; charset=ISO-8859-1',
@@ -126,29 +126,6 @@ subtest 'flatten()' => sub {
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 {
my $orig = $class->new( -foo => 'bar' );
my $clone = $orig->clone;

0 comments on commit 613a319

Please sign in to comment.