Summary:
There is no circumstance in which I have had to do `no strict.'
Background:
I've spent much of the last six months cleaning up bad perl (let's
hope none of my co-workers are on this list...). When I'm done with
a tool or module, it runs silently under -w and under strict. 100%.
I've got all the standard reasons for doing so, plus one more -- part
of my job here is to act a mentor to a lot of 2[0-5]-year-olds who've
never had to deal with maintenance of code. So even in a case where
*I*, with 20 years of coding, might trust myself to do `no strict',
I'm proving by example that (a) you can do that and (b) you get more
reliable, reusable code by doing so.
So when I say "there is no circumstance in which I have had to do `no
strict'", it should be interpreted as ``I've always been able to find
a workaround that means I can continue using strict.'' Thus far, all
of those workarounds have been (IMHO) roughly equal in quality (speed,
readability, maintainability) to the `no strict' versions.
That said, there are a few cases (such as the grepish example previously
cited) where I'd do a `no strict'. But I'd mark myself down for it in
my annual review. :-)
[[ An aside - one nice side-effect of this part of my job is that
I'm developing an informal set of guidelines and boiler plate
on writing *maintainable* code in perl. If this process continues
far enough, I'll take the collected departmental wisdom and
stick it on the web. Right now it's too early - I keep finding
that I'm re-inventing wheels from the public perl world. Gotta
read Damians contract module Real Soon Now. ]]