Custom Object-Oriented Module using HTML::Template

2008-03-12 Thread xyon
Hey everyone, Firstly, I apologize I sent the previous email under an incorrect subject line. I am working on my first Object-Oriented project, and have hit a slight snag. I am using HTML::Template to output within the View module, but it never outputs. I don't see any errors in the logs, I just

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

2008-03-12 Thread Roberto C . Sánchez
On Wed, Mar 12, 2008 at 11:02:27PM +, xyon wrote: > Hey everyone, > > Firstly, I apologize I sent the previous email under an incorrect subject > line. > Yes, but you still hijacked another thread. => In-Reply-To: <[EMAIL PROTECTED]> Please don't do that. Start a new thread by sending a

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

2008-03-12 Thread Colin Wetherbee
Roberto � wrote: On Wed, Mar 12, 2008 at 11:02:27PM +, xyon wrote: Hey everyone, Firstly, I apologize I sent the previous email under an incorrect subject line. Yes, but you still hijacked another thread. => In-Reply-To: <[EMAIL PROTECTED]> Please don't do that. Start a new thread by

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

2008-03-12 Thread xyon
Fixed. I forgot to print the template->output. print $template->output; On Wed, 2008-03-12 at 23:02 +, xyon wrote: > Hey everyone, > > Firstly, I apologize I sent the previous email under an incorrect subject > line. > > I am working on my first Object-Oriented project, and have hit a slig

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

2008-03-12 Thread Roberto C . Sánchez
On Wed, Mar 12, 2008 at 07:58:25PM -0400, Colin Wetherbee wrote: > Roberto � wrote: > >On Wed, Mar 12, 2008 at 11:02:27PM +, xyon wrote: > >>Hey everyone, > >> > >>Firstly, I apologize I sent the previous email under an incorrect subject > >>line. > >> > > > >Yes, but you still hijacked anothe

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

2008-03-12 Thread Foo JH
try print $template->output; You forgot the print(); xyon wrote: Hey everyone, Firstly, I apologize I sent the previous email under an incorrect subject line. I am working on my first Object-Oriented project, and have hit a slight snag. I am using HTML::Template to output within the View modu

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

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
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 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 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
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. 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 Adam Prime x443
h 13, 2008 11:47 AM To: modperl Subject: Re: Custom Object-Oriented Module using HTML::Template 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

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

2008-03-13 Thread xyon
ler 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 PROTEC

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

2008-03-13 Thread xyon
> } > > 1; > --- > > > > > On Thu, 2008-03-13 at 12:01 -0400, Adam Prime x443 wrote: > > SetHandler modperl doesn't bind 'print' to '$r->print'. Try SetHandler > >

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

2008-03-14 Thread Boston, Mike
erl-script PerlHandler Apache::Registry Options +ExecCGI PerlSendHeader On -Original Message- From: xyon [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2008 11:27 AM To: André Warnier Cc: modperl Subject: Re: Custom Object-Oriented Module using HTML::Template This message uses a

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

2008-03-14 Thread Perrin Harkins
Mike, Please start a new thread rather than responding to a message. Also, please show the actual error messages you are receiving. http://perl.apache.org/maillist/email-etiquette.html#To_post_to_the_List - Perrin