[Catalyst] How to change base class for autogenerated Schema/* files?

2010-01-18 Thread Alex Povolotsky
Hello! I'm using Catalyst::Model::DBIC::Schema::Loader and autogenerate Schema/*.pm files. I'd like to add some common functionality to some of them, and I'd greatly prefer adding it in one place to copypasting code. How to I change base class for them? Of course that class should inherit

[Catalyst] Login as another user ...

2010-01-18 Thread Kiffin Gish
As system administrator who has root access to everything, I want to be able to login as another user from my dashboard page. What's the best way to achieve this? I tried $c-authenticate without a password, but this doesn't seem to work. -- Kiffin Gish kiffin.g...@planet.nl Gouda, The

[Catalyst] Re: modules for conditional GET ?

2010-01-18 Thread Aristotle Pagaltzis
* Dami Laurent (PJ) laurent.d...@justice.ge.ch [2010-01-18 08:35]: So clients should keep asking for those pages at each request, and depending on the If-Modified-Since header and on the timestamp for the config file, the server can decide if it's worth recomputing the page for that client, or

Re: [Catalyst] Login as another user ...

2010-01-18 Thread David Schmidt
On Mon, Jan 18, 2010 at 11:34 AM, Kiffin Gish kiffin.g...@planet.nl wrote: As system administrator who has root access to everything, I want to be able to login as another user from my dashboard page. What's the best way to achieve this? I tried $c-authenticate without a password, but this

RE: [Catalyst] Login as another user ...

2010-01-18 Thread Dami Laurent (PJ)
-Message d'origine- De : Kiffin Gish [mailto:kiffin.g...@planet.nl] Envoyé : lundi, 18. janvier 2010 11:34 À : The elegant MVC web framework Objet : [Catalyst] Login as another user ... As system administrator who has root access to everything, I want to be able to login as another

RE: [Catalyst] Login as another user ...

2010-01-18 Thread Kiffin Gish
Doesn't $c-logout() already do that for you? On Mon, 2010-01-18 at 12:08 +0100, Dami Laurent (PJ) wrote: -Message d'origine- De : Kiffin Gish [mailto:kiffin.g...@planet.nl] Envoyé : lundi, 18. janvier 2010 11:34 À : The elegant MVC web framework Objet : [Catalyst] Login as another

Re: [Catalyst] Re: modules for conditional GET ?

2010-01-18 Thread Bill Moseley
On Sun, Jan 17, 2010 at 11:35 PM, Dami Laurent (PJ) laurent.d...@justice.ge.ch wrote: Indeed, this is exactly what I want to do. The app has a config file (not a Catalyst config file, but another file having to do with business logic), and some super-users have a mechanism for hot

Re: [Catalyst] Error handling

2010-01-18 Thread Tomas Doran
Steve Kleiman wrote: Found a post on this mailing list suggesting: sub finalize_error { my ($c) = @_; # Note, not ($self, $c) if ( @{$c-errors} ) { $c-stash-template('error.tt'); # You might also need to forward to the view here yourself return; } $c-NEXT::finalize_error();

Re: [Catalyst] Enabling debug mode with fastcgi..

2010-01-18 Thread Adam Mackler
Hi Toby: The output might be going to your web server log. Try starting your fastcgi script with a -e option (with CATALYST_DEBUG set as well). Adam On Mon, Jan 18, 2010 at 05:03:23PM +1100, Toby Corkindale wrote: Hi guys, If you're running a Catalyst app with the fastcgi script (as found in

Re: [Catalyst] How to change base class for autogenerated Schema/* files?

2010-01-18 Thread Adam Mackler
Hi Alex: I'm not sure about DBIC, but Rose::DBx::Garden, which creates its own database objects in like manner to the DBIC Loader, has a feature to insert code into the generated base class: http://search.cpan.org/~karman/Rose-DBx-Garden-0.15/lib/Rose/DBx/Garden.pm#init_base_code I guess that

Re: [Catalyst] Enabling debug mode with fastcgi..

2010-01-18 Thread David Schmidt
I am pretty sure debug output went to apache's error log when I last checked. On Mon, Jan 18, 2010 at 8:54 PM, Adam Mackler nab...@mackler.org wrote: Hi Toby: The output might be going to your web server log.  Try starting your fastcgi script with a -e option (with CATALYST_DEBUG set as

Re: [Catalyst] Subclass $c-log-debug(...) to prepend ${\$c-action}: ...

2010-01-18 Thread Jason Galea
not as simple as I thought. I'd be interested to know if there's an easier way.. package MyApp; use MyApp::Catalyst::Log; __PACKAGE__-setup; __PACKAGE__-log( MyApp::Catalyst::Log-new ); around 'log' = sub{ my $orig = shift; my $self = shift; return $self-$orig if @_; my $log =

Re: [Catalyst] Enabling debug mode with fastcgi..

2010-01-18 Thread Toby Corkindale
On 19/01/10 06:54, Adam Mackler wrote: Hi Toby: The output might be going to your web server log. Try starting your fastcgi script with a -e option (with CATALYST_DEBUG set as well). Looking at the previous posts that Wallace directed me to, it sounds like the debug options with fastcgi

Re: [Catalyst] Error handling

2010-01-18 Thread Steve Kleiman
Thanks for getting back, t0m. By abort all processing it seemed like when the error was thrown, Catalyst stopped processing the request. Here's my fabricated error in a controller: sub test_error : Local { my ( $self, $c ) = @_; Log::Log4perl-get_logger('General')-info('before

Re: [Catalyst] Error handling

2010-01-18 Thread J. Shirley
On Mon, Jan 18, 2010 at 5:44 PM, Steve Kleiman st...@prodhub.com wrote: Thanks for getting back, t0m. By abort all processing it seemed like when the error was thrown, Catalyst stopped processing the request. Here's my fabricated error in a controller: sub test_error : Local {       my (

Re: [Catalyst] Subclass $c-log-debug(...) to prepend ${\$c-action}: ...

2010-01-18 Thread J. Shirley
On Mon, Jan 18, 2010 at 12:22 PM, Kiffin Gish kiffin.g...@planet.nl wrote: I'd like to subclass $c-log-debug(message) so that it prints out: ''.$c-action.': '.'message' What's the easiest way to do this? Easiest is to just switch to Catalyst::Log::Log4perl, since it will do what you want