Re: [cgiapp] Good practices: how many run modes in an app

2005-12-18 Thread Jeff MacDonald
Jesse, Af few weeks ago, I asked a question about a snazzy way to do a fill in form in one line return $self-fill_form($self-tt_process({}),$self-dbh-selectrow_hashref(SELECT * from menus WHERE id = ?,{},$id)); Since this uses dbh directly, in Krang to do something similar does that mean you

[cgiapp] CGI::Uploader - making it not generate thumbs, for non images.

2005-12-18 Thread Jeff MacDonald
I was thinking of doing something like this my $u = CGI::Uploader-new( spec = { file = { gen_files = { 'img_1_thmb_1' = { if_mimetype = '/^image\/.+/', transform_method = \gen_thumb, params = [ w = 100, h = 100 ],

[cgiapp] Number of rm's best practice (more)

2005-12-18 Thread RA Jones
Reading the thread on 'Good practices: how many run modes in an app' it is obvious my current application under development is going way over the 'recommended' upper limit of rm's. I know I need to break it into smaller units based around functionality, but how? At the moment my main

Re: [cgiapp] Number of rm's best practice (more)

2005-12-18 Thread Jeff MacDonald
I'm at about the same stage of figuring things out as you are, I'd recommend looking into C::A::P::Dispatch, it can basically parse your query string, to know which module handles which runmode, combine that with AutoRunmodes and you get a pretty cool setup. Jeff. On 12/18/05, RA Jones [EMAIL

Re: [cgiapp] Simple Implementation of Ajax.pm

2005-12-18 Thread Bruce McKenzie
Here is a simple implementation of a form created with CGI::Appication, Template-Toolkit, and CGI::Ajax that will process changed fields without submitting and re-drawing the form. Thanks to all for your help. Cheers, Bruce webapp pl ## #!/usr/bin/perl use WebApp; my

Re: [cgiapp] Number of rm's best practice (more)

2005-12-18 Thread Cees Hek
On 12/18/05, Rhesa Rozendaal [EMAIL PROTECTED] wrote: use base qw/MyApp::Base/; or our @ISA = qw/MyApp::Base/; is functionally equivalent. I personally prefer the former, since it reads better. Although they are very similar, there is a minor difference that can be important in some

[cgiapp] Re: CGI::Uploader - making it not generate thumbs, for non images.

2005-12-18 Thread Mark Stosberg
On 2005-12-18, Jeff MacDonald [EMAIL PROTECTED] wrote: 'img_1_thmb_1' = { if_mimetype = '/^image\/.+/', transform_method = \gen_thumb, params = [ w = 100, h = 100 ], } First, let's rewrite this in the new 2.0 syntax:

Re: [cgiapp] Number of rm's best practice (more)

2005-12-18 Thread bradford
I'm liking this thread. But I have some elementary questions: package My::MainApp; use base qw/My::BaseApp/; # I already have this one; it handles sessions etc use My::MainApp::Admin; # contains the run modes dealing with admin functions use My::MainApp::News; # another example package of

Re: [cgiapp] Number of rm's best practice (more)

2005-12-18 Thread Rhesa Rozendaal
[EMAIL PROTECTED] wrote: I'm liking this thread. But I have some elementary questions: package My::MainApp; use base qw/My::BaseApp/; # I already have this one; it handles sessions etc use My::MainApp::Admin; # contains the run modes dealing with admin functions use My::MainApp::News; #

Re: [cgiapp] Number of rm's best practice (more)

2005-12-18 Thread RA Jones
On Sun, 18 Dec 2005, Jeff MacDonald [EMAIL PROTECTED] wrote: I'm at about the same stage of figuring things out as you are, I'd recommend looking into C::A::P::Dispatch, it can basically parse your query string, to know which module handles which runmode, combine that with AutoRunmodes and you

Re: [cgiapp] Number of rm's best practice (more)

2005-12-18 Thread RA Jones
On Sun, 18 Dec 2005, Rhesa Rozendaal [EMAIL PROTECTED] wrote: Here's a sketch of my app structure as it is now. I show two parts, the main, formerly monolithic CgiApp, and one package with a set of run modes. package My::MainApp; use base qw/My::BaseApp/; # I already have this one; it

Re: [cgiapp] Number of rm's best practice (more)

2005-12-18 Thread RA Jones
Hi Jesse, On Sun, 18 Dec 2005, Jesse Erlbaum [EMAIL PROTECTED] wrote: [lots of useful remarks] HTH, Yes it does - but only to muddy the already murky waters ;-) It is a counter argument to the one that suggests the fewer the better. Actually I've no real preference as yet, other than to

[cgiapp] location of instance and application files

2005-12-18 Thread bradford
Where's the best the place for instance and application files? I thought, originally, that instance scripts would go in my web directory, as in index.cgi, so it would fire automatically. But maybe, if I go with the multi-instance scenario that Jesse just suggested, they should go in my /cgi-bin.

Re: [cgiapp] Number of rm's best practice (more)

2005-12-18 Thread Jeff MacDonald
yes , sorry about that. On 12/18/05, RA Jones [EMAIL PROTECTED] wrote: On Sun, 18 Dec 2005, Jeff MacDonald [EMAIL PROTECTED] wrote: I'm at about the same stage of figuring things out as you are, I'd recommend looking into C::A::P::Dispatch, it can basically parse your query string, to know

Re: [cgiapp] location of instance and application files

2005-12-18 Thread Ron Savage
On Sun, 18 Dec 2005 18:16:20 -0500, Jeff MacDonald wrote: Hi Jeff, /usr/www/www.mysite.com/www - this dir holds my cgi's my images, my html /usr/www/www.mysite.com/etc/ - this holds my templates, my modules etc. Exactly, even though there are so many ways of doing this. Brad, The rules I

[cgiapp] CAP::Config::Simple

2005-12-18 Thread Andrew Brosnan
Hi, While trying to install CAP::Config::Simple (on Mac OS X 10.3.9) I get the following errors from make test: # Failed test 'un readable file' # in t/main.t at line 75. # '' # doesn't match '(?i-xsm:Permission denied)' t/mainNOK 19

Re: [cgiapp] Good practices: how many run modes in an app

2005-12-18 Thread Ron Savage
On Sun, 18 Dec 2005 09:19:18 -0500, Cees Hek wrote: Hi Cees That is the rule I follow as well. The only time the CGI::App Same here. object sees a DBI handle is when it needs to pass one to a plugin (like the session plugin). It never ever uses it directly. Right. -- Cheers Ron Savage,