Re: [Catalyst] Catalyst::ScriptRole and excludes

2010-08-30 Thread Bill Moseley
On Sun, Aug 29, 2010 at 9:20 PM, Darren Duncan dar...@darrenduncan.netwrote:

 Bill Moseley wrote:

 In case hasn't been noticed, newer Moose will complain about the renamed
 -excludes option.


 That was true with Moose 1.10, and then Moose 1.12 turns off that warning
 so that other code has time to be updated. -- Darren Duncan


Ah, that's what I get for using such an old version.  ;)

Do you know why the renaming was done?


-- 
Bill Moseley
mose...@hank.org
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Confused: how to handle system-level errors with fallback pages

2010-08-30 Thread Stuart Watt

 I have a timing/configuration issue, and any pointers would be welcome.

The problem: how to handle configuration/system errors by fallback to an 
error page.


* I am using Catalyst authentication, but sometimes the database used 
for session storage cannot be connected. Under these circumstances, I 
want an error page which can be used to display an error suitable for a 
system administrator
* The application starts fine, because it does not attempt to connect 
initially
* When a request starts, the session system fails during the prepare 
stage - calling stuff in Catalyst::Plugin::Session::Store::Delegate, and 
usually get_session_data
* The application never gets to finalize, so nothing is ever sent to the 
engine - this is the logic in handle_request


Where and how is it best to handle this?

I could do some of this before the first request, and I considered 
hacking which controllers were active since I can do that during the 
setup stage, but this is probably too late, since by then all the 
plugins are set up, and this is where the session management is set.


Alternatively, I could do some work during the request cycle, but it is 
not obvious where in the cycle you got to, which makes it hard to decide 
whether you can generate an error.


I could just be missing some documentation: maybe this is covered but I 
haven't been able to find it.


--S
--
Stuart Watt
ARM Product Developer
Information Balance
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/