General Perl/Web questions



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.

Thanks,

Steve


______________________________________________________________
Steve Gross Tel:
212-284-6558
Director of Information Technology Cell: 917-575-4028
JESNA Fax:
212-284-6951
www.jesna.org




Relevant Pages

  • [NEWS] IBM Informix Web DataBlade Local Root by Design
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... that ease development of "intelligent", interactive, Web-enabled database ... person who has access to change the Perl script. ...
    (Securiteam)
  • my perl script for ripping mp3s...aka MP3scRIPt
    ... This is a Perl script to convert audio cd tracks to mp3s. ... Possibly root privs to access the cdrom device ... - this is mainly a problem on 'variety cds', mp3 files suffering from this ill ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Perl script to mimic uniq
    ... mdfoster44@netscape.net spits TOFU in my face: ... > # Perl script to find most common CS ... > So I'm back to my original script which looks like this. ... > identify a sequence as unique. ...
    (comp.lang.perl)
  • Re: Slow Performance When Using DBI, otherwise Not
    ... If I run the same perl script on the database server itself it runs ... check versions of DBI and DBD (I greped for version on every module under ...
    (perl.dbi.users)
  • Re: Linux - Programm als root absichern
    ... > ich habe ein Programm welches die konfiguration eines ... Diesses Programm hat einen schlecht abgesicherten ... > als LoginShell für einen user mit UID 0 das PERL Script hat. ...
    (de.comp.security.misc)