Skip Menu |

This queue is for tickets about the Catalyst-Manual CPAN distribution.

Report information
The Basics
Id: 68203
Status: resolved
Priority: 0/
Queue: Catalyst-Manual

People
Owner: Nobody in particular
Requestors: SHABBLE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 5.700401
Fixed in: (no value)



Subject: bug in sample code in Manual 05 re: flash_to_sstash
In the following section: http://search.cpan.org/dist/Catalyst-Manual/lib/Catalyst/Manual/Tutorial/05_Authentication.pod#Switch_To_Flash-To-Stash The code example suggests something like: __PACKAGE__->config( name => 'MyApp', # Disable deprecated behavior needed by old applications disable_component_resolution_regex_fallback => 1, session => { flash_to_stash => 1 }, ); to import the flash variables into the stash for the subsequent request. This does not appear to work for me, and some debugging tracked it down to the 'session' key being deprecated in favour of 'Plugin::Session'. Hence, the correct code should be along the lines of: __PACKAGE_->config( ... , 'Plugin::Session' => { flash_to_stash => 1 }, ... ); The offending code is in Catalyst::Plugin::Session, function: sub _session_plugin_config, around line 39. Either the plugin should be updated to correctly handle both keys, or the manual should be changed to use the Plugin:: form. Thanks, --S
On Sat May 14 14:24:31 2011, SHABBLE wrote: attached patch for probable fix.
Subject: flash_to_stash_fix.diff
From 8f8344a22295c187cec47ed7af0cdbc4f6a7a22d Mon Sep 17 00:00:00 2001 From: Tom Feist <shabble@metavore.org> Date: Sat, 14 May 2011 19:33:30 +0100 Subject: [PATCH] fix session -> Plugin::Session docu error in the manual for flash_to_stash, fixes RT #68203 --- lib/Catalyst/Manual/Tutorial/05_Authentication.pod | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Catalyst/Manual/Tutorial/05_Authentication.pod b/lib/Catalyst/Manual/Tutorial/05_Authentication.pod index 304a128..bc19221 100644 --- a/lib/Catalyst/Manual/Tutorial/05_Authentication.pod +++ b/lib/Catalyst/Manual/Tutorial/05_Authentication.pod @@ -846,14 +846,14 @@ C<__PACKAGE__-E<gt>config> setting to something like: name => 'MyApp', # Disable deprecated behavior needed by old applications disable_component_resolution_regex_fallback => 1, - session => { flash_to_stash => 1 }, + 'Plugin::Session' => { flash_to_stash => 1 }, ); B<or> add the following to C<myapp.conf>: - <session> + <Plugin::Session> flash_to_stash 1 - </session> + </Plugin::Session> The C<__PACKAGE__-E<gt>config> option is probably preferable here since it's not something you will want to change at runtime without it -- 1.7.4.4
This is now fixed in master and will be part of the next release.
Closing out since fixed