Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 |
2 | .\" | |
3 | .\" Standard preamble: | |
4 | .\" ======================================================================== | |
5 | .de Sh \" Subsection heading | |
6 | .br | |
7 | .if t .Sp | |
8 | .ne 5 | |
9 | .PP | |
10 | \fB\\$1\fR | |
11 | .PP | |
12 | .. | |
13 | .de Sp \" Vertical space (when we can't use .PP) | |
14 | .if t .sp .5v | |
15 | .if n .sp | |
16 | .. | |
17 | .de Vb \" Begin verbatim text | |
18 | .ft CW | |
19 | .nf | |
20 | .ne \\$1 | |
21 | .. | |
22 | .de Ve \" End verbatim text | |
23 | .ft R | |
24 | .fi | |
25 | .. | |
26 | .\" Set up some character translations and predefined strings. \*(-- will | |
27 | .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left | |
28 | .\" double quote, and \*(R" will give a right double quote. | will give a | |
29 | .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to | |
30 | .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' | |
31 | .\" expand to `' in nroff, nothing in troff, for use with C<>. | |
32 | .tr \(*W-|\(bv\*(Tr | |
33 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' | |
34 | .ie n \{\ | |
35 | . ds -- \(*W- | |
36 | . ds PI pi | |
37 | . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch | |
38 | . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch | |
39 | . ds L" "" | |
40 | . ds R" "" | |
41 | . ds C` "" | |
42 | . ds C' "" | |
43 | 'br\} | |
44 | .el\{\ | |
45 | . ds -- \|\(em\| | |
46 | . ds PI \(*p | |
47 | . ds L" `` | |
48 | . ds R" '' | |
49 | 'br\} | |
50 | .\" | |
51 | .\" If the F register is turned on, we'll generate index entries on stderr for | |
52 | .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index | |
53 | .\" entries marked with X<> in POD. Of course, you'll have to process the | |
54 | .\" output yourself in some meaningful fashion. | |
55 | .if \nF \{\ | |
56 | . de IX | |
57 | . tm Index:\\$1\t\\n%\t"\\$2" | |
58 | .. | |
59 | . nr % 0 | |
60 | . rr F | |
61 | .\} | |
62 | .\" | |
63 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes | |
64 | .\" way too many mistakes in technical documents. | |
65 | .hy 0 | |
66 | .if n .na | |
67 | .\" | |
68 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). | |
69 | .\" Fear. Run. Save yourself. No user-serviceable parts. | |
70 | . \" fudge factors for nroff and troff | |
71 | .if n \{\ | |
72 | . ds #H 0 | |
73 | . ds #V .8m | |
74 | . ds #F .3m | |
75 | . ds #[ \f1 | |
76 | . ds #] \fP | |
77 | .\} | |
78 | .if t \{\ | |
79 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) | |
80 | . ds #V .6m | |
81 | . ds #F 0 | |
82 | . ds #[ \& | |
83 | . ds #] \& | |
84 | .\} | |
85 | . \" simple accents for nroff and troff | |
86 | .if n \{\ | |
87 | . ds ' \& | |
88 | . ds ` \& | |
89 | . ds ^ \& | |
90 | . ds , \& | |
91 | . ds ~ ~ | |
92 | . ds / | |
93 | .\} | |
94 | .if t \{\ | |
95 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" | |
96 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' | |
97 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' | |
98 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' | |
99 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' | |
100 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' | |
101 | .\} | |
102 | . \" troff and (daisy-wheel) nroff accents | |
103 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' | |
104 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' | |
105 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] | |
106 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' | |
107 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' | |
108 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] | |
109 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] | |
110 | .ds ae a\h'-(\w'a'u*4/10)'e | |
111 | .ds Ae A\h'-(\w'A'u*4/10)'E | |
112 | . \" corrections for vroff | |
113 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' | |
114 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' | |
115 | . \" for low resolution devices (crt and lpr) | |
116 | .if \n(.H>23 .if \n(.V>19 \ | |
117 | \{\ | |
118 | . ds : e | |
119 | . ds 8 ss | |
120 | . ds o a | |
121 | . ds d- d\h'-1'\(ga | |
122 | . ds D- D\h'-1'\(hy | |
123 | . ds th \o'bp' | |
124 | . ds Th \o'LP' | |
125 | . ds ae ae | |
126 | . ds Ae AE | |
127 | .\} | |
128 | .rm #[ #] #H #V #F C | |
129 | .\" ======================================================================== | |
130 | .\" | |
131 | .IX Title "PTKSH 1" | |
132 | .TH PTKSH 1 "2000-12-30" "Tk800.023" "perl/Tk Documentation" | |
133 | .SH "NAME" | |
134 | ptksh \- Perl/Tk script to provide a graphical user interface for testing Perl/Tk | |
135 | commands and scripts. | |
136 | .SH "SYNOPSIS" | |
137 | .IX Header "SYNOPSIS" | |
138 | .Vb 10 | |
139 | \& % ptksh ?scriptfile? | |
140 | \& ... version information ... | |
141 | \& ptksh> $b=$mw->Button(-text=>'Hi',-command=>sub{print 'Hi'}) | |
142 | \& ptksh> $b->pack | |
143 | \& ptksh> o $b | |
144 | \& ... list of options ... | |
145 | \& ptksh> help | |
146 | \& ... help information ... | |
147 | \& ptksh> exit | |
148 | \& % | |
149 | .Ve | |
150 | .SH "DESCRIPTION" | |
151 | .IX Header "DESCRIPTION" | |
152 | ptksh is a perl/Tk shell to enter perl commands | |
153 | interactively. When one starts ptksh a MainWindow | |
154 | is automaticly created, along with a ptksh command window. | |
155 | One can access the main window by typing commands using the | |
156 | variable \f(CW$mw\fR at the 'ptksh> ' prompt of the command window. | |
157 | .PP | |
158 | ptksh supports command line editing and history. Just type \*(L"<Up>\*(R" at | |
159 | the command prompt to see a history list. The last 50 commands entered | |
160 | are saved, then reloaded into history list the next time you start ptksh. | |
161 | .PP | |
162 | ptksh supports some convenient commands for inspecting Tk widgets. See below. | |
163 | .PP | |
164 | To exit ptksh use: \f(CW\*(C`exit\*(C'\fR. | |
165 | .PP | |
166 | ptksh is \fB*not*\fR a full symbolic debugger. | |
167 | To debug perl/Tk programs at a low level use the more powerful | |
168 | perl debugger. (Just enter ``O tk'' on debuggers | |
169 | command line to start the Tk eventloop.) | |
170 | .SH "FEATURES" | |
171 | .IX Header "FEATURES" | |
172 | .Sh "History" | |
173 | .IX Subsection "History" | |
174 | Press <Up> (the Up Arrow) in the perlwish window to obtain a gui-based history list. | |
175 | Press <Enter> on any history line to enter it into the perlwish window. | |
176 | Then hit return. So, for example, repeat last command is <Up><Enter><Enter>. | |
177 | You can quit the history window with <Escape>. \s-1NOTE:\s0 history is only saved | |
178 | if exit is \*(L"graceful\*(R" (i.e. by the \*(L"exit\*(R" command from the console or by | |
179 | quitting all main windows\*(--NOT by interrupt). | |
180 | .Sh "Debugging Support" | |
181 | .IX Subsection "Debugging Support" | |
182 | ptksh provides some convenience function to make browsing | |
183 | in perl/Tk widget easier: | |
184 | .IP "\fB?\fR, or \fBh\fR" 4 | |
185 | .IX Item "?, or h" | |
186 | displays a short help summary. | |
187 | .IP "\fBd\fR ?\fIargs\fR, ...?" 4 | |
188 | .IX Item "d ?args, ...?" | |
189 | Dumps recursively arguments to stdout. (see Data::Dumper). | |
190 | You must have <Data::Dumper> installed to support this feature. | |
191 | .IP "\fBp\fR ?\fIarg\fR, ...?" 4 | |
192 | .IX Item "p ?arg, ...?" | |
193 | appends \*(L"|\en\*(R" to each of it's arguments and prints it. | |
194 | If value is \fBundef\fR, '(undef)' is printed to stdout. | |
195 | .IP "\fBo\fR \fI$widget\fR ?\fI\-option\fR ...?" 4 | |
196 | .IX Item "o $widget ?-option ...?" | |
197 | prints the option(s) of \fI$widget\fR one on each line. | |
198 | If no options are given all options of the widget are | |
199 | listed. See Tk::options for more details on the | |
200 | format and contents of the returned list. | |
201 | .IP "\fBo\fR \fI$widget\fR \fB/\fR\fIregexp\fR\fB/\fR" 4 | |
202 | .IX Item "o $widget /regexp/" | |
203 | Lists options of \fI$widget\fR matching the | |
204 | regular expression \fIregexp\fR. | |
205 | .IP "\fBu\fR ?\fIclass\fR?" 4 | |
206 | .IX Item "u ?class?" | |
207 | If no argument is given it lists the modules loaded | |
208 | by the commands you executed or since the last time you | |
209 | called \f(CW\*(C`u\*(C'\fR. | |
210 | .Sp | |
211 | If argument is the empty string lists all modules that are | |
212 | loaded by ptksh. | |
213 | .Sp | |
214 | If argument is a string, ``text'' it tries to do a ``use Tk::Text;''. | |
215 | .Sh "Packages" | |
216 | .IX Subsection "Packages" | |
217 | Ptksh compiles into package Tk::ptksh. Your code is eval'ed into package | |
218 | main. The coolness of this is that your eval code should not interfere with | |
219 | ptksh itself. | |
220 | .Sh "Multiline Commands" | |
221 | .IX Subsection "Multiline Commands" | |
222 | ptksh will accept multiline commands. Simply put a \*(L"\e\*(R" character immediately | |
223 | before the newline, and ptksh will continue your command onto the next line. | |
224 | .Sh "Source File Support" | |
225 | .IX Subsection "Source File Support" | |
226 | If you have a perl/Tk script that you want to do debugging on, try running the | |
227 | command | |
228 | .PP | |
229 | .Vb 1 | |
230 | \& ptksh> do 'myscript'; | |
231 | .Ve | |
232 | .PP | |
233 | .Vb 1 | |
234 | \& -- or (at shell command prompt) -- | |
235 | .Ve | |
236 | .PP | |
237 | .Vb 1 | |
238 | \& % ptksh myscript | |
239 | .Ve | |
240 | .PP | |
241 | Then use the perl/Tk commands to try out different operations on your script. | |
242 | .SH "ENVIRONMENT" | |
243 | .IX Header "ENVIRONMENT" | |
244 | Looks for your .ptksh_history in the directory specified by | |
245 | the \f(CW$HOME\fR environment variable ($HOMEPATH on Win32 systems). | |
246 | .SH "FILES" | |
247 | .IX Header "FILES" | |
248 | .IP "\fI.ptksh_init\fR" 4 | |
249 | .IX Item ".ptksh_init" | |
250 | If found in current directory it is read in an evaluated | |
251 | after the mainwindow \fI$mw\fR is created. \fI.ptksh_init\fR | |
252 | can contain any valid perl code. | |
253 | .IP "\fI~/.ptksh_history\fR" 4 | |
254 | .IX Item "~/.ptksh_history" | |
255 | Contains the last 50 lines entered in ptksh session(s). | |
256 | .SH "PITFALLS" | |
257 | .IX Header "PITFALLS" | |
258 | It is best not to use \*(L"my\*(R" in the commands you type into ptksh. | |
259 | For example \*(L"my \f(CW$v\fR\*(R" will make \f(CW$v\fR local just to the command or commands | |
260 | entered until <Return> is pressed. | |
261 | For a related reason, there are no file-scopy \*(L"my\*(R" variables in the | |
262 | ptksh code itself (else the user might trounce on them by accident). | |
263 | .SH "BUGS" | |
264 | .IX Header "BUGS" | |
265 | \&\fBTk::MainLoop\fR function interactively entered or sourced in a | |
266 | init or script file will block ptksh. | |
267 | .SH "SEE ALSO" | |
268 | .IX Header "SEE ALSO" | |
269 | Tk | |
270 | perldebug | |
271 | .SH "VERSION" | |
272 | .IX Header "VERSION" | |
273 | \&\s-1VERSION\s0 2.01 6/18/98 | |
274 | .SH "AUTHORS" | |
275 | .IX Header "AUTHORS" | |
276 | Mike Beller <beller@penvision.com>, | |
277 | Achim Bohnet <ach@mpe.mpg.de> | |
278 | .PP | |
279 | Copyright (c) 1996 \- 1998 Achim Bohnet and Mike Beller. All rights reserved. | |
280 | This program is free software; you can redistribute it and/or modify it | |
281 | under the same terms as Perl itself. |