Re: [cgiapp] Determining Content type in postrun (Re-send)

2006-08-05 Thread Rob Kinyon
Rhesa already answered your immediate question. I'm going to give you some advice in terms of why what you're doing isn't the best. In general, headers and footers should be managed by the templating system you're using. For example, I use Template Toolkit (TT) and it has the [% INCLUDE %]

Re: [cgiapp] error mode question

2006-08-05 Thread Rob Kinyon
On 8/4/06, Todd Ross [EMAIL PROTECTED] wrote: So, as requested, I'm preparing a patch to add test cases for expanding the scope of the error_mode functionality. The hooks for prerun and postrun are pretty straight forward; they happen during run() execution so it's a natural extension of the

[cgiapp] (OT) Load balancer solutions

2006-08-04 Thread Rob Kinyon
All - I'm looking for people who're using a load-balancer to find out what they're using and why. I'm currently looking at Apache2.2's mod_proxy_balancer, but my boss would like to have the warm fuzzy of knowing I know people (other than a certain somebody who'll rename nameless) who're using

Re: [cgiapp] error mode question

2006-08-03 Thread Rob Kinyon
On 7/31/06, Todd Ross [EMAIL PROTECTED] wrote: I think CGI::Application's error handling would benefit greatly by eval{}ing hooks. I routinely find myself executing code that might die() inside of a setup() routine (and/or hook) and then having to set some kind of flag so I can defer error

Re: [cgiapp] error mode question

2006-07-31 Thread Rob Kinyon
http://search.cpan.org/src/MARKSTOS/CGI-Application-4.06/t/10errormode.t http://search.cpan.org/src/MARKSTOS/CGI-Application-4.06/test/TestApp11.pm Basically, it wraps run() within an eval{} block. If run() dies (for WHATEVER reason) and error_mode is set, then it is called with $@ as its only

Re: [cgiapp] worth a look: Catalyst::Controller::Constraints

2006-07-30 Thread Rob Kinyon
On 7/26/06, Mark Stosberg [EMAIL PROTECTED] wrote: [snip] It doesn't seem to be an exactly light solution, though. It in turn loads Moose, Class::Delegator, Exception::Class, Hash::Merge and Scalar Util. Catalyst loads about half of those anyways, so the cost isn't -that- high. Plus,

Re: [cgiapp] Bigger apps, how to speed up?

2006-07-19 Thread Rob Kinyon
On 7/16/06, B10m [EMAIL PROTECTED] wrote: Instead of just throwing more RAM and CPU power at it, I wondered if there are better tricks available to speed up the site. Would it help to move PostgreSQL to a different server? Maybe move some time consuming processes to a different machine? Set up

Re: [cgiapp] Re: Class::MOP and performance

2006-07-12 Thread Rob Kinyon
On 7/5/06, Cees Hek [EMAIL PROTECTED] wrote: On 7/5/06, Perrin Harkins [EMAIL PROTECTED] wrote: On Mon, 2006-07-03 at 08:40 -0400, Ricardo SIGNES wrote: This is another good reason to work on making CGI::Application easier to use under mod_perl! Is there something difficult about using it

Re: [cgiapp] Re: Class::MOP and performance

2006-07-02 Thread Rob Kinyon
There are ways to improve the caching used in Class::MOP - I can see if $work will allow Stevan (author of Class::MOP and Moose) and I to work on some details. One thing I know that he and nothingmuch have been working on in Moose is the ability to declare a class closed which will allow for

Re: [cgiapp] Re: A small CGI::Application::Dispatch snag.

2006-06-06 Thread Rob Kinyon
On 6/6/06, Ricardo SIGNES [EMAIL PROTECTED] wrote: * Michael Peters [EMAIL PROTECTED] [2006-06-05T12:29:51] I'm with Michael, here. I don't buy the webserver/application error description. 4xx is an error caused by a bad request from the client. 5xx is a failure by the server to fulfill an

Re: [cgiapp] CGI.pm cookie path bug?

2006-06-06 Thread Rob Kinyon
This sounds like a Safari bug, as amazing as that sounds. :-) (Safari may be doing the right thing and everyone else has created a looser de facto standard - this has been known to happen.) Rob On 6/6/06, Joel Gwynn [EMAIL PROTECTED] wrote: I can't believe there could be a bug in CGI.pm, but

Re: [cgiapp] Re: A small CGI::Application::Dispatch snag.

2006-06-05 Thread Rob Kinyon
On 6/5/06, Mark Stosberg [EMAIL PROTECTED] wrote: I think you might get a File Not Found in the browser. The message isn't quite accurate. The truth is unable to dispatch. But dispatching URLS blurs the line between what corresponds to a real file and what doesn't, and 404/File Not Found seems

Re: [cgiapp] Help: Searching for a webserver module

2006-04-19 Thread Rob Kinyon
Apache::Test? Or, are you looking for CGI::Application::Server? I'm using that at work right now and it's great (though still under development). Rob On 4/19/06, Ron Savage [EMAIL PROTECTED] wrote: Hi Folks I seem to remember a recent module which implements a web server to help testing

Re: [cgiapp] cgiapp specification best practice

2006-03-22 Thread Rob Kinyon
On 3/16/06, Paul Johnston [EMAIL PROTECTED] wrote: Just wondering if there is a best practice document, or suggestions on best practice for creating a cgiapp application. I have built several apps now, but all have been slightly different in approach and ended up being quite different on

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

2005-12-17 Thread Rob Kinyon
On 12/17/05, Brad Cathey [EMAIL PROTECTED] wrote: I'm writing a medium-sized web-based financial application that will have up to 50 run modes between presenting empty forms, saving, editing, updating, and deleting from them. Run modes *could* be broken down into groups, e.g., these 4 deal

Re: [cgiapp] Working with proxies.

2005-12-15 Thread Rob Kinyon
I do the following: use POSIX qw( strftime ); $self-header_add( # date in the past -expires = 'Sat, 26 Jul 1997 05:00:00 GMT', # always modified -Last_Modified = strftime('%a, %d %b %Y %H:%M:%S GMT', gmtime), # HTTP/1.0 -Pragma

Re: [cgiapp] Everything is a plugin

2005-12-14 Thread Rob Kinyon
On 12/13/05, Ron Savage [EMAIL PROTECTED] wrote: Hi Rob I would like to add a summary of my ideas here: o My intention was to criticize your proposal, not you personally. I appreciate the opportunity to respond to your criticisms of my proposal. You didn't mean anything personally, so I

Re: [cgiapp] Everything is a plugin

2005-12-14 Thread Rob Kinyon
On 12/14/05, Michael Graham [EMAIL PROTECTED] wrote: On Wed, 14 Dec 2005 15:18:42 -0500 Cees Hek [EMAIL PROTECTED] wrote: [...excellent explanation snipped...] So I don't think Rob is talking about changing the whole philosophy of CGI::Application, he is just talking about refactoring

Re: [cgiapp] Everything is a plugin

2005-12-13 Thread Rob Kinyon
On 12/12/05, Michael Graham [EMAIL PROTECTED] wrote: So, essentially, CA does the following upon being used: 1) Load all the plugins requested. Each plugin will register as being used for a specific purpose (which could be I add methods). 2) Verify that all required steps (such as

Re: [cgiapp] Everything is a plugin

2005-12-13 Thread Rob Kinyon
I don't get it. From my reading of the threads, no one is changing CGI::Application, right? They're just building extra functionality in 3rd party modules which people may find useful, but which you can choose to ignore if you wish. For instance, I use regularly use C::A::Dispatch,

Re: [cgiapp] Everything is a plugin

2005-12-13 Thread Rob Kinyon
Oh, in that case, maybe a new framework is in order - CGI::Application::PlusPlus anyone? This is an internals change, not a new framework. This change is completely and utterly backwards compatible. I'm not sure why people are complaining so much. Rob

Re: [cgiapp] Re: Everything is a plugin

2005-12-13 Thread Rob Kinyon
On 12/13/05, Mark Stosberg [EMAIL PROTECTED] wrote: On 2005-12-13, Rob Kinyon [EMAIL PROTECTED] wrote: If you don't use any plugins, you'll get the current CA functionality. If you do want to use plugins, you can override any single functionality that CA uses. By itself. I thought we

Re: [cgiapp] Re: CGI::Uploader and mimetypes

2005-12-13 Thread Rob Kinyon
my ($tmp_fh, $tmp_filename) = tempfile('CGIuploaderX', UNLINK = 1 , DIR = File::Spec-tmpdir() ); Ill be submitting a patch for this next week. Rob Kinyon suggested patching or upgrading File::Temp. That does seem like a better place to fix the problem. It's also a wishlist item

Re: [cgiapp] Merging new dispatching idea with ::Dispatch (was: Re: RFC: Proposal for URL dispatching / routing in CGI::App )

2005-12-12 Thread Rob Kinyon
The addon to what you are commenting on is if a run mode was defined in the dispatch table the run mode is NOT extracted from the URL. I think we moved passed this suggestion though. It's not a suggestion - it's the entire point. If you have the runmode be part of the URL, then it's nothing

Re: [cgiapp] Re: RFC: Proposal for URL dispatching / routing in CGI::App

2005-12-12 Thread Rob Kinyon
On 12/12/05, Timothy Appnel [EMAIL PROTECTED] wrote: On 12/11/05, Mark Stosberg [EMAIL PROTECTED] wrote: When you say the main code, are you referring to CGI::Application::Dispatch here? It's not clear to me. main-code == CGI/Application.pm There is the current dispatching model within

[cgiapp] Everything is a plugin

2005-12-12 Thread Rob Kinyon
On 12/12/05, Michael Graham [EMAIL PROTECTED] wrote: * Do something as Rob suggests with a pluggable dispatch architecture. In this case CA::Dispatch would probably become CA::Plugin::Dispatch, anyway. But C::A::D can't really be plugin since it sit's outside of C::A.

Re: [cgiapp] Merging new dispatching idea with ::Dispatch (was: Re: RFC: Proposal for URL dispatching / routing in CGI::App )

2005-12-11 Thread Rob Kinyon
On 12/11/05, Timothy Appnel [EMAIL PROTECTED] wrote: First I should say that I don't agree with how Rails is mixing action (runmode) parameter validation and (presumably) error handling with their dispatcher. I think your URI scheme should be sufficiently unambiguous that the dispatcher

Re: [cgiapp] Double MySQL query thru DBI.

2005-12-08 Thread Rob Kinyon
On 12/7/05, Sean Davis [EMAIL PROTECTED] wrote: Select id from table where name in ('q','w'); Yes, that will technically work. However, how does your solution tell me which id corresponds to q and which to w? Much better would be: SELECT name, id FROM table WHERE name IN ( 'q', 'w' ) The

Re: [cgiapp] Re: RFC: Proposal for URL dispatching / routing in CGI::App

2005-12-08 Thread Rob Kinyon
I suggest using whichever match comes first in the dispatch list. That way it's easy to understand and control, no? Yes. That's what Rails does, and it's easiest to work with. Which is the correct URL? URL B uses the most precise match (longer static string), but URL A uses fewer query

Re: [cgiapp] ANN: Plugin for HTML::Template::Compiled

2005-12-08 Thread Rob Kinyon
On 12/8/05, Jesse Erlbaum [EMAIL PROTECTED] wrote: - die_on_bad_params has been removed (yay!) Does this mean that you can pass any bad param into the template and it doesn't die? For me, this is the template equivalent of use strict. Sometimes, a bad param isn't bad so much as unused. For

Re: [cgiapp] Program Structre and Layout

2005-12-08 Thread Rob Kinyon
What are some of the best practices around splitting up the derived classes? Do people create sub-applications for major pieces of functionality and then tie them together with multiple instance scripts from a top level page? I create a subapp for every single unit of work. For example, I

Re: [cgiapp] The Web programming techniques best documentation question.

2005-12-08 Thread Rob Kinyon
www.extremeperl.org On 12/8/05, Strong [EMAIL PROTECTED] wrote: I want to study the techniques used in web programming those that involve Perl, Mysql, HTML or XML (depending in what is preferred in the current world). I just would not to invent a wheel, I want to know what the advanced

Re: [cgiapp] Re: RFC: Proposal for URL dispatching / routing in CGI::App

2005-12-08 Thread Rob Kinyon
Yeah, I can see how pattern matching can assist in routing. I guess that what bothers me about requirements is that (a) it looks like validation/untainting (which it's not supposed to be), and (b) it puts additional matching logic on the right hand side (which in my head is sort of for

Re: [cgiapp] Re: A new project name for CGI::Application

2005-12-06 Thread Rob Kinyon
I like Capricorn, even if it's a little stuffy. Others could be started with pac. Having a 'P' is what the cool kids do, plus pac is cap backwards. Packrat (packrats ... maybe not) Pachyderm (The gigantic things you can do with C::A) Pacem (You are more peaceful when using C::A)

Re: [cgiapp] Re: A new project name for CGI::Application

2005-12-06 Thread Rob Kinyon
capoera - our webapp-fu is stronger than yours On 12/6/05, Bruce McKenzie [EMAIL PROTECTED] wrote: cap a pied you're covered (Fr head to foot) Bruce McKenzie http://www.2MinuteExplainer.com - Web Archive:

Re: [cgiapp] better link

2005-12-05 Thread Rob Kinyon
On 12/4/05, Mark Stosberg [EMAIL PROTECTED] wrote: Sorry. Here's the link I meant to send a second ago. http://www.cgi-app.org/?DispatchDesign Note: the Rails design works, not because it's a good routing design, but because of the helper functions (which I prompted Catalyst to add). You need

Re: [cgiapp] Best free DB for a web-based Perl app response results...

2005-12-01 Thread Rob Kinyon
I would just like to note that speed and reliability are largely dependent on the transaction profile of your application. If your application is read heavy, MySQL is a sound choice. However if your application consists mostly of database writes, PostgreSQL's MVCC [1] architecture and

Re: [cgiapp] Re: Class::Trait

2005-11-22 Thread Rob Kinyon
Has anyone looked at DBIx::Roles and how it implements a decorator on the DBI connection? I think that this might be better for plugins (even providing the base behavior as a default plugin) than mixins (which I've never liked) or roles (which have conflict issues). Rob

[cgiapp] error_mode and CGI::Carp

2005-02-01 Thread Rob Kinyon
http://www.perlmonks.org/?node_id=426774 asked a question about CGI::Application and CGI::Carp. If you read towards the end of the responses, you'll find a few people are saying that the error_mode() patch seems to be trapping CGI::Carp fatalsToBrowser and not playing nicely. Has anyone else run

[cgiapp] Google-Suggest back-end

2004-12-21 Thread Rob Kinyon
http://www.perlmonks.org/?node_id=416355 Maybe we can have a CAP::GoogleSuggest? That would be very very cool ... Rob - Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/

Re: [cgiapp] Re: ANNOUNCE: CGI::Application::Plugin::LogDispatch

2004-12-13 Thread Rob Kinyon
Personally, I'd add a few changes: 1) Create a param(), not a direct object access. So, instead of $self-{logger}, I'd use $self-param( 'logger' ); 2) Create a logger() method that looks like: sub logger { $_[0]-param( 'logger' ) } So, now you have $self-logger-error( Uh-oh ); The overhead is

Re: [cgiapp] Re: high profile sites using C::A ?

2004-12-10 Thread Rob Kinyon
Attributions??? Damnit! Uhh ... Yeah, I wrote E-Toys!! Yah, yah. That's the ticket! *grins* On Fri, 10 Dec 2004 13:48:20 -0500, Matthew Weier O'Phinney [EMAIL PROTECTED] wrote: On Fri, 10 Dec 2004 09:04:13 -0500, Rob Kinyon [EMAIL PROTECTED] wrote: Uh, oh. I'm hoping perrin doesn't see

Re: [cgiapp] Re: high profile sites using C::A ?

2004-12-10 Thread Rob Kinyon
Uh, oh. I'm hoping perrin doesn't see this!! *laughs* I'm dragonchild and I didn't write etoys - perrin did. I just happen to be a really loud advocate of C::A on Perlmonks and I use etoys as a really good example of what can be done. The only sites I've ever written with C::A were at a small

Re: [cgiapp] CGI::App website (was: Re: new competition: CGI::Prototype (and ::Callbacks))

2004-12-03 Thread Rob Kinyon
MacDonald [EMAIL PROTECTED] wrote: Isn't C::A all about not re-creating the wheel ;) On Fri, 3 Dec 2004 09:33:24 -0500, Rob Kinyon [EMAIL PROTECTED] wrote: Twiki is really annoying to admin, imho. It doesn't even have automated user addition. It could seriously benefit from some work

Re: [cgiapp] CGI::App website (was: Re: new competition: CGI::Prototype (and ::Callbacks))

2004-12-03 Thread Rob Kinyon
If someone has a design, I have coding time. Ideally, this should really be a collaborative effort. I'm a very barebones developer, so I tend to not use a lot of extra modules. That said, this probably should use all the bells and whistles. Class::DBI, TT, CA::Apache, CA::Dispatch, CA::ValidateRM

[cgiapp] Using the submit button as the runmode holder

2004-12-02 Thread Rob Kinyon
In http://www.perlmonks.org/?node_id=411937, madhatter suggested using the submit button to hold the runmode name. What do people think of that? - Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/

Re: [cgiapp] Sending file to the browser...

2004-11-29 Thread Rob Kinyon
Doublecheck to see if you can put a -name or something like that in the headers. I'm don't exactly remember what it is. IE doesn't use the -type parameter correctly, especially not versions prior to 6.0.1. Rob On Mon, 29 Nov 2004 11:49:13 -0800, Tim Howell [EMAIL PROTECTED] wrote: Below I have

Re: [cgiapp] order of method calls

2004-10-28 Thread Rob Kinyon
I'd like to add a few items: run (called from the Instance Script) cgiapp_prerun THE-RUNMODE-SELECTOR (if the value to runmodes() is a code reference) THE-SELECTED-RUNMODE THE-ERROR-MODE (if error_mode() is set and the runmode dies) cgiapp_postrun teardown Rob

Re: [cgiapp] RFC - C::A::Plugin::Apache

2004-10-21 Thread Rob Kinyon
Would you be able to add a handle() method here that would dispatch to the various runmodes, so that way I could just use my C::A child as a mod_perl handler without thinking about it? On Thu, 21 Oct 2004 13:29:23 -0400, Drew Taylor [EMAIL PROTECTED] wrote: On Thu, 21 Oct 2004 12:44:12 -0400,