Skip Menu |

This queue is for tickets about the Net-SSH-Expect CPAN distribution.

Report information
The Basics
Id: 78548
Status: open
Priority: 0/
Queue: Net-SSH-Expect

People
Owner: Nobody in particular
Requestors: chris [...] foote.com.au
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Documentation example for waitfor() wrong
The POD for the module shows this erroneous example near the end of the SYNOPSIS section: # check that we have the system prompt again. my ($before_match, $match) = $ssh->waitfor('>\s*\z', 1); # waitfor() in a list context die "passwd failed. passwd said '$before_match'." unless ($match); The waitfor() method only every returns a scalar, so the example is wrong. The code comment (in Expect.pm) for the function is correct. so the example in SYNOPSIS should be changed to: # check that we have the system prompt again. my $matched = $ssh->waitfor('>\s*\z', 1); die 'passwd failed. passwd said ' . $ssh->before() unless $matched;
Hi Bruno, Can we get the POD updated? thanks :) Jason