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.

HUGE MASSIVE PROBLEM HERE!  This might be useful if *all* the modules
you use and *all* the modules which are then used are *all* under your
control and that none of them are have elected to *not* use strict for
some reason (like Exporter, which would be silly to use strict
'refs').  Otherwise, you're just causing unnecessary bugs.

Attempting to apply blanket compile-time style requirements
recursively runs into massive problems like this.  It's all or
nothing.

Taint mode currently has the same problem, its all or nothing.  You
turn on taint, and every single module you use has to behave.  This
might be good for security, but it makes it really, really hard to use
for all practical purposes.


The basic problem is any sort of C<use strict "recursive"> boils down
"I am going to enforce my style upon every piece of code I run into,
whether or not I wrote it" and that rapidly gets nasty.  Taint has
this same problem, but it's supposed to be paranoid.  strict isn't.


> Second topic:
> 
> The debugger API PDD that I submitted a couple of days ago suggested that
> we incorporate a profiler into the core.  What do people think of this
> idea?

You mean like Devel::DProf, the profiler that's already in the core?
;) And is this new debugger API like the current debugger API, DB.pm?
(Actually, I hope it isn't.  Just making sure you're aware of what's
already there.)


-- 
Michael G Schwern   <[EMAIL PROTECTED]>   http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <[EMAIL PROTECTED]>       Kwalitee Is Job One

Reply via email to