-
-
25 Feb 2008 22:46:25 UTC
- Distribution: Devel-Command
- Module version: 0.11
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (0)
- Testers (702 / 0 / 2)
- Kwalitee
Bus factor: 1- 3.38% Coverage
- License: unknown
- Activity
24 month- Tools
- Download (50.55KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Module::Pluggable
- Test::More
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- NAME
- SYNOPSIS
- DESCRIPTION
- ROUTINES
- EXPORTED INTO PLUGINS
- INHERITED BY SUBCLASSES
- SEE ALSO
- AUTHOR
- COPYRIGHT AND LICENSE
NAME
Devel::Command - Perl extension to automatically load and register debugger command extensions
SYNOPSIS
# in .perldb: use Devel::Command; sub afterinit { Devel::Command->install; }
DESCRIPTION
Devel::Command
provides a simple means to extend the Perl debugger with custom commands. It usesModule::Pluggable
to locate the command modules, and installs these into a debugger global (%DB::commands
).It then searches the
Devel::Command::DBSub
namespace to locate an appropriate debugger patch plugin and installs it to enable the new commands.ROUTINES
import
import
finds all of the command plugins for this package (i.e., any module in theDevel::Command::
namespace), calls the module'ssignature
method to get the name of the command and its entry point, and then exports oureval
subroutine into the command's namespace.Finally, it overrides the debugger's
DB::DB()
subroutine with the proper patched version of that routine by calling theimport()
routine in each of theDB
plugins in ascending version order; the last one that returns a subroutine reference is used.cmds
A new debugger command to list the commands installed by
Devel::Command
.afterinit
Does any necessary initialization for a debugger command module. Gets run after the debugger has initialized, but before the initial prompt. Calls the
afterinit
subroutine in each command plugin's namespace.EXPORTED INTO PLUGINS
eval
This routine is explicitly exported into the plugins so that they can call the debugger's
eval
routinei without having to fiddle with the bizarre calling sequence used by the debugger.INHERITED BY SUBCLASSES
signature
The
signature
method is common to all subclasses and is needed to handle the interfacing to this module. The default method (this one) returns a best-guess name for the command (by downcasing the last qualifier of the fully-qualified package name) and a reference to thecommand()
subroutine in the command package itself.Note that subclasses are free to override this method and do anything they please as long as the overrding method returns a command name and a subroutine reference to the code to be used to perform the command.
SEE ALSO
perl5db.pl
, notably the documentation for theDB::DB
subroutine in more recent Perls (5.8.1 and later).AUTHOR
Joe McMahon, <mcmahon@ibiblio.org>
COPYRIGHT AND LICENSE
Copyright (C) 2005 by Joe McMahon
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
Module Install Instructions
To install Devel::Command, copy and paste the appropriate command in to your terminal.
cpanm Devel::Command
perl -MCPAN -e shell install Devel::Command
For more information on module installation, please visit the detailed CPAN module installation guide.