Here's what I'm currently using, although it's admittedly not CPAN-compatible, since I use
git to deploy my webapps, so CPAN isn't a concern for them. Assuming I'm building My Web App:
- ~/src/my_web_app/
- TODO
- MyWebApp/
- (general project-specific modules defining the underlying object/data model)
- CGI/
- (plugin modules for connecting the object/data model to the web interface)
- cgi/
- index.fcgi
- tpl/
- (page-generation templates)
- (other misc files which need to be accessible by web)
- local/
- (misc host-specific support files which, for whatever reason, aren't put into the main git repo)
- t/
- util/
- (any command-line tools specific to the project, including cron scripts)
With this structure, installing on a new host is a simple matter of cloning the project out of
git and symlinking the
cgi/ directory into the host's web root. Depending on how the host's operating system handles paths doing a
../ from a symlinked directory, it may also be necessary to symlink
MyWebApp/ into one of the dirs in
@INC, but that's usually not required, thanks to
FindBin. (Obviously, I only work with *nix-derived OSes. I don't know whether Windows has a suitable equivalent to symlinks or, if it does, what that might be.)
If I were to want to build a CPAN distribution out of one of these projects, I would expect it to mostly just be a matter of creating a distribution dir (call it dist/ and symlinking the relevant bits into it - MyWebApp/ into dist/lib/, t/ into dist/ to replace the default dist/t/, and cgi/ and util/ to... well... I don't know where because I've never packaged executables for CPAN, only modules.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.