On Tue, 5 Feb 2002, Dave Rolsky wrote: > On Mon, 4 Feb 2002, Andrew Ho wrote: > >> One last thing that is hard is where is your DocumentRoot? This is a huge >> problem for web applications being installable "out of the box." Perl >> can't necessarily figure that out by itself, either. > > You take a guess and then ask the user to confirm. And you can't guess > you just ask.
That's a good strategy (assuming a missing if in there somewhere). It can be augmented with the tactic of "check for a running apache, see where it gets its config file from, and parse the config file" to get the initial guess. (Note that I wouldn't want this to be a final guess; I'm using mod_perl in a virtual host config; the "main" apache config doesn't use it, and has a completely unrelated docroot (/usr/local/apache/htdocs as opposed to /home/appname/public_html)) > There's nothing wrong with an interactive installer. What kills mod_perl > apps is they simply have a README or INSTALL that says "Copy all the > template files to a directory called 'app-root' under your document root." "My what?" "Which files are templates?" "I don't know this unix stuff; copy doesn't work right." I think we've all probably heard these words before... >> I guess my point is that installation is hard. Rather than trying to make >> it work for everybody out of the box, you should make it work for the >> typical case out of the box, and then provide hooks for installing it in >> custom places. > > I think the best installer is an interactive installer that tries really > hard to provide good defaults. I agree; while I frequently leave unimportant considerations alone (note my main docroot above), I tend to have very poor luck with the "works with the typical case out of the box, and then provides hooks which change with every bloo^W^W^W^W^Wfor installing it in custom places". I won't go into speculations why. Ed