-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix parsed cookies cache inside $cgi->cookie(...) #252
Conversation
Looks good, but can you add some test coverage that confirms the bug before and the fix after? |
Done. This test relies that we use |
Looks fine to me. I'm a little hesitant on this change however. We have, effectively, a cache that was introduced a long time ago (predates the git repo at least, which started in 2009) but appears to have not been working since then. So if we now fix that cache to do what it was originally intended to do we might cause a problem to any code that has been calling This is not something I would hope is happening in people's production code, but I would be totally unsurprised to find out someone/thing is doing that, and this change may break their code. I would expect to see this more in test code. But anyway, yeah I'm not sure about this. It may be better to have this caching feature fix enabled by way of a flag, much like other features in the CGI.pm module? |
Yes, you are right, this is possible. Flags are |
That's correct, yep! |
Done |
Looks good 👍 - will get this out to CPAN sometime in the next week or so. Thanks for the patch! |
Thank you! P.S. Never thought I will fix CGI.pm which I never used :) This bug was found in legacy project using NYTProf top. |
v4.54 on its way to CPAN. Thanks again 👍 |
Benchmark:
Benchmark results:
Fixes #251