Debian Codegraph @

Changes

raw
1 Revision history for CPAN module Expect
2
3 1.38 2024-03-08
4 - Fix to fix to timeout code
5
6 1.37 2024-03-07
7 - Fix to timeout code
8
9 1.36 2024-02-23
10 - Made timeouts optional and added qr// regex support
11
12 1.35 2017-05-18
13 - Added AUTHOR key, listing all maintainers
14
15 1.34 2017-05-18
16 Official maintainer JACOBY (Dave Jacoby)
17 - Added a MANIFEST so that "make dist" will work
18
19 1.33 2016-06-08
20 Remove dependency on Test::Exception
21
22 1.32 2014-10-26
23 Skip bc tests. https://rt.cpan.org/Ticket/Display.html?id=98495
24
25 1.31 2014-09-02
26 Eliminate the requirement for ExtUtils::MakeMaker 1.70.
27 Now any ExtUtils::MakeMaker should work on the client side.
28
29 In the tests, add special treatment for $^O=midnightbsd and dragonfly.
30 and for $^O=linux as well.
31 Test t/11-calc.t also got some special treatment.
32
33 1.30 2014-08-22
34 RT #47834
35 After a failed call to ->expect the ->match, and ->after will return undef
36 and ->before will return the content of the accumulator.
37 Earlier they retained the values obtained during the last successful match.
38
39 ->before will return undef at the first time but later, if we call ->clear_accum,
40 it will start returning the empty string.
41
42 CONFIGURE_REQUIRES ExtUtils::MakeMaker 6.70
43 Some test updates.
44
45 1.29 2014-08-14
46 Official co-maintainer SZABGAB (Gabor Szabo)
47 Update documentation according to RT #60722
48
49 1.28 2014-08-14
50 Croak if undef passed to _trim_length
51 Fix double planning on skipped test
52
53 1.27 2014-08-13
54 Remove $& and $` fixing the rest of RT #61395
55 Add more test cases.
56 Various code refactoring declaring loop variables;
57 parameter passing; return undef; etc.
58
59 1.26 2014-08-12
60 Skip the bc test on OS-es where it has been failing.
61 Stop inheriting from Exporter.
62 Eliminate $` and $' from the code. part of (RT #61395)
63 This fix might break some existing code n some extreme cases
64 when the regex being matched has a lookbehind or a lookahead
65 at the edges.
66
67 1.25 2014-08-05
68 Fix test count.
69
70 1.24 2014-08-04
71 More test diagnostics.
72 Tests added for RT #62359
73
74 1.23 2014-07-29
75 Refactoring test script.
76 Eliminate indirect calls in the code and in the docs.
77 Use Perl::Tidy to unify layout.
78 Add use warnings;
79 IO::Tty prerequisite version 1.03 => 1.11
80
81 1.22 2014-07-27
82 New unofficial mainainer (Gabor Szabo)
83 Merge .pod and .pm and move them to lib/
84 Move the test and the code to standard location /t in the distribution.
85 Eliminate indirect calls in tests.
86 Use Test::More instead of home-brew testing.
87 Typos fixed in pod RT #86852.
88 Changes file re-ordered and standardized.
89
90 1.21 2007-08-13
91
92
93 1.20 2006-07-21
94 + added early return to send and send_slow if filehandle was closed
95 + added test for send_slow
96 ! fixed bug in expect() param handling (exact pattern "0" was ignored)
97 ! fixed bug in _make_readable()
98 + now included example ssh.pl in MANIFEST so it gets packaged :-(
99
100 1.19 2006-07-17
101 ! fixed non-localized usage of $_
102 + added new example ssh.pl
103
104 1.18 2006-07-11
105 ! added another pipe to synchronize spawning. Closing the slave in the
106 parent can lead to a hang if the child already wrote something into
107 it...
108 ! fixed REs in test to deal with shell prompts
109
110 1.17 2006-05-31
111 ! fixed param check for expect() to allow expect(undef) et al
112
113 1.16 2006-05-05
114 ! fixed hangup with pipe sync upon spawn by adding close-on-exec to pipe handle
115 ! fixed log_file(undef) when logging to CODE ref
116 ! fixed $? mangling in DESTROY by saving & restoring status
117 ! fixed hangup in send_slow
118 ! fixed ugly solaris hack by disabling it for raw ptys
119 + added param check for expect()
120
121 1.15 2002-03-19
122 ! fixed bug in _multi_expect, pattern weren't tried against accum due
123 to exp_New_Data not set.
124
125 1.14 2002-03-13
126 same as 1.13_10
127 ! fixed select in interconnect, may return -1 if interrupted by signal.
128
129 1.13_08 2002-02-28
130 ! fixed bug in log_file, parameter now gets set to undef.
131
132 1.13_07 2002-02-28
133 + added and corrected test for exit status; got rid of Test.pm
134 ! use 'set_raw' instead of stty("raw"); IO::Stty now optional
135 + updated docs & FAQs; explained how terminal sizes and SIGWINCH
136 should be propagated
137
138 1.13_06 2002-01-31
139 ! spawn is back again
140 + rearranged and changed tests to better suit the various systems
141 + added rudimentary 'notransfer' option; global only, not on
142 per-pattern-basis; workaround available in FAQ
143 + timeout handlers now also can exp_continue
144 + added 'raw_pty' option, also setting master to raw if isatty()
145
146 1.13_04 2002-01-18
147
148 1.13_02 2001-11-30
149
150 1.13_01 2001-11-26
151
152 1.13
153 ! changed tests to check out pty behaviour (max. string length)
154 + added various FAQ entries
155 + added autoflush(1) to log_file
156 + split 'new' and 'spawn' to be able to set slave pty params via stty
157 before actually spawning the program
158 + added slave_pty()
159 + added print_log_file(), send() now no longer prints to log file or
160 stdout.
161 + added alarm to test.pl to avoid blocking on cygwin.
162 ! spawn() now uses IO::Pty spawn, thus exec errors are reported and
163 ssh should work too!
164
165 1.12 2001-09-06
166 ! exp_Max_Accum didn't work for interact.
167 - removed soft_close() from DESTROY. Being overly nice to a doomed process
168 doesn't pay off. Old behaviour is available via
169 $Expect::Do_Soft_Close = 1;
170 ! cleanup of log and exp_internal output
171 + added various aliases for functions starting with 'exp_'
172 ! moved FAQ and intro into the main pod as I got the impression
173 that many users didn't bother to read all the documentation
174 or didn't know that it was there.
175 + added a hook for log_file: can be set to a code ref.
176
177 1.11 2001-02-20
178 Bugs fixed:
179 ! max_accum (match_max) finally really restricts the match-buffer-size.
180 ! expect() didn't return the correct error state upon EOF
181 ! soft_close() was re-reading the filehandle even when an EOF
182 had already been detected, resulting in a very long delay.
183 ! exp_continue() returned a value that got truncated with certain
184 perl versions (5.6 :-( ) on certain systems.
185
186 Features added:
187 + Lee Eakin <[email protected]>contributed a perl version of the
188 kibitz script which might be of common interest. See the
189 examples/kibitz subdir. Thanks Lee!
190 + Expect got it's own print() so we can show what's getting
191 sent to the spawned program when exp_internal is set.
192 (suggested by [email protected])
193 + a session can now be logged to a file by setting log_file(). Thanks to
194 Marcel Widjaja <[email protected]> for suggesting this.
195 + I added some aliases for certain methods to help Tcl/Expect users
196 to a WLIE experience (Work Like I Expect). 'exp_pid', 'match_max',
197 'log_file', 'log_user', even 'send' (which is an alias for 'print')
198 are all there now. But I won't make 'send_user' an alias for
199 'print STDOUT', you have to draw a line somewhere.
200 + some diagnosis messages now use cluck to print a stacktrace
201 (suggested by [email protected])
202 + there is a new option 'restart_timeout_upon_receive', that, when
203 set to 1, will restart the timeout within the expect call. This is
204 useful when supervising an application that produces periodic, but
205 not well-defined output and you still want to react to certain
206 patterns. Just say
207
208 $exp->restart_timeout_upon_receive(1);
209 $exp->expect($timeout,
210 [ timeout => \&report_timeout ],
211 [ qr/pattern/ => \&handle_pattern ]);
212
213 (suggested by [email protected])
214
215 1.10 2000-11-22
216 I cannot believe it: a syntax error in Expect.pm slipped through
217 (probably when I changed the version number after testing the patches),
218 forcing me to do anouther release. >:-(
219
220 1.09 2000-11-21
221 Various small bugfixes: exp_before didn't get set on timeout,
222 the expect call didn't return on matching EOF, spawn didn't die when
223 exec failed, Expect crashed in certain cases.
224
225 1.08 2000-09-20
226 Added multi-match functionality (see docu) --Roland
227
228 1.07 1998-07-12
229 Changed the ver by .01 so I could get it up on CPAN :P
230
231 1.06
232 Added exp_before(), exp_after(), exp_match(), exp_match_number(), exp_error().
233
234 1.05
235 Added debug level '3'. Fixed/added to tutorial, fixed a couple of minor bugs.
236
237 1.04 1998-03-12
238 Made all handles exp_inited autoflush. IO::Pty does the spawned
239 processes for us. All regexp patterns passed to expect() are now
240 multiline matched-- this makes matching ^ work for the beginning of lines.
241 Unfortunately due to limitations in perl matching $ as the end of a line
242 doesn't work if you are being returned \r\n instead of just \n. In this case
243 you can use \r?$ to match the end of a line.
244 exp_stty now checks to make sure the FH is a tty.
245
246 1.03
247 Reworked expect() to make the code more fluid. Removed ~50 lines of
248 cruft. Added soft_close() and hard_close() (see Expect.pod for details).
249
250 1.02
251 Killed the $Expect::Use_Regexps stuff. Changed expect to look for '-re'
252 strings indicating the subsequent pattern is to be matched as a regular
253 expression.
254
255 1.01 1997-12-15
256 Dropped process still alive during expect. Sometimes the process dies
257 before the handle finishes getting read. Fixed a typo that caused a response
258 of 'child process died' if a successfull pattern had a null value.
259 Added the ability to do expect() literals instead of regular
260 expressions. see $process->use_regexps and the package global
261 $Expect::Use_Regexps.
262 Fixed internals to work with the documented fashion for using file
263 ojects. everything is internally represented as ${*$process}{exp_variable}
264 instead of ${*$process}{variable}. Pids should be checked with
265 $process->pid() now, since $process->{Pid} no longer exists.
266 exp_kill() is obsolete. Use kill($signal,$process->pid()).
267
268 1.00
269 exp_close no longer sends an exp_kill() to the process. This was kind
270 of a dumb thing to do in the first place. Processes should go away after they
271 are close()d. In fact, there really isn't any point in using exp_close. Just
272 use $process->close();. -This isn't true as of 1.03, where soft and hard close
273 were added to help deal with buffering issues.
274
275 0.99
276 Changed expect() to return the index of the matched pattern + 1. This
277 enables the 'quick and dirty' $process->expect($timeout,'patern') || die;
278 sort of behavior.
279
280 0.98
281 Changed everything. Now requires IO::Tty and uses IO::Stty. This
282 should make it work on any posix-supporting platform that includes a method
283 of obtaining a pty. Got rid of the 'detach' stuff, as it cluttered stuff up
284 too much. Do your own forking.
285 Default settings are now done by directly setting Expect::Values, such
286 as $Expect::Debug and $Expect::Log_Stdout. Things now use 'spawn ids' and
287 'handle ids' instead of handle numbers. This makes debugging a little more
288 sensible.
289 Though there may be more bugs in the ver. I'm hopeful it should prove
290 to be much more stable, reliable, intuitive and portable than previously.
291
292 0.972
293 Fixed setpgrp to be setsid. Oops. Processes opening /dev/tty should be
294 much happier now.
295
296 0.97
297 Forced baud rate to get set at startup to make sure it wasn't set to 0
298 and sending EOFs. Linux now hangs consistently. It will probably not work until
299 I get to the stty module. Sigh. Time to stop being lazy :)
300 Also forced complete handle flushing after handles are opened. Probably
301 a bit anal but I'd rather err on the side of safety.
302 After the stty problem gets fixed I'll probably change over eveything
303 to use the IO::Pty module.
304
305 0.96
306 Fixed a couple of idiot mistakes concerning DEBUG mode and printing
307 debug info to STDERR. Changed some debugging spots so debugging info will
308 always be printed in readable escaped format rather than raw input.
309
310 0.95
311 Linux had this bizarre problem of stty occasionally not returning when
312 setting raw -echo. My solution was to run it twice, once for raw and once for
313 echo. The real solution is of course to write an stty function using the POSIX
314 module.. any volunteers? :-)
315
316 0.94
317 Think I fixed the problem of opening /dev/tty. Should work now. Also
318 fixed a typo which caused the initial value of Log_Stdout to be set wrong.
319
320 0.92
321 Finally figured out how to generate an EOF on a terminal (stty 0 but
322 you knew that already ;). Whole module needs a spring cleaning but seems to be
323 pretty functional. After the (later) introduction of a POSIX stty function the
324 code involving stty should get a little cleaner.
325 Interact, interconnect and expect should all benefit from the EOF fix.
326 interconnect also looks for FH exceptions, which it treats as EOFs.
327