Re: Apache2::RequestIO::Print: error 104

2008-03-13 Thread Robert L Hicks
Michael Peters wrote: Robert L Hicks wrote: [error] Apache2::RequestIO::print: (104) Connection reset by peer at /usr/lib/perl5/Template.pm line 178 Doesn't it just mean that the user hit the stop button before finishing the download of the page? So you were in the middle of writing to the pi

Re: Apache2::RequestIO::Print: error 104

2008-03-13 Thread Michael Peters
Robert L Hicks wrote: > [error] Apache2::RequestIO::print: (104) Connection reset by peer at > /usr/lib/perl5/Template.pm line 178 Doesn't it just mean that the user hit the stop button before finishing the download of the page? So you were in the middle of writing to the pipe when it was cut.

Apache2::RequestIO::Print: error 104

2008-03-13 Thread Robert L Hicks
[error] Apache2::RequestIO::print: (104) Connection reset by peer at /usr/lib/perl5/Template.pm line 178 Has anyone seen that before and/or would you know what I need to look at? Robert

RE: Custom Object-Oriented Module using HTML::Template

2008-03-13 Thread xyon
FYI, for those interested, I had to do some code adjustments. There was a missing right curly bracket in Handler.pm (need to close the sub), and I wasn't loading DECLINED properly in Handler.pm. Here is the proper setup: --- package M

RE: Custom Object-Oriented Module using HTML::Template

2008-03-13 Thread xyon
Thank you all for your advice. With that and some help from a mentor, it is now working, with the below code: Apache config: --- PerlSwitches -I/home/Perl/ PerlModule Myserver::Handler SetHandler modperl PerlResponseHandler

RE: Custom Object-Oriented Module using HTML::Template

2008-03-13 Thread Adam Prime x443
SetHandler modperl doesn't bind 'print' to '$r->print'. Try SetHandler perl-script, or change your code to pass in the request object and use $r->print instead of print. Adam -Original Message- From: xyon [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2008 11:47 AM To: modperl Sub

Re: Custom Object-Oriented Module using HTML::Template

2008-03-13 Thread André Warnier
Hi. I know it's not clean, and it is probably not what you need to do in the long run, and I don't know a bit about HTML::Template. But why don't you try the following, just to check : > package Myserver::Handler; > > #Setup some essentials > use strict; #strict toleran

Re: Custom Object-Oriented Module using HTML::Template

2008-03-13 Thread xyon
Good suggestion, I moved the content_type to the top of the handler routine in Handler.pm, so it now looks like: --- sub handler { my $self= shift; $self->content_type('text/html'); my $view= Myserver:

Re: Custom Object-Oriented Module using HTML::Template

2008-03-13 Thread André Warnier
Hi. First, don't take my suggestions as gospel, I don't know the TT2 and do not really know how you're supposed to work with it. But it seems to me that this is in the wrong order : $view->mainpage; $self->content_type('text/html'); I think you should trigger the HTTP header before yo

Re: Custom Object-Oriented Module using HTML::Template

2008-03-13 Thread xyon
Just for clarity's sake, here is the test script command and output: --- $ tests/View_mainpage.pl ### HTML::Template Debug ### In _parse: ### HTML::Template _param Stack Dump ### $VAR1 = [ \'Test! ' ]; ### HTML::T

Re: Custom Object-Oriented Module using HTML::Template

2008-03-13 Thread xyon
Thanks for the reply. I thought as you did (that there were too many "Content-Type" definitions), so commented out this line in the View.pm module, but that doesn't seem to have changed anything: 'print "Content-Type: text/html\n\n";' Here is the lwp command and output: --

Re: Custom Object-Oriented Module using HTML::Template

2008-03-13 Thread André Warnier
Hi. First, a small disgression : along with perl, comes a beautiful test tool for HTTP stuff, called "lwp-request". Like, at the command-line : lwp-request (to see the options) lwp-request -m GET -Sed "http://myserver/myURL"; (that will show you what you get as a response, without a browser g

Re: Custom Object-Oriented Module using HTML::Template

2008-03-13 Thread xyon
That worked great with the test script ( print $template->output; ), but unfortunately, I'm having trouble getting the display onto a web page (via the Handler). The resulting web page is blank, with no source. Below are my Apache configs for the handler, logs, and the handler and view module's l