1 ;;; Copyright (C) 2011, 2014-2015 Rocky Bernstein <rocky@gnu.org>
2 ;; `perldb' Main interface to perl debugger via Emacs
3 (require 'load-relative)
4 (require-relative-list '("../../common/helper") "realgud-")
5 (require-relative-list '("../../common/run") "realgud:")
6 (require-relative-list '("core" "track-mode") "realgud:perldb-")
8 (declare-function realgud:run-debugger 'realgud:run)
10 ;; This is needed, or at least the docstring part of it is needed to
11 ;; get the customization menu to work in Emacs 24.
12 (defgroup realgud:perldb nil
13 "The realgud interface to the Perl debugger, perldb"
17 ;; -------------------------------------------------------------------
18 ;; User-definable variables
21 (defcustom realgud:perldb-command-name
23 "Option to needed to run the Perl debugger"
25 :group 'realgud:perldb)
27 ;; -------------------------------------------------------------------
31 (declare-function perldb-track-mode (bool))
32 (declare-function realgud:perldb-query-cmdline 'realgud:perldb-core)
33 (declare-function realgud:perldb-parse-cmd-args 'realgud:perldb-core)
36 (defun realgud:perldb (&optional opt-cmd-line no-reset)
37 "Invoke the Perl debugger and start the Emacs user interface.
39 String OPT-CMD-LINE specifies how to run nodejs.
41 OPT-CMD-LINE is treated like a shell string; arguments are
42 tokenized by `split-string-and-unquote'. The tokenized string is
43 parsed by `perldb-parse-cmd-args' and path elements found by that
44 are expanded using `realgud:expand-file-name-if-exists'.
46 Normally, command buffers are reused when the same debugger is
47 reinvoked inside a command buffer with a similar command. If we
48 discover that the buffer has prior command-buffer information and
49 NO-RESET is nil, then that information which may point into other
50 buffers and source buffers which may contain marks and fringe or
51 marginal icons is reset. See `loc-changes-clear-buffer' to clear
52 fringe and marginal icons.
55 (realgud:run-debugger "perldb"
56 'realgud:perldb-query-cmdline
57 'realgud:perldb-parse-cmd-args
58 'realgud:perldb-minibuffer-history
59 opt-cmd-line no-reset))
61 (defalias 'perl5db 'realgud:perldb)
62 ;; (defalias 'perldb 'realgud:perldb)
64 (provide-me "realgud-")