This is one of the most frustrating topics simply because you can't take *anyone's* word on it, you have to check yourself or find someone you really trust and have them check it. I took a new job in December and talking to the lead programmer (who I replaced), he told me that the code was very clean and well written, nice standards, etc.
When I got there, the code was just insane. Every variable in the entire program is stored in a huge, arbitrarily nested hash that's passed into and out of every function.
I think some of the most important things are:
- Make sure there aren't a lot of anonymous functions that are hard to reuse.
- Look for clearly defined function libraries with small functions that take arguments related to the calculations the function will make and returns a value that's related to the functions name.
- If it's a web-based project, make sure the HTML and perl code isn't mingled much, if at all.
- Make sure any part of code that is potentially confusing to someone who isn't necessarily a perl guru is documented.
- A decent gauge of a good perl programmer is one who uses a lot of CPAN modules for core functionality.
- The program, if large, should be split into appropriately named modules or classes (which should both be stored in simple reusable .pm files).
- Anything the programmer does to make the code more readable and more resuable is A Good Thing and is a testament to the coder.
- Of course, if there is a huge time crunch, some of the things mentioned above won't be done or won't be done correctly. However, a good programmer *always* shows effort to make sure code is elegant and reusable.