> You've taken the wrong approach.  If you're writing a big program then
> there should be *no* default scope.  Any variable access is an error
> unless that variable was my()ed or our()ed.  That's basically what
> 'strict' gives us.

Fair enough. I've heard several good analyses against my idea, so I'll
fold. Notice I never claimed it was a *good* idea (hence the lack of
RFC), but just an idea worth pondering.

However, I do think there's something to be said for a "quick-and-dirty"
script out of the box that can distinguish between sub{} vars and other
vars ala C:

   $user = 'nwiger';
   sub whois {
       ($user) = @_;    # different var
       # ...
   }
   print whois($user);

Maybe a

   use scope 'subs';


True, many people need strict. I use it all the time. But the main
reason I use it is to keep my sub{} vars straight (except in modules,
but that's different).

However, I would argue vehemently *against* turning strict on by default
if the current definition of lexical scoping is kept.

-Nate

Reply via email to