forked from Ovid/DB-Pluggable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
112 lines (83 loc) · 3.48 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
NAME
DB::Pluggable - Add plugin support for the Perl debugger
VERSION
version 1.111751
SYNOPSIS
$ cat ~/.perldb
use DB::Pluggable;
DB::Pluggable->run_with_config(\<<EOINI)
[BreakOnTestNumber]
[TypeAhead]
type = {l
type = c
ifenv = DBTYPEAHEAD
[StackTraceAsHTML]
[DataPrinter]
EOINI
Then:
$ perl -d foo.pl
DESCRIPTION
This class adds plugin support to the Perl debugger. It is based on
Brickyard, so see its documentation for details.
You need to have a "~/.perldb" file (see perldebug for details) that
invokes the plugin mechanism.
Plugins should live in the "DB::Pluggable::Plugin::" namespace, like
DB::Pluggable::Plugin::BreakOnTestNumber does.
METHODS
run_with_config
Convenience class method to create, initialize and run the plugin system
with the given configuration file or scalar reference.
plugins_with
Like the method with the same name in Brickyard.
init_from_config
Like the method with the same name in Brickyard.
enable_watchfunction
Tells the debugger to call "DB::watchfunction()", which in turn calls
the "watchfunction()" method of all plugins that consume the
"-WatchFunction" role.
run
This method just calls the "initialize()" method of all plugins that
consume the "-Initializer" role.
Plugin Phases
This class is very much in beta, so it's more like a proof of concept.
Therefore, not all roles - which more or less correspond to plugin
phases - imaginable have been added, only the ones to make this demo
work. If you want more roles or if the current roles don't work for you,
let me know.
The following roles exist:
"-Initializer"
See DB::Pluggable::Role::Initializer.
"-WatchFunction"
See DB::Pluggable::Role::WatchFunction.
"-AfterInit"
See DB::Pluggable::Role::AfterInit.
"-Eval"
See DB::Pluggable::Role::Eval. The debugger's "eval()" function is
overridden so we can make it pluggable. Each plugin will get a
chance to inspect the command line, which is the last line in
$DB::evalarg and act on it. The plugin can return a code reference
which will be executed after the original "DB::eval()" function has
finished. Using the code reference you can undo any temporary
changes you might have introduced to make your command work.
INSTALLATION
See perlmodinstall for information and options on installing Perl
modules.
BUGS AND LIMITATIONS
No bugs have been reported.
Please report any bugs or feature requests through the web interface at
<http://rt.cpan.org/Public/Dist/Display.html?Name=DB-Pluggable>.
AVAILABILITY
The latest version of this module is available from the Comprehensive
Perl Archive Network (CPAN). Visit <http://www.perl.com/CPAN/> to find a
CPAN site near you, or see <http://search.cpan.org/dist/DB-Pluggable/>.
The development version lives at
<http://github.com/hanekomu/DB-Pluggable> and may be cloned from
<git://github.com/hanekomu/DB-Pluggable.git>. Instead of sending
patches, please fork this project using the standard git and github
infrastructure.
AUTHOR
Marcel Gruenauer <[email protected]>
COPYRIGHT AND LICENSE
This software is copyright (c) 2008 by Marcel Gruenauer.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.