Permalink
Commits on Jan 25, 2011
  1. Bump version to 3.52.

    markstos committed Jan 25, 2011
  2. Fix logic problem in test that caused it to pass for the fix was appl…

    markstos committed Jan 25, 2011
    …ied.
    
        RT#64261, thanks to Niko Tyni
  3. Fix warnings in t/cookie.t

    markstos committed Jan 25, 2011
Commits on Jan 24, 2011
  1. Add missing t/tmpdir.t file.

    markstos committed Jan 24, 2011
Commits on Jan 5, 2011
  1. Version bump in lib/CGI.pm

    markstos committed Jan 5, 2011
Commits on Jan 2, 2011
  1. This commit fixes a bug earlier in this development cycle,

    markstos committed Jan 2, 2011
      That commit was "196ab302c0db40647a438b01f0e8027ab8efc21d"
    
      The commit removed "use CGI" from CGI::Cookie, to decouple
      the modules. However, it turns out that bake() requires
      CGI.pm, but there were no tests for that. This patch
      "requires" CGI.pm on demand when bake() is called.
    
      A reality-check test for bake() was also added, which insures
      that CGI.pm is loaded when it is called.
  2. Clean-up code style of return value

    markstos committed Jan 2, 2011
        The meaning is the same. The code style is taken from CGI::Simple::Cookie.
  3. Fix bug with whitespace trimming of cookie elements

    markstos committed Jan 2, 2011
        The whitespace behavior is now identical to CGI::Simple::Cookie, and
        has an automated test.
  4. minor grammar clean-ups.

    markstos committed Jan 2, 2011
  5. Reverse the previous change to the return value for parse(),

    markstos committed Jan 2, 2011
        and test and document the prior behavior when the return value
        is missing. The new short-circuit logic is cleaner but equivalent,
        and avoids emitting an "unitialized string" warning.
    
        Thanks to Yanick for suggesting this direction.
  6. If parse() is given no input, bail out early.

    markstos committed Jan 2, 2011
        This behavior mimics CGI::Simple, and catches potential garbage-in/
        garbage-out program.
  7. Refactor: use formatting from CGI::Simple

    markstos committed Jan 2, 2011
    The goal is to reduce the "diff" of code between CGI.pm and
    CGI::Simple, so some non-meaningful code-style differences
    are being eliminated.
    
    This makes it easier to confirm when the two modules are actually
    different.
Commits on Dec 27, 2010
  1. Adopt the code for raw_fetch from CGI::Simple::Cookie

    markstos committed Dec 27, 2010
    It is simpler, easier to read, but does the same thing.
    I think the test suite has sufficient coverage to show that
    this introduces no regressions.
  2. Add new passing cookie test for names without values

    markstos committed Dec 27, 2010
    These are supported in the spec.
    The same test is being added to the CGI::Simple test suite as well.
    The sample cookie value comes from the Mojo test suite
    (which also supports value-less names).
Commits on Dec 26, 2010
  1. Quit loading CGI.pm if you just want to use CGI::Cookie

    markstos committed Dec 26, 2010
    - All tests in t/cookie.t pass with the change
    - CGI::Simple::Cookie doesn't need to use CGI::Simple
  2. Refactor: re-use more code from CGI::Simple::Cookie->new()

    markstos committed Dec 26, 2010
    Oddly, we were repeating a lot of the logic of value() in our previous version of the code.
  3. BugFix: CGI::Cookie->new() now follows the documentation and returns …

    markstos committed Dec 26, 2010
    …undef
    
    if the -name and -value args aren't provided.
    
    This new behavior is also consistent with the docs and code of CGI::Simple::Cookie.
  4. minor grammar clean-up

    markstos committed Dec 26, 2010
  5. Port over arg-unpacking clean-up from CGI::Simple::Cookie

    markstos committed Dec 26, 2010
    Several two-line 'shift' unpacks were simplified to one-line.
  6. Refactor: port cleaned-up as_string implementation from CGI::Simple::…

    markstos committed Dec 26, 2010
    …Cookie
    
    From a careful review, the implementations are identical
    
    One small change relates to this ugly line which was cleaned up:
    
      my($cookie) = join("=",(defined $key ? $key : ''),join("&",map escape(defined $_ ? $_ : ''),$self->value));
    
    We were doing a couple of ugly checks for definedness to satisfy "use
    warnings", which CGI::Simple never enabled. Now I just set "no warnings"
    for this block.
    
    Now it's a lot nicer:
    
        my $value = join "&", map { escape($_) } $self->value;
        my @cookie = ( "$name=$value" );
  7. Backport HttpOnly tests from CGI::Simple

    markstos committed Dec 26, 2010
    Our implementation was already compatible.