If given a prefix, it will query the user for an argument to use for
the run/continue command.
+---
+*** 'perldb' now recognizes '-E'
+As of Perl 5.10, 'perl -E 0' behaves like 'perl -e 0' but also activates
+all optional features of the Perl version in use. 'perldb' now uses
+this invocation as its default.
+
** Customize
---
(seen-e nil)
(shift (lambda () (push (pop args) new-args))))
- ;; Pass all switches and -e scripts through.
+ ;; Pass all switches and -E/-e scripts through.
(while (and args
(string-match "^-" (car args))
(not (equal "-" (car args)))
(not (equal "--" (car args))))
- (when (equal "-e" (car args))
+ (when (or (equal "-E" (car args)) (equal "-e" (car args)))
;; -e goes with the next arg, so shift one extra.
- (or (funcall shift)
- ;; -e as the last arg is an error in Perl.
- (error "No code specified for -e"))
+ (funcall shift)
+ (or args
+ ;; -E (or -e) as the last arg is an error in Perl.
+ (error "No code specified for %s" (car new-args)))
(setq seen-e t))
(funcall shift))
working directory and source-file directory for your debugger."
(interactive
(list (gud-query-cmdline 'perldb
- (concat (or (buffer-file-name) "-e 0") " "))))
+ (concat (or (buffer-file-name) "-E 0") " "))))
(gud-common-init command-line 'gud-perldb-massage-args
'gud-perldb-marker-filter)