Re: [Catalyst] Creating a thin Model

2007-05-21 Thread Jamie Neil
Christopher H. Laco wrote: Personally, I almost always do: sub COMPONENT { my $self = NEXT::new diddle config...return $self } Sorry...that pseudo code was too vague: sub COMPONENT { my $self = shift-NEW::new(@_); $self-{'noncatclass'} = NonCatClass-new return $self } Then,

Re: [Catalyst] Creating a thin Model

2007-05-21 Thread Matt S Trout
On Mon, May 21, 2007 at 11:06:44AM +0100, Jamie Neil wrote: Christopher H. Laco wrote: Personally, I almost always do: sub COMPONENT { my $self = NEXT::new diddle config...return $self } Sorry...that pseudo code was too vague: sub COMPONENT { my $self =

Re: [Catalyst] Creating a thin Model

2007-05-21 Thread Jamie Neil
Matt S Trout wrote: use base qw/ Catalyst::Model /; sub new { my $self = shift-next::method(@_); my $class = ref($self); my ( $c, $args ) = @_; $self-{'.mymodel'} = ExternalModule-new( Catalyst::Utils::merge_hashes( $args, $self-config ) ); return $self; } sub

Re: [Catalyst] Creating a thin Model

2007-05-21 Thread Matt S Trout
On Mon, May 21, 2007 at 12:31:22PM +0100, Jamie Neil wrote: http://search.cpan.org/search?query=catalyst%3A%3Amodel+accept_context brings up most of them, but there are a few more like Net::Amazon. Looks like they were all cargo-culted from J Shirley's YouTube model. o I shall be explaining

Re: [Catalyst] Session unexpectedly expiring

2007-05-21 Thread Jeff Chimene
Jeff Chimene wrote: Hi, I'm trying to figure out why my sessions are expiring in script/xxx_cgi.pl but not script/xxx_server.pl The desired cycle is to login then redirect to another controller. When I run the standalone server, the session state is recovered, and control resumes with the

Re: [Catalyst] Session unexpectedly expiring

2007-05-21 Thread Wade . Stuart
Jeff Chimene [EMAIL PROTECTED] wrote on 05/20/2007 10:13:33 PM: Thomas L. Shinnick wrote: At 08:20 PM 5/20/2007, Jeff Chimene wrote: Hi, I'm trying to figure out why my sessions are expiring in script/xxx_cgi.pl but not script/xxx_server.pl [snip] I'm using the Session,

Re: [Catalyst] Re: Form validation in insert() and update()?

2007-05-21 Thread Dave Rolsky
On Mon, 21 May 2007, A. Pagaltzis wrote: So if the blank form is `/order/form`, you’d stash the form data away somewhere under ID `7z32a` (f.ex) and redirect them to `/order/form/7z32a` (or `/order/form?populate=7z32a`). The data could be in the session, as long as it’s keyed off of an ID that

Re: [Catalyst] Re: Announcing the first Catalyst SwagReward!

2007-05-21 Thread Jonathan T. Rockway
On Sun, May 20, 2007 at 06:14:35PM +0200, A. Pagaltzis wrote: * Mike Whitaker [EMAIL PROTECTED] [2007-05-20 16:50]: If all goes well it will probably be fully programmatic but will almost certainly involve Python. Ooo. Dunno about that. :) Can't help feeling that it's not really

Re: [Catalyst] Session unexpectedly expiring

2007-05-21 Thread James R. Leu
Not really related to your issue specifically, but I have seen issues with using Session::Store::FastMmap and perl ithreads resulting in unrelated sessions appearing to terminate when a thread 'joins' back to the parent. I think is has something to do with ithreads interaction with shared memory.

Re: [Catalyst] Session unexpectedly expiring

2007-05-21 Thread Jeff Chimene
[EMAIL PROTECTED] wrote: Jeff Chimene [EMAIL PROTECTED] wrote on 05/20/2007 10:13:33 PM: Thomas L. Shinnick wrote: At 08:20 PM 5/20/2007, Jeff Chimene wrote: Hi, I'm trying to figure out why my sessions are expiring in script/xxx_cgi.pl but not script/xxx_server.pl

Re: [Catalyst] Session unexpectedly expiring

2007-05-21 Thread Jeff Chimene
James R. Leu wrote: Not really related to your issue specifically, but I have seen issues with using Session::Store::FastMmap and perl ithreads resulting in unrelated sessions appearing to terminate when a thread 'joins' back to the parent. I think is has something to do with ithreads

[Catalyst] Setting time zone and locale on dates.

2007-05-21 Thread Bill Moseley
This likely falls into one of the many how do I get $c into the model threads. My session has the locale and timezone fetched from the user's preferences at login. It's not really locale, but a language tag which is also used by Locale::Maketext, but should work for DateTime's locale setting. I

Re: [Catalyst] Re: Redispatching actions

2007-05-21 Thread Bernhard Graf
Matt S Trout wrote: On Sun, May 20, 2007 at 08:55:47PM +0200, Bernhard Graf wrote: No need for redirects and all the problems they impose. I described the problems with -not- redirecting and yet you assert their being bad without justification. See my other response. You can stay with

Re: [Catalyst] Re: Redispatching actions

2007-05-21 Thread Bernhard Graf
Roland Lammel wrote: But then again this code has to be added to every method, that is processing form input. In case it's not there... the nightmare of reposting is back in town. What are you trying to demonstrate? If more code isn't there, even more nightmares are in town - or what? I

Re: [Catalyst] Re: Redispatching actions

2007-05-21 Thread Bernhard Graf
A. Pagaltzis wrote: * Bernhard Graf [EMAIL PROTECTED] [2007-05-20 21:05]: A. Pagaltzis wrote: That, plus the re-submit when the user hits the Back button. ... unless ($c-validate_token) { # Catalyst::Plugin::RequestToken $c-stash(message = 'Deja vu!'); # optional verbosity

Re: [Catalyst] Setting time zone and locale on dates.

2007-05-21 Thread Chisel Wright
On Mon, May 21, 2007 at 01:54:54PM -0700, Bill Moseley wrote: What do you do? I inflate all my dates to DateTime objects: foreach my $datecol (qw/created/) { __PACKAGE__-inflate_column($datecol, { inflate = sub { DateTime::Format::Pg-parse_datetime(shift); }, deflate = sub {

Re: [Catalyst] Re: Persistent login

2007-05-21 Thread Kieren Diment
On 17/05/07, Michael Reece [EMAIL PROTECTED] wrote: there's no especially sane way to extend the session cookie on a per- user basis that i have found. here is a hack that i am experimenting with: if ($c-login($username, $password)) { $c-session-{remember_me} =

Re: [Catalyst] Setting time zone and locale on dates.

2007-05-21 Thread Matt S Trout
On Mon, May 21, 2007 at 10:58:34PM +0100, Chisel Wright wrote: On Mon, May 21, 2007 at 01:54:54PM -0700, Bill Moseley wrote: What do you do? I inflate all my dates to DateTime objects: foreach my $datecol (qw/created/) { __PACKAGE__-inflate_column($datecol, { inflate = sub {

[Catalyst] Catalyst with apache, how to auto restart like run myapp_server.pl -r?

2007-05-21 Thread Cookie
I configurate my apache httpd.conf like this: LoadModule perl_module modules/mod_perl.so PerlSwitches -I/var/www/html/lj/catalyst/lib PerlModule Add Location /catalyst SetHandler modperl PerlResponseHandler Add /Location And I can visit my site using:

Re: [Catalyst] Catalyst with apache, how to auto restart like run myapp_server.pl -r?

2007-05-21 Thread Peter Karman
Cookie scribbled on 5/21/07 8:21 PM: Is there any way to configurate my apache configuration files to be available that I don't need to restart my apache server?(Like I run myapp_server.pl -r) no. all the -r option does for the dev server is automatically poll for file changes and

[Catalyst] Re: Redispatching actions

2007-05-21 Thread A. Pagaltzis
* Bernhard Graf [EMAIL PROTECTED] [2007-05-21 23:40]: Roland Lammel wrote: I find it far more easy to actually perform a redirect at the end of an action, that is intentional for the user and the developer. I havn't come across any problems using redirects (not even on mobile devices), so

[Catalyst] Re: Redispatching actions

2007-05-21 Thread A. Pagaltzis
* Matt S Trout [EMAIL PROTECTED] [2007-05-22 03:00]: Engage in the technical debate or be removed from this list just as quickly as a $religion extremist who refused to justify -their- position would be. This is your final warning. Matt, I don’t know that he’s refusing to debate; his

Re: [Catalyst] Mapping urls inside catalyst

2007-05-21 Thread Dave Gray
Hi Robert, On 5/19/07, Robert 'phaylon' Sedlacek [EMAIL PROTECTED] wrote: Mark Zealey wrote: I thus want the following to be equivalent: mysite.com/foo/5/fred/list mysite.com/bar/myname/fred/list othersite.com/fred/list [snip] This is all untested of course. But you should get the chains

[Catalyst] Re: Form validation in insert() and update()?

2007-05-21 Thread A. Pagaltzis
* Dave Rolsky [EMAIL PROTECTED] [2007-05-21 18:30]: On Mon, 21 May 2007, A. Pagaltzis wrote: So if the blank form is `/order/form`, you’d stash the form data away somewhere under ID `7z32a` (f.ex) and redirect them to `/order/form/7z32a` (or `/order/form?populate=7z32a`). The data could be in

Re: [Catalyst] Catalyst with apache, how to auto restart like run myapp_server.pl -r?

2007-05-21 Thread Perrin Harkins
On 5/21/07, Cookie [EMAIL PROTECTED] wrote: But I don't think when I modify my lib files,the modification seems not any effect.And I must restart my apache to make it available. My question is: Is there any way to configurate my apache configuration files to be available that I don't need to

[Catalyst] ActiveRecord for Perl

2007-05-21 Thread mla
I'm considering trying to port Ruby's ActiveRecord to Perl as a lightweight ORM option (with some small changes maybe, like composite PKs). If anyone's interested, toss me a message privately and we'll coordinate. Maurice ___ List: