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