develooper Front page | perl.perl5.porters | Postings from August 2022

Re: Difference -de0 and -e

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
August 8, 2022 20:28
Subject:
Re: Difference -de0 and -e
Message ID:
2c1e8f44-e2cd-4363-87fd-3ac8c99f1b06@beta.fastmail.com
This behavior was intentional.  The debugger's input line acts as if features are enabled that were not enabled for the program being executed, which includes the program given by -e

On Mon, Aug 8, 2022, at 16:23, Martijn Lievaart wrote:
> Hi porters,
> 
> 
> I was wandering if this classifies as a bug. There seems to be a 
> difference in features when loading the debugger en when not:
> 
> 
> $ perl -e 'say 1'
> Number found where operator expected at -e line 1, near "say 1"
>     (Do you need to predeclare say?)
> syntax error at -e line 1, near "say 1"
> Execution of -e aborted due to compilation errors.
> $ perl -de0
> 
> Loading DB routines from perl5db.pl version 1.39_11
> Editor support available.
> 
> Enter h or 'h h' for help, or 'man perldebug' for more help.
> 
> main::(-e:1):    0
>   DB<1> say 1
> 1
> 
> 
> Tried 5.18 and 5.34, no difference. Should I file a bug?
> 
> 
> TIA,
> 
> M4
> 
> 
> 

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