From: Tomas Doran Date: Thu, 8 Mar 2012 16:27:11 +0000 (+0000) Subject: Version 0.33 X-Git-Tag: v0.32^2~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Session.git;a=commitdiff_plain;h=ad3142b4540d33412549c21314d09257af37f650 Version 0.33 --- diff --git a/Changes b/Changes index a84b9e0..c946f3a 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for Perl extension Catalyst::Plugin::Session +0.33 2012-03-08 + - Note that flash is deprecated / not recommended due to it's + inherent races. Point out Catalyst::Plugin::StatusMessage instead + 0.32 2011-06-08 - Fix handling with enables verify_address and add related test diff --git a/lib/Catalyst/Plugin/Session.pm b/lib/Catalyst/Plugin/Session.pm index f7aed87..a84c2ac 100644 --- a/lib/Catalyst/Plugin/Session.pm +++ b/lib/Catalyst/Plugin/Session.pm @@ -13,7 +13,7 @@ use Carp; use namespace::clean -except => 'meta'; -our $VERSION = '0.32'; +our $VERSION = '0.33'; $VERSION = eval $VERSION; my @session_data_accessors; # used in delete_session @@ -727,6 +727,15 @@ $c->flash (thus allowing multiple redirections), and the policy is to delete all the keys which haven't changed since the flash data was loaded at the end of every request. +Note that use of the flash is an easy way to get data across requests, but +it's also strongly disrecommended, due it it being inherently plagued with +race conditions. This means that it's unlikely to work well if your +users have multiple tabs open at once, or if your site does a lot of AJAX +requests. + +L is the recommended alternative solution, +as this doesn't suffer from these issues. + sub moose : Local { my ( $self, $c ) = @_;