c has asked for the wisdom of the Perl Monks concerning the following question:
require 'snippet.lib';
perhaps old habits die hard, but for some reason, it just feels like this should be include or something.
actually, let me give my case in point and this could stem in a different direction. i have a cgi script that generates html content (i am not using use CGI; i am just not there yet). anyway, my outside snippet.lib is really just a portion of html code that will change frequently and i want to be able to let the html dudes make their changes without freaking out over seeing so much perl code. so its going to look like:
print<<TOC; <table> <tr> <td>blah</td> </tr> </table> TOC
not really a whole lot of perl here, but just a way to keep
my stuff mine and their stuff theirs.
so am i going down a road taken by all beginners trying to be
crafty that ends in a dark alley? or am i getting in done in
a non-optimal but okay way. suggestions are more than welcome, but
CGI is just out of my reach right now guys. gimme
another week of soaking it all in.
humbly -c
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using 'require' to insert code
by HyperZonk (Friar) on Jul 23, 2001 at 06:48 UTC | |
by synapse0 (Pilgrim) on Jul 23, 2001 at 10:17 UTC | |
|
Re: using 'require' to insert code
by wine (Scribe) on Jul 23, 2001 at 12:48 UTC |