perlquestion
bcp
oh great monks,<br/>
whilst trying to follow merlin's examples for CGI::Prototype (<a href="http://www.stonehenge.com/merlyn/LinuxMag/col71.html">LM column #71</a>), i noticed that the html being generated ended with array ref rather than the usual form endage:<br/>
<pre>
Content-Type: text/html; charset=ISO-8859-1
<html><head></head><body>
<h1> Welcome! </h1>
Please enter your first and last name
<form method="post" action="" enctype="multipart/form-data">
<input type="text" name="first" tabindex="1" />
<input type="text" name="last" tabindex="2" />
<input type="submit" tabindex="3" name=".submit" /> ARRAY(0x105f5abc)
</body></html></pre><br/>
i've tried it under both cygwin and FC3, using the latest tt, CGI::Prototype, etc. any guidance would be appreciated.<br/>
-bcp-<br/>
do.pl<pre>
#! /usr/bin/perl -w
use diagnostics;
use strict;
use MyApp;
MyApp->activate;</pre>
MyApp.pm<pre>
package MyApp;
use base CGI::Prototype;
use MyApp::One;
sub dispatch {
my $self = shift;
return 'MyApp::One';
}
1;</pre>MyApp/One.pm<pre>
package MyApp::One;
use base MyApp;
sub template { 'forms/the_form.tt' }
1;
</pre><br/>forms/the_form.tt<br/><pre>
[% self.CGI.header %]<html><head></head><body>
<h1> Welcome! </h1>Please enter your first and last name
[% self.CGI.start_form; self.CGI.textfield('first');
self.CGI.textfield('last'); self.CGI.submit;
self.CGI.end_form %]
</body></html>
</pre>