From: Tomas Doran Date: Fri, 9 Jan 2009 01:55:55 +0000 (+0000) Subject: Merge flash in session and finalize before sending response patches X-Git-Tag: v0.19_01~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Session.git;a=commitdiff_plain;h=2842d93853af927a543214ccbe17d659f5ecd181 Merge flash in session and finalize before sending response patches --- 2842d93853af927a543214ccbe17d659f5ecd181 diff --cc Changes index 9b62b98,8f2f749,9b62b98..d23ead0 --- a/Changes +++ b/Changes @@@@ -1,7 -1,10 -1,7 +1,14 @@@@ Revision history for Perl extension Catalyst::Plugin::Session ---0.20 XXX +++0.19_01 2009-01-09 +++ - Use shipit to package the dist - Switch to Module::install + + - Flash data is now stored inside the session (key "__flash") to avoid + + duplicate entry errors caused by simultaneous select/insert/delete of - flash rows when using DBI as a Store. +++ flash rows when using DBI as a Store. (Sergio Salvi) +++ - Fix session finalization order that caused HTTP responses to be sent +++ before the session is actually finalized and stored in its Store. +++ (Sergio Salvi) 0.19 2007-10-08 diff --cc Makefile.PL index a8dfe6f,a8dfe6f,a8dfe6f..073ce16 --- a/Makefile.PL +++ b/Makefile.PL @@@@ -16,6 -16,6 -16,6 +16,7 @@@@ requires 'Digest' requires 'File::Spec'; requires 'File::Temp'; requires 'Object::Signature'; +++requires 'MRO::Compat'; # an indirect dep. needs a certain version. requires 'Tie::RefHash' => '1.34'; diff --cc lib/Catalyst/Plugin/Session.pm index 1e9dd99,8b66e78,ee8ea37..e9c2a13 --- a/lib/Catalyst/Plugin/Session.pm +++ b/lib/Catalyst/Plugin/Session.pm @@@@ -13,7 -13,7 -13,7 +13,7 @@@@ use overload () use Object::Signature (); use Carp; ---our $VERSION = '0.20'; +++our $VERSION = '0.19_01'; my @session_data_accessors; # used in delete_session BEGIN { @@@@ -1002,10 -1010,10 -1004,10 +1012,14 @@@@ Andy Grundma Christian Hansen ---Yuval Kogman, C (current maintainer) +++Yuval Kogman, C Sebastian Riedel +++Tomas Doran (t0m) C (current maintainer) +++ +++Sergio Salvi +++ And countless other contributers from #catalyst. Thanks guys! =head1 COPYRIGHT & LICENSE diff --cc t/03_flash.t index 0ed2242,4000422,5873d98..f58222c --- a/t/03_flash.t +++ b/t/03_flash.t @@@@ -37,7 -43,9 -37,7 +43,9 @@@@ $c->flash(bar => "gorch") is_deeply( $c->flash, { foo => "moose", bar => "gorch" }, "two keys in flash" ); - $c->finalize; + +cmp_deeply( $c->session, { __updated => re('^\d+$'), __flash => $c->flash }, "session still has __flash with flash data" ); + + - $c->finalize; ++ $c->finalize_body; is_deeply( $c->flash, { bar => "gorch" }, "one key in flash" );