Re: [cgiapp] CGI::Application wiki page SettingDropDownValues updated by BryanSmith

2012-10-26 Thread Mike Tonks
Hi Mark, I'd be happy to volunteer. I'm about to disappear for a week with the family, but I'll ping you when I get back and see if a login is available. Regards, Mike If anyone is interested to work on it, I would be grateful, and see what can done about arranging appropriate access.

Re: [cgiapp] Moving to PSGI: Issues with $ENV

2012-10-18 Thread Mike Tonks
Hi, I'm a humble author of this humble plugin. If you have a patch, please send it to me. Thanks, Jiri Hi Jiri, Thanks - I'll certainly send a patch. Now I've confirmed I'm on the right track, I'll try to do a bit more work and get some useful tests / pod together as well. I thought it

[cgiapp] Moving to PSGI: Issues with $ENV

2012-10-15 Thread Mike Tonks
Another issue that has come up along the way is using $ENV While this is fine under apache it doesn't seem to work with PSGI A common occurence is using $ENV{REMOTE_ADDR} for a user IP Address, but this is easily solved by using $self-query-remote_addr which does the right thing in both

Re: [cgiapp] Moving to PSGI: Issues with $ENV

2012-10-15 Thread Mike Tonks
Correction that should be: $self-query-env-{$header} so a possible patch would look something like: ... my $header_value = $self-{__IS_PSGI} ? $self-env-{$header} : $ENV{$header}; ... # CGI::Application community mailing list ##

Re: [cgiapp] Streaming Large Files using PSGI

2012-10-12 Thread Mike Tonks
think we can kick this about and get in accepted into the upstream packages? I have written some tests and pod documentation. Is Purdy on this list? Regards, Mike On 8 October 2012 16:55, Mike Tonks fluffym...@googlemail.com wrote: Hi Mark, Thanks for the feedback. OK I'll have a go

Re: [cgiapp] Streaming Large Files using PSGI

2012-10-08 Thread Mike Tonks
Hi Mark, Thanks for the feedback. OK I'll have a go then. Here's my initial attempts... https://github.com/miketonks/CGI--Application https://github.com/miketonks/CGI-Application-Plugin-Stream Does this approach seem ok? mike On 5 October 2012 14:03, Mark Stosberg m...@summersault.com

[cgiapp] Streaming Large Files using PSGI

2012-10-05 Thread Mike Tonks
For years I've used the handy CAP::Stream return $self-stream_file( $file ); method and this does a lovely job of chunking the data so large files are handled without memory issues. Files could be anything from 10Mb up to 800Mb ish. I'm now looking to go 'production' with a PSGI, Starman

[cgiapp] Saving State

2012-09-14 Thread Mike Tonks
Ha yes I totally agree. Perhaps 'abuse' was the wrong word, no offense was intended. I will have to try try this 'CGI-save' method some time :) # CGI::Application community mailing list #### ## To unsubscribe,

Re: [cgiapp] CGI::Application status update from the maintainer

2012-09-13 Thread Mike Tonks
Hi Bill, This is fascinating, but I think you're abusing CGI.pm for something it was never intended for. How about using XML::Simple to encode the data and write that into the flat files? # Grab a hashref of data from the posted form my $data = $cgi-Vars; # Dump data into file XMLout($data,

Re: [cgiapp] CGI::Application wiki page HomePage updated by MikeTonks

2012-09-06 Thread Mike Tonks
Just a note to say I'm pretty sure we don't want these two spam links on the front page of the wiki, but if I've got the wrong end of the stick just let me know. On 6 September 2012 09:38, cgi...@erlbaum.net wrote: CGI::Application page http://cgi-app.org/index.cgi?HomePage edited by

Re: [cgiapp] CAP::Session causing errors under FastCGI and Plack?

2012-04-05 Thread Mike Tonks
Hi Jason, We are using CAP::Session with Plack in a dev environment (not production) and haven't seen any issues. Also under mod_perl and vanilla cgi all runs fine. Tested briefly with nginx as a front end and seems fine too. We're using ubuntu. One of the guys has it running fine on a Mac

[cgiapp] Web Socket Support

2011-12-02 Thread Mike Tonks
Hi Folks, I've been getting quite interested in web sockets recently and trying out a few examples. http://showmetheco.de/articles/2010/11/timtow-to-build-a-websocket-server-in-perl.html Anyone given thought to this in CGI:App ? cheers, mike # CGI::Application community mailing list

[cgiapp] Routesplugin with mod_perl Issue

2011-09-09 Thread Mike Tonks
I've been running the following hack for a while. I added it when we first tried running under mod_perl, and it slipped into production and got forgotten about. Taking it out causes the application to fail to assign run modes correctly when running under mod_perl. In

[cgiapp] Software caused connection abort - CGI::Application::Plugin::Stream

2010-10-27 Thread Mike Tonks
I started getting this error recently after switching my app to mod_perl: Error executing run mode 'download': Software caused connection abort at /usr/share/perl5/CGI/Application/Plugin/Stream.pm line 91 The download works fine for me, and nothing showed up in testing, but I've had quite a few

Re: [cgiapp] RFC: CGI-Application-Plugin-DetectAjax

2010-10-19 Thread Mike Tonks
Hello Jiří, I tried your plugin and it's quite handy. Thanks! I did get an install error out of the box due to a missing dependency: Test::MockObject Otherwise it seems to work fine. Regards, Mike 2010/10/17 Jiří Pavlovský j...@getnet.cz:  Hello, for anyone interested I produced (very

Re: [cgiapp] use persisten instance of cgiapp with cgi::fast?

2010-09-01 Thread Mike Tonks
Thanks for this Mark. I am about to embark on an upgrade from vanilla CGI::App to either mod_perl or FastCGI and will read this with interest. Given we are using a dedicated server and just want things to run as fast as possible, is there anything to choose between the two? Seems like more

[cgiapp] Graceful Error Handling in CGI::App (compile / init stages)

2010-07-07 Thread Mike Tonks
Hi All, I've just had the pleasure of a couple of colleagues trying to install our CGI::Application based project, and realised I could improve the basic error messages displayed to the user at this stage. Common errors are: 1) So and so CPAN module is not found 2) Config file not found

Re: [cgiapp] Dropdown Menu

2010-04-15 Thread Mike Tonks
I find it works pretty well using TMPL_LOOP and an array of hashref's from the db - I loop through the data array and set the 'Selected' item before passing into the template, like so: in the viewer module: my $product_types = $self-dbh-selectall_arrayref(select * from product_type where

[cgiapp] Spam on the wiki?

2010-04-12 Thread Mike Tonks
Are we getting spam on the wiki? http://cgi-app.org/index.cgi?action=diffpage_name=ArticlesAndTutorialsrevision_id=-1 On 11 April 2010 13:22, cgi...@erlbaum.net wrote: CGI::Application page http://cgi-app.org/index.cgi?ArticlesAndTutorials edited by Carolin #  CGI::Application

Re: [cgiapp] C::A::P::Routes

2010-03-04 Thread Mike Tonks
I am using CAP::Routes and it works very well for me. First off, I am using ScriptAlias to map the url and hide the script name it the url: So I have a few lines in my /etc/apache2/sites-available/app virtual host file: ScriptAlias /contacts /var/www/app/cgi-bin/contacts.cgi

Re: [cgiapp] UTF-8 output

2009-11-19 Thread Mike Tonks
I have the following in my cgiapp_init: binmode STDOUT, :utf8; # Explicitly output utf8 - this is critical probably totally wrong, but it works for me... 2009/11/4 Michael Lackhoff lackh...@zbmed.uni-koeln.de: On 04.11.2009 12:19 Cees Hek wrote: You mean something like this:

[cgiapp] Threading Question

2009-11-17 Thread Mike Tonks
Hi Folks, I'm just considering a problem that I think requires a bit of multi-threading. It's a new one for me so wondered if anyone has advice or experience of using threading with CGI::Application. Scenario is: We have 5 database servers at different sites. We would like to create a search

Re: [cgiapp] [Announce] CGI::Application::Plugin::Routes v1.01 now on cpan

2009-06-16 Thread Mike Tonks
? cheers, Mike Tonks # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp

Re: [cgiapp] Re: Testing Methods

2009-06-01 Thread Mike Tonks
this... cheers, mike 2009/5/20 Mark Stosberg m...@summersault.com: On Wed, 13 May 2009 20:14:36 +0100 Mike Tonks fluffym...@googlemail.com wrote: Hi All, Can anyone recommend a method or point me to some examples for testing CGI::App run modes? In addition to using CGI_APP_RETURN_ONLY, you can also

[cgiapp] Testing Methods

2009-05-18 Thread Mike Tonks
Hi All, Can anyone recommend a method or point me to some examples for testing CGI::App run modes? Our app is getting ever more complex and could really do with some automated tests. I'm able to build tests against the MCV 'model' classes, but not the controllers or views (never mind the

Re: [cgiapp] Re: Proper Way To Load Template Params

2009-03-25 Thread Mike Tonks
I do it like this: my $row = $self-dbh-selectrow_hashref('SELECT age, day FROM table WHERE id = ?', { }, $self-session-param('cell')-{'sid'} ); $template-param( TITLE = Page Title, %$row, ); mike # CGI::Application community mailing list ##

[cgiapp] Windows Environment Setup

2009-01-16 Thread Mike Tonks
Hi All, I was recently asked how to setup a dev environment on Windows for CGI::Application, and couldn't answer, other than to install ubuntu as a dual boot and use that. Can anyone suggest ways to do this? cheers, mike # CGI::Application community mailing list ##

[cgiapp] Recruitment

2008-12-18 Thread Mike Tonks
Hi All, Can anyone suggest a good place to advertise for a perl coder, ideally with CGI::Application experience and based in the UK? All the local agencies only have php guys... Or contact me off list if you're available at the moment. Apologies if this is off-topic. mike #

Re: [cgiapp] Recruitment

2008-12-18 Thread Mike Tonks
Hi Silent, I could maybe persuade my boss to consider someone overseas. It's about a six week project, shopping cart system. Would you be interested? 2008/12/18 silent silent2...@gmail.com: http://jobs.perl.org and how about people who can work in other country ? Mike Tonks 写道: Hi All

Re: [cgiapp] How do I implement this pattern: Resume interrupted POST after login

2008-12-02 Thread Mike Tonks
How about a javascript timer to take them back to the login form when they time out, avoiding the problem of them filling in the form with an expired session? Otherwise, CGI can be initialised from a hashref, which should save you needing to use anything as drastic as LWP. $query = new CGI(

Re: [cgiapp] Re: utf8 form processing

2008-10-21 Thread Mike Tonks
Hi Rhesa, Yes I tries the -utf8 switch for the CGI module, and while it didn't break the code in any way, it simply didn't seem to do anything. I did wonder if it could be the use of require instead of use, but I don't really understand the difference and / or how this affects C::A. Seems like

Re: [cgiapp] Re: utf8 form processing

2008-10-16 Thread Mike Tonks
That would be nice indeed, and perhaps a little switch in C::A to enable it? 2008/10/16 Mark Stosberg [EMAIL PROTECTED]: On Wed, 15 Oct 2008 17:11:34 +0200 Rhesa Rozendaal [EMAIL PROTECTED] wrote: Mike Tonks wrote: Hi All, I recently encountered the dreaded utf8 funny characters, again

[cgiapp] utf8 form processing

2008-10-15 Thread Mike Tonks
Hi All, I recently encountered the dreaded utf8 funny characters, again. This time on the input data coming from form entry fields. It's CGI.pm that actually does the processing, and needs to read the stream as utf8. There is a flag for this, but I couldn't get that to work, so as a temporary

Re: [cgiapp] Problem displaying French, sometimes

2008-09-10 Thread Mike Tonks
Hi Ron, Your script should send a response header as follows: Content-Type: text/html; charset=UTF-8 and in your HTML source you should have a matching meta-tag: meta http-equiv=Content-Type content=text/html; charset=UTF-8 / If you're using CA then the response header can be defined by:

Re: [cgiapp] Problem displaying French, sometimes

2008-09-09 Thread Mike Tonks
+0100, Mike Tonks wrote: You got me there. I'm using mysql with utf8 and this works fine for me. I tend to agree with Peter that utf8 is the way to go. I've tried to go the 'utf8' way (1) httpd.conf: PerlSetEnv PGCLIENTENCODING UTF8 (2) startup.pl: No change (3) sites.fcgi $ENV

Re: [cgiapp] Problem displaying French, sometimes

2008-09-08 Thread Mike Tonks
You got me there. I'm using mysql with utf8 and this works fine for me. I tend to agree with Peter that utf8 is the way to go. 475 | info | CGIApp: CÔTE D'IVOIRE. Encoding: UTF8 off, ASCII, 3 characters 3 bytes | 2008-09-08 09:27:03.887059 3 chars? WTF? The code is: $self - log($_ -

Re: [cgiapp] Problem displaying French, sometimes

2008-09-07 Thread Mike Tonks
I don't have a full explanation, but the second character looks like a wrongly encoded double-byte utf8 issue, i.e. utf8 character (double byte) being displayed as two characters. Do you see 'wide character in print anywhere? This can happen when you concatenate two string together if the uft8

Re: [cgiapp] How to open a child window?

2008-07-28 Thread Mike Tonks
Hi Mark, In short yes, you can have dedicated run modes to handle the display and processing of the popup window - a kind of 'mini' C::A if you like. As flavio says you would normaly use javascript to call the popup window, wether through the traditional popup or the more modern ajax-style

Re: [cgiapp] Persistence

2008-03-05 Thread Mike Tonks
javascript. Now I like the old links, so cookies seems like a no brainer to me. Can anyone explain why the form method is better and how you implement links? Mike Tonks Developer - BookBank.com On 08/02/2008, Michael Peters [EMAIL PROTECTED] wrote: Stephen Carville wrote: Seems to me it makes

[cgiapp] Multiple run modes

2008-02-06 Thread Mike Tonks
Hi, I'm looking at CGI::Application prior to use, and one thing is unclear to me. I'll outline a little senario to demonstrate the question: I have a simple app with four run modes - list, view, edit update list does what it say on the tin - lists records in a data table view ditto, displays