Re: General Perl/Web questions
- From: mlists@xxxxxxxxxxxxxxx (JupiterHost.Net)
- Date: Fri, 28 Apr 2006 08:49:57 -0500
Steve Gross wrote:
I've just finished developing a small web site that uses Perl, CGI, DBI
and HTML-Template. Typically, an HTML page calls a Perl script that does a
database fetch, parses the data and then puts it on another web page using a
template.
I've noticed that most of my web pages look the same:
Get Passed Parameters
Open Database
Build SQL Query
Execute SQL Query
Close Database
Parse Data
Open Template
Pass Data to Template
I repeat this pretty much for each HTML/Perl script.
What I was wondering is can I somehow modularize a segment and then call it
from each script? That way I would only need to write and debug it once.
Something like subroutines but on a more global level.
Sure just use Modules, OO or function based will do depending on the task.
perldoc perlmod
.
- Follow-Ups:
- Re: General Perl/Web questions
- From: Leonid Grinberg
- Re: General Perl/Web questions
- References:
- General Perl/Web questions
- From: Steve Gross
- General Perl/Web questions
- Prev by Date: Re: problem with whitespace not splitting on split.
- Next by Date: Re: simple wildcard regex problem.
- Previous by thread: General Perl/Web questions
- Next by thread: Re: General Perl/Web questions
- Index(es):
Relevant Pages
|