README
1NAME
2 POE::Component::DebugShell - Component to allow interactive peeking into
3 a running POE application
4
5SYNOPSIS
6 use POE::Component::DebugShell;
7
8 POE::Component::DebugShell->spawn();
9
10DESCRIPTION
11 This component allows for interactive peeking into a running POE
12 application.
13
14 "spawn()" creates a ReadLine enabled shell equipped with various debug
15 commands. The following commands are available.
16
17COMMANDS
18 show_sessions
19 debug> show_sessions
20 * 3 [ session 3 (POE::Component::DebugShell controller) ]
21 * 2 [ session 2 (PIE, PIE2) ]
22
23 Show a list of all sessions in the system. The output format is in the
24 form of loggable session ids.
25
26 session_stats
27 debug> session_stats 2
28 Statistics for Session 2
29 Events coming from: 1
30 Events going to: 1
31
32 Display various statistics for a given session. Provide one session id
33 as a parameter.
34
35 list_aliases
36 debug> list_aliases 2
37 Alias list for session 2
38 * PIE
39 * PIE2
40
41 List aliases for a given session id. Provide one session id as a
42 parameter.
43
44 queue_dump
45 debug> queue_dump
46 Event Queue:
47 * ID: 738 - Index: 0
48 Priority: 1078459009.06715
49 Event: _sigchld_poll
50 * ID: 704 - Index: 1
51 Priority: 1078459012.42691
52 Event: ping
53
54 Dump the contents of the event queue. Add a "-v" parameter to get
55 verbose output.
56
57 help
58 debug> help
59 The following commands are available:
60 ...
61
62 Display help about available commands.
63
64 status
65 debug> status
66 This is POE::Component::DebugShell v1.14
67 running inside examples/foo.perl.
68 This console spawned at Thu Mar 4 22:51:51 2004.
69 There are 3 known sessions (including the kernel).
70
71 General shell status.
72
73 reload
74 debug> reload
75 Reloading...
76
77 Reload the shell
78
79 exit
80 debug> exit
81 Exiting...
82
83 Exit the shell
84
85DEVELOPERS
86 For you wacky developers, I've provided access to the raw command data
87 via the "_raw_commands" method. The underbar at the beginning should let
88 you know that this is an experimental interface for developers only.
89
90 "_raw_commands" returns a hash reference. The keys of this hash are the
91 command names. The values are a hash of data about the command. This
92 hash contains the following data:
93
94 * short_help
95
96 Short help text
97
98 * help
99
100 Long help text
101
102 * cmd
103
104 Code reference for the command. This command requires that a hash be
105 passed to it containing an "api" parameter, which is a
106 "POE::API::Peek" object, and an "args" parameter, which is an array
107 reference of arguments (think @ARGV).
108
109AUTHOR
110 Matt Cashner (sungo@pobox.com)
111
112LICENSE
113 Copyright (c) 2003-2004, Matt Cashner
114
115 Permission is hereby granted, free of charge, to any person obtaining a
116 copy of this software and associated documentation files (the
117 "Software"), to deal in the Software without restriction, including
118 without limitation the rights to use, copy, modify, merge, publish,
119 distribute, sublicense, and/or sell copies of the Software, and to
120 permit persons to whom the Software is furnished to do so, subject to
121 the following conditions:
122
123 The above copyright notice and this permission notice shall be included
124 in all copies or substantial portions of the Software.
125
126 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
127 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
128 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
129 DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
130 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
131 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
132 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
133 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
134 STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
135 ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
136 POSSIBILITY OF SUCH DAMAGE.
137
138