This is manual for PDE version 0.01
© 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
Indices
PDE is a collection of emacs lisp extensions to facilitate perl programming. cperl-mode has provided a excellent environment for coding, here PDE provides other common tools, such as creating file using template, smart compiling, perldoc, perltidy, debugger, tags tree view and so on. PDE also provides an easy configuration for perl programing, and a tutorial for novice to start using emacs.
This manual tries to describe the feature of each emacs lisp file provided and to be the guide for those who want to use them.
Installing PDE is quit easy. When you download the archive of the PDE distribution, uncompress the archive to a folder, for example, ~/elisp/pde, then put this to your ~/.emacs:
(add-to-list 'load-path "~/elisp/pde/lisp") (load "pde-load")
That is all what you need to do for a typical installation.
You can also use perl style installation:
./Build.PL ./Build test ./Build ./Build install
Note that test before build, so perl can test whether have emacs in
PATH. The default place to install lisp files is
“$ENV{HOME}/.emacs.d/pde”. You can use option —elispdir tell
perl where to put the lisp files. Note that using this way to install,
you should put ~/elisp/pde to load-path
. So you should add
following to .emacs:
(add-to-list 'load-path "~/elisp/pde") (load "pde-load")
pde-load.el try to provide a default configuration for all
extension included in PDE. The configuration can be sorted by PDE core
features and some recommend personal setting. To disable addtional
features if you don't like, you can set pde-extra-setting
to
nil.
The minimal enable features after load `pde-load' are:
The extra feature including:
The configuration is optimized so that most libraries are loaded when needed.
pde.el try to integrate other libraies to cperl-mode.
First it rearrange key bindings. Some cperl-mode default key bindings
are remap to pde-cperl-map
, so more key bindings can be add to
cperl-mode-map.
cperl-toggle-electric
- Toggle the state of parentheses
doubling in CPerl mode.
cperl-linefeed
- Go to end of line, open a new line and indent
appropriately.
cperl-narrow-to-here-doc
- Narrows editing region to the
HERE-DOC at pos.
cperl-pod-spell
- Spell-check POD documentation.
cperl-invert-if-unless
- Change `if (A) {B}' into `B if A;' etc
(or visa versa) if possible.
cperl-next-interpolated-REx
- Move point to next REx which has
interpolated parts.
cperl-next-interpolated-REx-0
- Move point to next REx which
has interpolated parts without //o.
cperl-next-interpolated-REx-1
- Move point to next REx which
has interpolated parts without //o.
pde-imenu-tree
- Display tree view of imenu.
pde-pod-to-manpage
- View pod in current buffer using woman.
pde-perldoc-tree
- Display pod tree.
perltidy-buffer
- Call perltidy for whole buffer.
perltidy-region
- Tidy perl code in the region.
perltidy-subroutine
- Call perltidy for subroutine at point.
perltidy-dwim
- Perltidy Do What I Mean.
If with prefix argument, just show the result of perltidy.
You can use C-x C-s to save the tidy result.
If region is active call perltidy on the region. If inside
subroutine, call perltidy on the subroutine, otherwise call
perltidy for whole buffer.
inf-perl-send
- If mark active, send region, otherwise send current line
inf-perl-send-line
- Send current line to the perl process.
inf-perl-load-file
- Send whole buffer to process
inf-perl-send-region
- Send region to process.
inf-perl-set-cwd
- Set working directory of interpreter to
current default-directory
inf-perl-send-region-and-go
- Send region and switch to process
buffer
inf-perl-switch-to-perl
- Switch to perl process buffer.
inf-perl-switch-to-end-perl
- Switch to end of perl process buffer.
tabbar-mode can make a tabbar for all buffers. I prefer using ido-mode to switch between buffers. But here I want add a tabbar for a few buffers to group them and make emacs looks like IDE. So that why tabbar-x. See tabbar-x.
ffap is a good command. To use it in cperl-mode to find perl module, need some hack.
indent-region need to mark a region. Not very convenient. So I write a dwim command.
Indent the region between paren. If region selected, indent the region. If character before is a parenthesis(such as "]})>"), indent the region between the parentheses. Useful when you finish a subroutine or a block. Otherwise indent current subroutine. Selected by beginning-of-defun and end-of-defun.
Settings after cperl-mode is loaded or only for buffer that major-mode
is cperl-mode are defined in pde-perl-mode-hook
Hooks to run when enter cperl-mode. It define a new style “PDE”, turn on display information of function on echo area, turn abbrev-mode on, activate perldoc, auto chmod when save perl script but not module or pod, and bind keys.
This key bindings are added:
flymake-mode
- Minor mode to do on-the-fly syntax checking.
perldb-ui
- Debugger with perldb-ui.
perlcritic
- Call perlcritic with current file
run-perl
- Start or switch to interactive perl shell.
The old C-c C-h commands are removed, and make
describe-prefix-bindings work. If you realy need them,
define them in pde-cperl-map
.
pde-vars.el defined some global constant variables. Library related to perl can require it without load other PDE libaries, and user can define one variable for all libaries that use it.
pde-project.el provide several functions relate to project in perl.
Detech root directory of current file. The root directory is that has Makefile.PL or Build.PL or @INC.
The directory contain one of these file will consider as project root. Default is (“Makefile.PL” “Build.PL”)
Derive the package name of current buffer. The buffer should be a pm file.
Recursive read file name in DIR. Like `directory-files', this function can return a list of files in the directory and the subdirectories, but often there are too many files in the directory, so need a parament to limit the number of files to search and a flag to indicate whether all files are read. So instead of return a list of files, this function return a cons cell which car indicate whether all files read and cdr part is the real file list.
if FULL is non-nil, return absolute file names, if match is non-nil, mention only file names match the regexp MATCH. If PREDICATE is non-nil and is a function with one argument, the file name relative to DIR, mention only file when PREDICATE function return non-nil value. If LIMIT is non-nil, when the files execeed the number will stop. The function is search in wide-first manner.
— Command: pde-project-find-file
Find file in the project. This command is will read all file in current project recursively. With prefix argument, to rebuild the cache. I suggest bind this command to C-x C-p, which original command is mark-page seldom used by me.
— User Option: pde-file-list-regexp
Filenames matching this regexp will not be read when `pde-project-find-file'.
pde-abbv.el contains a few abbrevs that I think helpful. You can send me your abbrev if you think it is handy. I appreciate for that.
pde-util provides several commands that might be useful.
The commands above call perl module PDE::Util to generate the module lists. If the module can found in @INC or
pde-load-path
parent directory, set this variable to let perl found the module.
template.el is exists, why template-simple? First of all, it is
simple, the there is only one core function template-compile
.
The parsed template contains a list of strings, symbols or lisp forms.
The strings is inserted directly.
The symbol can be a predefined value in template-default-alist
,
or can be translate by template-expand-function
. The lisp forms
is handled by template-expand-function
.
Functions to expand parsed template. There are two candicate functions available in template-simple:
template-skeleton-expand
andtemplate-tempo-expand
. Default function istemplate-tempo-expand
, because I think tempo provide more fetures and flexibility than skeleton.
Define a new type of
template-expand-function
. NAME is used to create a function template-<NAME>-expand. ALIST can be a symbol or a form to return a list of symbol table add totemplate-default-alist
. BODY is the code to expand and insert the template. the value of variable TEMPLATE is the translated template. The element of parsed template is translated bytemplate-expansion
Expand template in file. Parse the template to parsed templates with
template-compile
. Usetemplate-expand-function
to expand the parsed template.
Expand string template. template can be a string or a parsed template. If it is string, parse the template to parsed templates with
template-compile
. Usetemplate-expand-function
to expand the parsed template.
template-simple is designed to compatible to template.el, so the
default open and close parentheses is “(>>>” and “<<<)”. Note that
global value of template-expand-function
is saved in
template-simple-expand
. The same case happened to
template-parens
in template-compile
. So If you need
change them temporary for certain template, you can set
template-parens
and template-expand-function
like file
variable, for example:
(template-simple-expand ";; -*- template-parens: (\"{\" . \"}\"); template-expand-function: template-tempo-expand -*- (defun {p} ({p}) \"{p}\" {p} )")
This will expand by template-tempo-expand
but not default
expand function. Luckily in most case, template of tempo and skeleton
can be the same, so you don't have to set
template-expand-function
. If your template uses element that
only exists in tempo or skeleton, you'd better set it in template to
make sure the template-simple-expand
select the correct one.
The major purpose of template-simple is used for fill empty file using predefined template.
A list of directories for lookup template files. Default is “~/.templates/” and
auto-insert-directory
.
Find proper template for current file. The template file is a file with name “TEMPLATE” and the same extension of current file under
template-directory
. You can add a suffix “.tpl” to the template file name too, just for compatible with templates provide by template.el. If the file didn't have extension, the template file's extension is current file name, for example, “TEMPLATE.Makefile” is template file for “Makefile”.
Predefined symbol for template file. Symbols to lookup in this table is case insensitive.
Here is a list of predefined symbol:
template-date-format
template-cdate-format
with system-time-locale
value is “C”
template-time-format
A neat function provided by template.el is the file name in the header can automatic update when the file is renamed. template-simple also provide this feature.
update file header when needed. The file header is a line match
template-header-regexp
at first 3 lines in current file.
A typical file header is like:
;;; file-name --- short description
or
/* @(#)file-name short description */
Sometimes, make tabbar for particular buffers maybe cool. For example, I add tabbar for only perl related buffers, *Perldoc*, *PDE Imenu*, and I am planning to group perldb-ui buffers as the same way. tabbar-x exists for this purpose.
tempo.el is a extensible library for abbrevs. It provide more features than skeleton.el, such as move between marks, names for prompt, user elements and so on. tempo-x.el provides some commands and additional elements that may helpful.
A simple command to enable expand tempo like abbrev. The command
tempo-space
given by the author of tempo.el is not compatiable for abbrev-mode.
Reinstall new tempo template for all buffer. If you defined a new tempo-template in certain tag-list, you can't use it intermediately. Call the commands to force build connections for all buffer again.
Here is a list of new elements:
“pi” and “Pi” like standard tempo element “p” except they can have a default value and can be completing read.
The beta version of tempo.el also implement new prompt element, but I still an element that can accept default value. PROMPT can be a string or a list. When it is a string, it is like standard tempo element
p
, but you can give a DEFAULT string. If it is a list, the prompt will be the parameters ofcompleting-read
. But you should give the default value in DEFAULT not in PROMPT.Here is some example:
(pi "variable: " "foo" var) (pi ("variable: " ("foo" "bar")) "foo" var)
skeleton has some handy elements to control recursive expanding. “R” is such tempo elements to do this job. The syntax of the element is:
(R before-test-elements (& condition final-form) after-test-elements)
First it insert BEFORE-TEST-ELEMENTS to buffer. then test the
CONDITION, if the CONDITION is null, eval FINAL-FORM and quit the
loop. Otherwise insert AFTER-TEST-ELEMENTS and back to start. The
CONDITION can be a name saved in BEFORE-TEST-ELEMENTS, it will
automatic clean after test, so you will be prompt again. If you want
use it after test, backup it by yourself. The CONDITION also can be a
list, which CAR is a list of names will be used and will be clean
after test.
A special variable recursion-start
is available is FINAL-FORM,
you can use it to clean up recent insertion in BEFORE-TEST-ELEMENTS.
Here is a example to show how to use it:
(tempo-define-template "sh-if" '("if " (pi "condition: " ("[ ]" . 3)) "; then" > n> p > n> (R "elif " (pi "condition: " ("[ ]" . 3) condition) (& ((condition) (string-match "\\[\\s-*]" condition)) (delete-region recursion-start (point))) "; then" > n> p > n>) "else" > n> p n> "fi" > n>))
Try it by M-x tempo-template-sh-if in sh-mode.
If you want use this only, you can try tempo-snippets.el
,
tempo-x.el
borrow most of functions from there to implement a
new element instead of new template style.
“snippet” enable visualize the template field, and can update form when editing. The syntax of “snippet” is:
(snippet (S name &optional display insert) (F (vars) forms))
“S” insert a field, the first NAME will be the source and other field with the same NAME become mirrors. Change the source will also change mirrors. DISPLAY is the text to insert to the field, default is the `symbol-name' of NAME. INSERT is non-nil means the DISPLAY is the default text, you can make change to the text. Otherwise the text will be erase after any changes in front of field.
“F” insert an form. The VARS is a list of NAME used in fields. the evaled result will insert into the buffer. When any fields in VARS changed, the text of form will change too.
A example will show how to use it easier:
(tempo-define-template "perl-open" '((snippet "open(" (S FH "my $fh" t) ", \"" (S op "<") "\", " (S file "$file") ") or die \"Can't " (F (op) (if (string-match ">" op) "create" "open")) " file " (F (file) (replace-regexp-in-string "['\"]?\\(.*\\)['\"]" "\\1" file)) ": $!\";" n>)))
After expand the template, insert string like:
open([my $fh], "[<]", [$file]) or die "Can't {open} file {$file}: $!";
the text inside “[]” indicate as a field, and text inside “{}” indicate as a form, the when text inside the field changes, the assicated form will update too. For example if you change open mode from “<” to “>”, the form “open” will change to “create”. If change “$file” to “"file"” the form will change to “file” with quote removed.
If you have not use re-builder, please try it. The tool is quite simple and useful, you just input regexp in the *RE-Builder* buffer, the matched part in the buffer where the command is called will be highlighted.
re-builder-x.el extend the regexp syntax to perl or any other languages. To enable perl regexp syntax, you have to change the syntax to perl first. The command is reb-change-syntax, which is bound to C-c TAB.
In consideration of efficiency, if you make some changes in the buffer, the regexp will not apply in the new text unless you send current buffer to perl process again. You can do that by using command reb-perl-send-buffer which bound to C-c C-a.
All commands for re-builder are available for perl syntax.
cperl-mode recommend using mode-compile, but I don't like mode-compile. Instead, smart-compile+.el does a good job. But I found it is not easy to customize smart-compile+, because the user variables are separated for a language. So I rewrite it to compile-dwim(again, I like dwim).
Settings for certain file type. A list like which has form (TYPE CONDITION COMPILE-COMMAND RUN-COMMAND EXE-FILE).
TYPE is the language type to distinguish from others.
CONDITION is a list of predicates constituted by operator “or”. The predicates can be (name . REGEXP) or (mode . MAJOR-MODE) to test the file name match REGEXP or major-mode eq MAJOR-MODE.
In COMPILE-COMMAND and RUN-COMMAND, these format specifications are available:
%i interpreter name %F absolute pathname %f file name without directory %n file name without extention %e extention of file nameThe interpreter is the program in the shebang line. If the program is valid(test with `executable-find'), then use this program, otherwise, use interpreter in `interpreter-mode-alist' according to the major mode.
EXE-FILE control whether should run compile command before actual run or should recompile again because EXE-FILE is older than source file. Usually, script language don't need to set EXE-FILE.
Whether checking makefile or ant or else. Default is turn on. You can also change the value locally by
make-local-variable
in mode-hook for certain files.
A big obstacle for novice to used to emacs is that there are so many keys to remember. I like dwim commands. help-dwim.el provide a single command as interface for several kinds of document commands, such as describe-function, describe-variable, woman. And you can add more if you follow the rules.
A type of help-dwim commands should provide:
Register a new type of help command. An new type has a form (TYPE . [FINDER OBARRAY PREDICATE HANDLER]). If ACTIVATE is non-nil, the type will add to
help-dwim-active-type
, and BODY will eval intermediately. BODY is the code to eval when the type is activated. If the type is register without activated, the BODY will add tohelp-dwim-autoloads
. When you usehelp-dwim-active-type
orhelp-dwim-customize-type
add the type, the code will also eval then.
Active a type for current buffer *ONLY*. The TYPE will gain a highest prority unless APPEND is non-nil.
I like “woman”(that is WithOut MAN). perldoc.el make it possible to
view perl document without man. To use it with help-dwim
, a
list of modules is build automatic using a perl script
perldoc-cache.pl. The cache can be update automaticly. It is
configured in pde-load. See pde-load.
If the cache file is expired DAYS, force caches update.
With the perldoc-obarray
, a lot of things can be done.
perldoc-tree use this obarray to build a tree view.
Read a perl module name. When a module name at point, the module become the default input. Don't add ": " in PROMPT.
Find the file of perl module. With prefix argument open the file in other window.
Find the module under point without prompt. With prefix argument open the file in other window.
Find the module under point in other window without prompt.
This is orignal a demo for help-dwim. Useful if you are writing XS.
Directory where the Perl source files can be found. If setted, the definition of the symbol can be found when put the button in the document.
Emacs can save window configuration when it is running. The configuration can be persisted between different sessions. windata provide a way to save window configuration.
Convert window configurate to a list. The CAR part of the list describe how to restore the window, the CDR part of the list determine which window is selected.
Restore window configuration from `windata-current-winconf'. When INSIDE-P is non-nil, that mean the window configuration is restore in current window, that is to say don't delete other windows before restore the configuration.
A function to extract data for future restore window. Default is save the window buffer name. Accept one parameter, the window, and should return a lisp object that has print syntax.
A function to restore window buffer from saved data. Default is set window buffer to the buffer with saved name. Accept two parameters, the window and a saved lisp object by
windata-data-function
.
Display buffer more precisely. FRAME-P is non-nil and not window, the displayed buffer affect the whole frame, that is to say, if DIR is right or left, the displayed buffer will show on the right or left in the frame. If it is nil, the buf will share space with current window.
DIR can be one of member of (right left top bottom).
SIZE is the displayed windowed size in width(if DIR is left or right) or height(DIR is top or bottom). It can be a decimal which will stand for percentage of window(frame) width(heigth)
DELETE-P is non-nil, the other window will be deleted before display the BUF.
The behavior of windata-display-buffer
is better show as
following pictures:
(setq buf (get-buffer "*Messages*")) (windata-display-buffer buf 'window 'top 0.3 nil) ; 2 (windata-display-buffer buf 'window 'bottom 0.3 nil) ; 3 (windata-display-buffer buf 'window 'left 0.3 nil) ; 4 (windata-display-buffer buf 'window 'right 0.3 nil) ; 5 (windata-display-buffer buf 'frame 'top 0.3 nil) ; 6 (windata-display-buffer buf 'frame 'bottom 0.3 nil) ; 7 (windata-display-buffer buf 'frame 'left 0.3 nil) ; 8 (windata-display-buffer buf 'frame 'right 0.3 nil) ; 9 ;; when delete-p is presented, FRAME-P make no sense. (windata-display-buffer buf 'frame 'top 0.3 t) ; 10 (windata-display-buffer buf 'frame 'bottom 0.3 t) ; 11 (windata-display-buffer buf 'frame 'left 0.3 t) ; 12 (windata-display-buffer buf 'frame 'right 0.3 t) ; 13 (windata-display-buffer buf 'window 'top 0.3 t) ; 10 (windata-display-buffer buf 'window 'bottom 0.3 t) ; 11 (windata-display-buffer buf 'window 'left 0.3 t) ; 12 (windata-display-buffer buf 'window 'right 0.3 t) ; 13
+------+-------+ +------+-------+ +------+-------+ | | | | | N | | | | | | P | | |-------+ | | P | | | | | | P | | | | | | | | | | | +-------+ | | | | | | | | N | +------+-------+ +------+-------+ +------+-------+ (1) (2) (3) +------+--+----+ +------+----+--+ +--------------+ | | | | | | | | | N | | |N | P | | | P |N | +------+-------+ | | | | | | | | | | | | | | | | | | | | | P | | | | | | | | | | | | +------+--+----+ +------+----+--+ +------+-------+ (4) (5) (6) +------+-------+ +---+-----+----+ +----+----+----+ | | | | | | | | | | | | | P | | N | | | | | | | | | | | | | P | | | P | N | +------+-------+ | | | | | | | | | N | | | | | | | | | +--------------+ +---+-----+----+ +----+----+----+ (7) (8) (9) +--------------+ +--------------+ +----+---------+ | N | | | | | | +--------------+ | P | | N | P | | P | | | | | | | | +--------------+ | | | | | | N | | | | +--------------+ +--------------+ +----+---------+ (10) (11) (12) +----------+---+ | | | | P | N | | | | | | | | | | +----------+---+ (13)
The start window is as picture 1, the selected window is indicated by “P”, and new appear window indicated by “N”. The simplest sitiation is when DELETE-P is non-nil, after calling the function, there are only two window left. When FRAME-P is 'window or nil, the new window will only take the space from the selected window. When FRAME-P is non-nil except 'window, the original window still has the same configuration.
tree-mode.el provide more commands to tree-widget.
tree-mode-next-node
- Move to next node.
tree-mode-previous-node
- Move to previous node
tree-mode-next-sib
- Move to next sibling node.
tree-mode-previous-sib
- Move to previous sibling node.
tree-mode-goto-parent
- Move to parent node.
tree-mode-goto-root
- Move to root node
tree-mode-reflesh
- Reflesh parent tree. useful restore after
sort or delete node
tree-mode-toggle-expand
- Expand or contract tree at point.
With prefix argument, expand the tree.
tree-mode-expand-level
- Expand tree to LEVEL. With prefix
argument 0 or negative, will expand all leaves of the tree.
tree-mode-sort-by-tag
- Sort children node by tag.
tree-mode-keep-match
- Keep node which tag match REGEXP
tree-mode-collapse-other-except
- Collapse other trees. If the
tree at point is contract, expand it.
tree-mode-delete-tree
- Delete a tree from buffer.
The icon for push-button in tree-widget is limited 4 types: open, close, empty and leaf. tree-mode provide a method to settup icon of push-button by put an addition attribute :button-icon in tree-widget node.
imenu provide an excellent code navigating method. imenu-tree.el make the tags visualized using tree-widget.
If Non-nil, the imenu-tree will update automaticly. Also, if the imenu-tree is not visible in the window, it will automaticly scroll to make it visible.
Toggle imenu-tree auto update. With prefix argument, turn on auto update.
A function to group imenu-tree to various buffer. Default is nil, means using only one buffer.
Arguments to set the window buffer display. See
windata-display-buffer
for setup the arguments.
tags-tree.el read TAGS file and display them using tree-widget.
A function to group tags-tree to various buffer. Default is nil, means using only one buffer.
A function to group files. Accept one parameter, a file list in TAGS file. Return a tree like:
("Root name" ("Group1" ("file1" . "full name of file1")) ("Group2" ("subgroup" ("file2" . "full name of file2"))))Default is tags-tree-group-file-by-name, Which group all files according to file path.
A function to group tags. Accept one parameter, a list of tags info, return a tree like:
((("group1") (("subgroup1") ("tag1" . tag-info)) ("tag2" . tag-info)) (("group2") ("tag3" . tag-info)))Default is tags-tree-group-tags which group by
tags-tree-group-tags-expression
which much likeimenu-generic-expression
.
The TAGS file can be update by extern file when in tags-tree.
Program to update TAGS for a file. Default is myetags which is written using perl.
A collection of commands to call perltidy on buffer or region. See pde.
“perlcritic” is a Perl source code analyzer. See perldoc perlcritic for detail document of the program. perlcritic.el provide an interface to use “perlcritic” in Emacs. It invoke the program using compile, highlight severity and add hyperlink to the error.
Call perlcritic interactive. You can give your argments in the minibuffer. Default perform analyzing current visited file.
perlcritic is known run a little slow. You can use this command to analyze only a part of file.
perlcritic provide a lot of options in command line. perlcritic.el only support a few of options. Additional options can be input in the minibuffer or write your profile, default is .perlcriticrc.
Specify an alternate .perlcriticrc file. If value is nil, use -noprofile, If value is t, use the default profile .perlcriticrc, If non-nil, and the profile exists, use the profile.
Default severity level is 5 and perlcritic-severity value is nil.
Report only the top N Policy violations in each file. If the -severity option is not explicitly given, the -top option implies that the minimum severity level is 1. Users can redefine the severity for any Policy in their .perlcriticrc file.
Directs “perlcritic” to apply additional Policies that match the regex “/PATTERN/imx”.
Directs “perlcritic” to not apply any Policy that matches the regex “/PATTERN/imx”.
perldb provide the minimal debugger interface in emacs. perldb-ui.el try to extend it more like gdb-ui. Not finished yet. But all interface will not change too much in future.
The main idea to communicate with perldb process is using .perldb to add a batch of subroutines to call in emacs. With those subroutines, it is easier to get information from the process.
Non-nil means display output from the debugged program in a separate buffer.
Toggle the number of windows in the basic arrangement. With arg, display additional buffers iff arg is positive.
Restore the basic arrangement of windows used by perldb-ui. This arrangement depends on the value of `perldb-many-windows'.
Save current window configuration as default. With prefix argument, just setup for current session.
perl5db provides a convenient command line interface. Most case, it is more quick using command than calling an emacs command. If you want control debugger in source buffer, maybe turn on perldb-gud-mode is a good choice.
gud-next
- Step one line (skip functions).
gud-next
- Step one line (skip functions).
gud-step
- Step one source line with display.
gud-until
- Continue to current line.
gud-return
- Return from current subroutine.
gud-cont
- Continue with display.
gud-break
- Set breakpoint at current line.
gud-remove
- Remove breakpoint at current line
gud-print
- Evaluate perl expression at point.
gud-dump
- Dumper data
gud-refresh
- Fix up a possibly garbled display, and redraw the
arrow.
perldb-gud-mode
- quit perldb-gud-mode.
Know Bugs
An interactive shell is easier to prove some simple idea or check a piece of code. Also it is easier to debug or learn certain module without write, save, run.
Actually, a perl -de 1 is a good interactive shell. But I'd rather use a simple, but easier to customize and extend, shell.
The location of interactive shell program. Default is psh.pl. You can change it to “-de 1” if you want it be a debugger or gtksh.pl if you want develop with Gtk2-Perl.
lexcial variable can not live after eval. So when this option turn on, when send one line code to process, the my declaration at beginning of line will be removed. The variable(s) will become global.
For key bindings in cperl-mode, See pde.
define-template-expander
: template-simpleflymake-mode
: pdegud-break
: perldb-uigud-cont
: perldb-uigud-dump
: perldb-uigud-next
: perldb-uigud-print
: perldb-uigud-refresh
: perldb-uigud-remove
: perldb-uigud-return
: perldb-uigud-step
: perldb-uigud-until
: perldb-uihelp-dwim-active-type
: help-dwimhelp-dwim-customize-type
: help-dwimhelp-dwim-register
: help-dwimimenu-tree-toggle-auto-update
: imenu-treeinf-perl-load-file
: pdeinf-perl-send
: pdeinf-perl-send-line
: pdeinf-perl-send-region
: pdeinf-perl-send-region-and-go
: pdeinf-perl-set-cwd
: pdeinf-perl-switch-to-end-perl
: pdeinf-perl-switch-to-perl
: pdepde-detect-project-root
: pde-projectpde-directory-all-files
: pde-projectpde-ffap-locate
: pdepde-file-package
: pde-projectpde-imenu-tree
: pdepde-indent-dwim
: pdepde-list-core-modules
: pde-utilpde-list-module-shadows
: pde-utilpde-perl-mode-hook
: pdepde-perldoc-tree
: pdepde-pod-to-manpage
: pdepde-project-find-file
: pde-projectpde-search-cpan
: pde-utilpde-set-project-root
: pde-projectpde-tabbar-register
: pdeperlcritic
: perlcriticperlcritic
: pdeperlcritic-region
: perlcriticperldb-gud-mode
: perldb-uiperldb-many-windows
: perldb-uiperldb-restore-windows
: perldb-uiperldb-save-window-configuration
: perldb-uiperldb-ui
: pdeperldoc-find-module
: perldocperldoc-find-module-ap
: perldocperldoc-find-module-other-window
: perldocperldoc-read-module
: perldocperldoc-recache-everyday
: perldocperltidy-buffer
: pdeperltidy-dwim
: pdeperltidy-region
: pdeperltidy-subroutine
: pderun-perl
: pdetabbar-x-register
: tabbar-xtags-tree-update-file
: tags-treetemplate-compile
: template-simpletemplate-derive-template
: template-simpletemplate-simple-expand
: template-simpletemplate-simple-expand-template
: template-simpletemplate-simple-update-header
: template-simpletempo-x-insert-prompt
: tempo-xtempo-x-rebuild
: tempo-xtempo-x-space
: tempo-xtempo-x-test-template
: tempo-xtree-mode-collapse-other-except
: tree-modetree-mode-delete-tree
: tree-modetree-mode-expand-level
: tree-modetree-mode-goto-parent
: tree-modetree-mode-goto-root
: tree-modetree-mode-keep-match
: tree-modetree-mode-next-node
: tree-modetree-mode-next-sib
: tree-modetree-mode-previous-node
: tree-modetree-mode-previous-sib
: tree-modetree-mode-reflesh
: tree-modetree-mode-sort-by-tag
: tree-modetree-mode-toggle-expand
: tree-modewindata-current-winconf
: windatawindata-display-buffer
: windatawindata-name-winconf
: windatawindata-restore-named-winconf
: windatawindata-restore-winconf
: windatacompile-dwim-alist
: compile-dwimcompile-dwim-check-tools
: compile-dwimimenu-tree-auto-update
: imenu-treeimenu-tree-create-buffer-function
: imenu-treeimenu-tree-name
: imenu-treeimenu-tree-update-interval
: imenu-treeimenu-tree-windata
: imenu-treeinf-perl-options
: inf-perlinf-perl-remove-my
: inf-perlinf-perl-shell-program
: inf-perlinf-perl-start-file
: inf-perlpde-cperl-map
: pdepde-cperl-prefix
: pdepde-extra-setting
: pde-loadpde-file-list-limit
: pde-projectpde-file-list-predicate-function
: pde-projectpde-file-list-regexp
: pde-projectpde-inf-perl-map
: pdepde-inf-perl-prefix
: pdepde-module-location
: pde-utilpde-perltidy-map
: pdepde-perltidy-prefix
: pdepde-project-mark-files
: pde-projectpde-view-map
: pdepde-view-prefix
: pdeperlapi-src-directory
: perlapiperlcritic-exclude
: perlcriticperlcritic-include
: perlcriticperlcritic-profile
: perlcriticperlcritic-severity
: perlcriticperlcritic-top
: perlcriticperldb-many-windows
: perldb-uiperldb-use-separate-io-buffer
: perldb-uitags-tree-create-buffer-function
: tags-treetags-tree-group-file-function
: tags-treetags-tree-group-tags-function
: tags-treetags-tree-tags-update-program
: tags-treetemplate-default-alist
: template-simpletemplate-directory-list
: template-simpletemplate-expand-function
: template-simplewindata-data-function
: windatawindata-data-restore-function
: windata! (tree-mode-collapse-other-except)
: tree-mode/ (tree-mode-keep-match)
: tree-modeb (gud-break)
: perldb-uic (gud-cont)
: perldb-uiC-b (perltidy-buffer)
: pdeC-c C-d (perldb-ui)
: pdeC-c C-f (flymake-mode)
: pdeC-c C-k (perlcritic)
: pdeC-c C-z (run-perl)
: pdeC-e (cperl-toggle-electric)
: pdeC-e (inf-perl-send)
: pdeC-i (pde-imenu-tree)
: pdeC-j (cperl-linefeed)
: pdeC-j (inf-perl-send-line)
: pdeC-l (inf-perl-load-file)
: pdeC-m (pde-pod-to-manpage)
: pdeC-n (cperl-narrow-to-here-doc)
: pdeC-p (cperl-pod-spell)
: pdeC-p (pde-perldoc-tree)
: pdeC-r (inf-perl-send-region)
: pdeC-r (perltidy-region)
: pdeC-s (inf-perl-set-cwd)
: pdeC-s (perltidy-subroutine)
: pdeC-t (cperl-invert-if-unless)
: pdeC-t (perltidy-dwim)
: pdeC-v (cperl-next-interpolated-REx)
: pdeC-x (cperl-next-interpolated-REx-0)
: pdeC-y (cperl-next-interpolated-REx-1)
: pdeC-y (inf-perl-switch-to-perl)
: pdeC-z (inf-perl-switch-to-end-perl)
: pded (gud-remove)
: perldb-uiD (tree-mode-delete-tree)
: tree-modeE (tree-mode-expand-level)
: tree-modee (tree-mode-toggle-expand)
: tree-modeG (tags-tree-update-file)
: tags-treeg (tree-mode-reflesh)
: tree-modej (tree-mode-next-sib)
: tree-modek (tree-mode-previous-sib)
: tree-model (gud-refresh)
: perldb-uiM-r (inf-perl-send-region-and-go)
: pden (gud-next)
: perldb-uin (tree-mode-next-node)
: tree-modep (gud-print)
: perldb-uip (tree-mode-previous-node)
: tree-modeq (perldb-gud-mode)
: perldb-uir (gud-return)
: perldb-uir (tree-mode-goto-root)
: tree-modes (gud-step)
: perldb-uis (tree-mode-sort-by-tag)
: tree-modeSPC (gud-next)
: perldb-uiu (gud-until)
: perldb-uiu (tree-mode-goto-parent)
: tree-modex (gud-dump)
: perldb-ui