develooper Front page | perl.perl5.porters | Postings from June 2012

Re: [PATCH] Add "use strict" to lib/perl5db.pl

Thread Previous | Thread Next
From:
Richard Foley
Date:
June 11, 2012 04:18
Subject:
Re: [PATCH] Add "use strict" to lib/perl5db.pl
Message ID:
20120611111720.GP31935@thpad
A solution which would permit the patch (or one similar) might be to make the
"use strict" behaviour dependent on an option setting, something like:

    PERLDB_OPTS="useStrict=1" perl -d ...

Just an idea.

-- 
Ciao

Richard Foley

http://www.rfi.net/books.html

On Mon, Jun 11, 2012 at 11:54:05AM +0100, Dave Mitchell wrote:
> On Mon, Jun 11, 2012 at 12:43:47PM +0300, Shlomi Fish wrote:
> > the attached patch against blead adds "use strict" to lib/perl5db.pl, which is
> > the default perl debugger (what gets invoked by writing "perl -d".
> 
> > @@ -510,6 +510,8 @@ where it has to go.
> >  
> >  package DB;
> >  
> > +use strict;
> > +
> >  BEGIN {eval 'use IO::Handle'};	# Needed for flush only? breaks under miniperl
> 
> This causes 'use strict' to be in scope for the 'eval' sub, which means
> that code evaluated with 'x' is now run under 'use strict'.
> 
> 
> -- 
> In the 70's we wore flares because we didn't know any better.
> What possible excuse does the current generation have?

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About