To CGI::Application::Generator users
When I look at the example of generated code every run
mode routine returns this: $self->dump_html();
for example:
sub do_search {
my $self = shift;
my $q = $self->query();
my $dbh = $self->param('DBH');
return $self->dump_html();
}
What is the best way to resolve "dump_html"?
Should that method be in the inherited:
"My::CGI::Application"?
And should the code be differentiated by looking at
the method name that called it?
Have you used this model? If so, can you give an
example of how you resolved dump_html?
I've implemented a builder (inherited from
CGI::Application) and chose to generate a hash of
methods and parameters defined by a fairly complex
build module which builds the parameters from user
input.
Then the builder runs a simple parser which generates
a list of function calls + parameters. I had planned
to use a run-time generator to generates that list for
each method (the result of each function is HTML from
CGI calls).
I'd prefer to have the build generate templates with
embedded functions (in variables and loops) and
generate code to invoke the templates. Which brings
me back to ... how do I resolve dump_html because I
could have it call each desired template which could
be generated from a build phase (or even by hand as a
first pass).
I thought about a TMPL_CAN which if an object can
invoke a method then it does ... has anyone
implemented that approach?
Thanks for any suggestions or help.
Sincerely,
David Scott
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.