On Tue, 2006-02-14 at 08:29, Carl Wilhelm Soderstrom wrote: > > Putting perl code in the config file has some drawbacks. First, it won't > > work with the new config editor (but that's not released yet). Second, > > any code that takes time to execute (eg: contacting a client to list its > > modules) will make the CGI script run slowly since it is read on every > > request specific to that client. > > thank God you're sensible about this, Craig. Entirely too many perl mongers > have the idea that just because one can put perl script into a config file, > that it should be done. (Witness the abominable config files for LogWatch).
I have to disagree on this one, although in a pure-perl app it doesn't matter a lot and with a cgi interface you need to know what executes every hit and what doesn't. MimeDefang is a great example of where the config file being a snippet of perl allows the local admin to easily do things no one else had even considered, something that's impossible if all you can do is set some canned variables. > Other reasons to avoid scripts in config files: > a. it makes the config confusing to read, even for those people who can > write perl It doesn't have to be confusing. I'd rephrase your comment above and say that just because it can be confusing doesn't mean it should be. > b. it's immediately discouraging to those of us who can't Learning perl will save time for a system administrator. But you should only need to know it to do things that would otherwise not be possible at all. -- Les Mikesell [EMAIL PROTECTED] ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/backuppc-users http://backuppc.sourceforge.net/