Re: as long as we are discussing 'nice to have's...

2001-07-24 Thread Bart Lateur

On Sat, 21 Jul 2001 14:47:43 -0700 (PDT), 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.

It would be nice if there was...

No. Your script should not be responsible for debugging modules. Modules
are supposed to be debugged already, and are the responsibility of the
module author, not the script writer.

-- 
Bart.



Re: as long as we are discussing 'nice to have's...

2001-07-24 Thread Steve Fink

[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!)




Another nice to have: make # less ambiguous

2001-07-24 Thread Steve Fink

On my wishlist is forbidding the use of # just about anywhere but as a 
comment starter and in strings or regular expressions. Not a big deal, 
but it would make it easier to write 90% correct perl syntax parsers. 
It's a pain dealing with q#not a comment# and m#still not# and 
s(even)#this#. Especially since $# is going away (or did I make that up?).