One include file that most of my scripts use is require "incl/html.pl"; in various forms. Because the vast majority of what I write is web code, this include has subroutines to supply common parts of the web page: header, footer, Javascript routines, etc. So it is really nothing more than a collection of subroutines. Others do common stuff like connect to the database schema(s) and provide logging functionality, etc.
I usually create two copies of each website depending how complex it is going to be functionally - prod and test. They have identical code except for a incl/variables.pl file which has variables containing database credentials and environment settings like whether or not to send out automated emails.
So converting them to modules should not be too complex WRT the content. But there are a number of *.pl include files some of which then require another.
|