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

Re: Difference -de0 and -e

Thread Previous | Thread Next
From:
Michiel Beijen
Date:
August 8, 2022 20:36
Subject:
Re: Difference -de0 and -e
Message ID:
8317D64F-11C5-464A-A858-896420B79FDB@x14.nl


> Op 8 aug. 2022, om 22:27 heeft Ricardo Signes <perl.p5p@rjbs.manxome.org> het volgende geschreven:
> 
> 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

Also consider that the debugger ’shell’ has ’say’, but when you ask the debugger to execute code, at that point there is no ’say’:

[~/p/perl5 (blead)]$ perl -de 'say 1'

Loading DB routines from perl5db.pl version 1.55
Editor support available.

Enter h or 'h h' for help, or 'man perldebug' for more help.

Number found where operator expected at -e line 1, near "say 1"
 at -e line 1.
	(Do you need to predeclare say?)
 at -e line 1.
syntax error at -e line 1, near "say 1"
Execution of -e aborted due to compilation errors.
 at -e line 1.
Debugged program terminated.  Use q to quit or R to restart,
use o inhibit_exit to avoid stopping after program termination,
h q, h R or h o to get additional info.
  DB<1> say 1
1


—
Michiel


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