|Don't ask to ask, just ask|
Re: How do you organize your Perl applications?by simon.proctor (Vicar)
|on Apr 04, 2003 at 23:37 UTC||Need Help??|
It should be fairly explanatory other than the admin programs for any web application go in the admin folder and have a separate (sub)domain/virtual host. Naturally the docroot folder (document root) is for the web application main. The logs folder is both for any debug or normal running logs as well as any logs from the webserver.
If this isn't a web application, then the docroot goes but the admin folder normally remains (it depends). As for the lib folder. This holds any modules that I write that I don't find on CPAN or need to get from CPAN but cannot install and have to do a 'use lib' for.
One thing I always do is add a --help option to any command line scripts . I always forget how to use my own programs!
In the context of your files, ini goes in the config folder, html in the templates folder (or sub folder), module in the lib folder and as this isn't a web app, the perl script goes in the root. As you would expect, tests go into a 't' folder.
The readme is to describe where everything is and what it does. Possibly not Perl style but some of my command line apps get used by people not used to these things but who can follow instructions.
As an aside, when using templates I tend to create template aliases (see below). This allows me to change where files are in one place without hunting through code.
I also call all my files with the same endings. So config files end in .config, html templates end in .phtml and so on.