I am starting in a new position, and am elbow-deep into setting up the work environment, and I found the shop’s
perltidyrc. I decided to compare mine with work’s, and then look back to the version in Damian Conway’s Perl Best Practices.
perltidy from Perl::Tidy and CPAN, and while I use it as an example, it isn’t really the core of this.
Here are the first three lines of the
perltidyrc on Page 35 of PBP.
-l=78 # Max line width is 78 cols -i=4 # Indent level is 4 cols -ci=4 # Continuation indent is 4 cols
Now, here’s three lines from my
--maximum-line-length=78 --indent-columns=4 --continuation-indentation=4
I have the same settings, but you do not have to comment mine, because the verbose flags are essentially a comment. Sometimes the available flags are less understandable, sure, and then, by all means, comment them, but if the verbose versions are self-documenting, use it! That way, your “code” will never vary from the documentation.
I’m 100% sure that somewhere out there, there are
perltidyrcs that look like this …
-l=78 -i=4 -ci=4
… and the person who wrote and uses it has no memory what
-i=4 means and where it came from, and is afraid to change it without looking it up, and that’s more mental overhead than they want to spend right now. And the same goes for
.vimrc, and any number of resource and configuration files out there.
Be kind to Future You. Use verbose flags in your config and rc files.