Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 98 lines (78 sloc) 3.402 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
Revision history for Perl extension CGI::Header.

0.13 Jan 8th, 2012

  - clear() and each() return the current object itself
  - set() returns the given value:
      $header->set( 'Foo' => 'bar' ); # => "bar"

  [BUG FIXES]

    Correct the following warning message:
      "Can't set '-content_type' to neither undef nor an empty string"
    This message was replaced with:
      "Can set '-content_type' to neither undef nor an empty string"

  [DOCUMENTATION]

    Add "Server" and "Date" to "LIMITATIONS"

0.12 Jan 7th, 2012

  [INTERNALS]
    - Rename _normalize() to _lc()
    - Add a benchmark against HTTP::Response->parse

  [DOCUMENTATION]
    - Add HTTP::Headers to "SEE ALSO"

0.11 Dec 16th, 2012
  - Add FIRSTKEY() and NEXTKEY(). These methods were implemented to
    test this module itself.
  - flatten() receives optional $is_recursive argument
    which determines whether to flatten the Set-Cookie headers recursively.
    $is_recursive defaults to true.
  - flatten() and each() don't stringify CGI::Cookie objects.
  - field_names() returns a list of field names in a random order

0.10 Dec 14th, 2012
  - p3p_tags() returns the number of P3P tags
    instead of the first element in scalar context
  - rehash() returns the current object itself:
      my @headers = CGI::Header->new(@args)->rehash->flatten;
  - each() doesn't depend on field_names().
    field_names() depends on each().
    As a result, if Set-Cookie header is multi-valued,
    field_names() will return a list which contains duplicate values.
    I don't know how to solve this problem at this time.

0.09 Nov 13th, 2012
  - CGI.pm has charset() attribute which defaults to 'ISO-8859-1'.
    CGI::header() function depends on this attribute.
    I noticed this module depends on the default value, 'ISO-8859-1',
    and so decided to remove this dependency because this module
    shouldn't depend on the internal state of CGI.pm.
    Namely,
        my $h = CGI::Header->new( -type => 'text/plain' );
        $h->get( 'Content-Type' ); # => "text/plain; charset=ISO-8859-1"
    become
        $h->get( 'Content-Type' ); # => "text/plain"

0.08 Nov 13th, 2012
  - reimplemented rehash()
  - [DOCUMENTATION] add header() to "INSTANCE METHODS"
  - [DOCUMENTATION] describe how this module normalizes parameter names

0.07 Nov 12th, 2012
  - [DOCUMENTATION] add "tie() INTERFACE"

0.06 Nov 11th, 2012
  - First release

0.05 Nov 10th, 2012
  - add rehash() method which rebuilds header hash references

0.04 Nov 7th, 2012
  - reorganized tests using subtest() function exported by Test::More
  - doesn't overload '""' (stringify) with as_string()
    because this module isn't the replacement of CGI::header() function.
    I think CGI::header() should be used to stringify
    header hash references in most cases.
  - each() doesn't stringify values (cf. HTTP::Headers->scan),
    and so the callback function will receive raw CGI::Cookie objects.
  - On the other hand, flatten() forces stringification.
    flatten() may be called to generate PSGI-compatible header array
    references.

0.03 Oct 7th, 2012
  - add a benchmark against HTTP::Parser::XS
  - update POD
  - add t/server.t
  - tests require CGI.pm 3.51 because the distribution contains t/headers.t

0.02 Oct 4th, 2012
  - tests require CGI.pm 3.60 and HTTP::Date
  - fix typo

0.01 Sep 23rd, 2012
  - Forked from Blosxom::Header
Something went wrong with that request. Please try again.