On Tue, Dec 19, 2006 at 04:30:08PM -0800, Allison Randal wrote: > Nicholas Clark wrote: > > > >To seek clarification - having those as global settings for cperl isn't > >likely to be an issue? Or having them in editor blocks? > > I meant globally.
Ah. There have been times when it would have been "fun". For instance at Fotango, I was editing perl 5 source (hard tabs, 1 sort of indenting) parrot source (spaces, different) and Fotango's own source (different again) in the same editor. Richard helpfully made a custom hook for cperl mode that enforced that Fotango standard, but using this really messed the perl 5 source so I had to disable it. > It's really not a big deal, though. For the immediate problem, let's > just make an exception and leave the hints out of Perl files with > __END__ or __DATA__ blocks. > > Mark it as a cage cleaner task for some point down the road: figure out > how to encourage good formatting habits, without assuming that everyone > uses emacs or vim, and with minimal clutter in our source code. Is PerlTidy trustworthy enough to run as a pre-commit hook? One thing we have found in perl 5 is that adding editor blocks saying "read only" in generated files tends to act as a good reminder to people not to edit them; far more effective than a comment at the top, if you've jumped straight to a line in the middle following a compiler error. Nicholas Clark