in reply to All-in-one script vs independent scripts

From my experience, it is much, much easier to maintain several different scripts than a single monster. It's easier to identify what each is doing, you don't have to worry about reusing a variable by accident or a missing bit of punctuation screwing up a different section of code.

If you really want it to appear to users that you're using one script, have an up-front script that uses the first argument returned to determine which other script to exec on the server, then passes all the remaining arguments on to the new script. From the user's perspective, they are always using index.pl, but on the server, you're calling different scripts for different tasks...

  • Comment on Re: All-in-one script vs independent scripts