[EMAIL PROTECTED] wrote:
> On Sat, Jul 21, 2001 at 02:47:43PM -0700, Dave Storrs wrote:
>
>>I discovered today that I had forgotten to put 'use strict' at the top of
>>one of my modules...it was in the script that _used_ the module, but not
>>in the module itself. Putting it in instantly caught several annoying
>>bugs that I'd been trying to track down.
>
> A better way might be something which simply detects if you forgot to
> use strict. Stick that in your Makefile.PL and it will scan your
> libraries everytime and report back stupid mistakes.
>
> I'm working on something like that, just having a little trouble
> nailing down how to detect 'use strict' from the B compiler. It's
> possible, I know that much.
>
>>It would be nice if there was a
>>
>> use strict 'recursive';
>>
>>option that you could set in a script or module (package, whatever) which
>>would force all the modules it used to operate under strict.
How about something similar to PERL5OPT that, instead of inserting stuff
onto the command line, inserted stuff into every package defined? That
way, you wouldn't worry about people shipping code with it defined; it
would only be useful as a development aid. (I've run across the same
problem many times. "Hey! Why didn't use strict catch this? ...oh, not
again!")