|P is for Practical|
Re: Perl Style Guides for Large Projectsby Anonymous Monk
|on Nov 04, 2002 at 15:49 UTC||Need Help??|
I don't have any references to any formal specifications, but here's what I've gleaned from my experience working on some large Perl projects:
/opt/foo/.perlpath would then contain:
This will allow you to port your application from host to host, without having to recompile perl to see your modules, and without having to polute the common perl library directories, which your application's respective user id does not own.
5. You should definitely settle on OO structure, such as only allowing access to data through getter and setter methods, as well as how you will address private and public methods (private is usually denoted as having a "_" in front of the method name, such as "_findStuff").
6. I would also recommend coming up with common utilities, used throughout the code so that you don't have developers writing the same thing twice or, worse yet, copying and pasting code. Look at CPAN for logging modules and other common modules which will be used by developers.
7. Standardize on your logging! This is the only thing that will save you in a production environment to help diagnose a problem.
8. Remember that, although there is more than one way to do it, this should not necessarily be the case on a large-scale Perl project. Readability and maintanability should come before artistic freedom.