leocharre has asked for the wisdom of the Perl Monks concerning the following question:
I am putting this app together, an online document access management system. I want to be able to install it on diff machines, I want to release parts of it and eventually the whole thing on CPAN. It's a big project, and the code is getting bigger. My running script is very small, it just calls some functions from included modules, like &get_tainted_data, &check_tainted_data, &get_session_data, &print_html_header .. etc etc.
subs that deal with simply html stuff are in a module like Html.pm, stuff that deals with file info, file actions, etc is in Files.pm, stuff that deals with sessioning is in Session.pm etc etc.. All this has really helped me move along, isolate development bugs, etc
I want to conform to the community's standards- Just what should a perl module do? As it stands my modules pretty much depend on each other- so... am i being retarded or bad manared separating my code into modules this way? should I only sepparate code into modules if they can be used alone ? Am I worrying too much about this, should I just go apesh&t and make any modules I want and .. even.. pl files and the old function files.. what were they, pf or something.. ?
I've read some texts on modules. there's a lot of talk about syntax, structure, scope, etc .. but where can i find some.. about.. ethics? and making it more useful to other people?
update: I have simplified my question: If I have cake.pm and dog.pm, and neither does anything useful without the other.. should they not be dogcake.pm instead ?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how far should i split my code into modules
by radiantmatrix (Parson) on Feb 02, 2006 at 21:11 UTC | |
|
Re: how far should i split my code into modules
by holli (Abbot) on Feb 02, 2006 at 20:50 UTC | |
by leocharre (Priest) on Feb 02, 2006 at 21:05 UTC | |
|
Re: how far should i split my code into modules
by Fletch (Bishop) on Feb 02, 2006 at 21:28 UTC |