- Package:
- libexpect-simple-perl
- Source:
- libexpect-simple-perl
- Submitter:
- Gordon Haverland
- Date:
- 2021-02-27 08:42:03 UTC
- Severity:
- wishlist
- Tags:
If one looks at the man page for Expect::Simple, we see:
use Expect::Simple;
my $obj = new Expect::Simple
{ Cmd => [ dmcoords => 'verbose=1', "infile=$infile"],
Prompt => [ -re => 'dmcoords>:\s+' ],
DisconnectCmd => 'q',
Verbose => 0,
Debug => 0,
Timeout => 100
};
$obj->send( $cmd );
The manpage code snippet does not define $cmd. This is a common problem
in perl, missing details (not limited to perl however). But, if I download
the CPAN package and look in the test directory, I can see what $cmd is
supposed to be. Even looking at the send() command on the man page doesn't
really tell someone what $cmd is supposed to be. An example that I guess
I will figure out myself, is what if the first send() isn't needed? Am
I supposed to send a zero length string, UNDEF, or not even call send()?
But a general comment as far as all CPAN modules goes, we really do need
the tests and any examples that are in the CPAN package. And it would
be really nice if the web page describing libexpect-simple-perl (or
any libXXX-perl package) would actually say that this is the CPAN XXX
package.
But, this is all wishlist.
Hi, Gordon Haverland (2010-07-18): [... copy of the synopsis] I think that's OK as far as the synopsis is concerned. I see how it could be made clearer upstream. "Generally, one starts by creating an Expect::Simple object using new. This will start up the target program, and will wait until one of the specified prompts is output by the target. At that point the caller should send() commands to the program; the results are available via" I don't see how an Expect module can be useful without sending commands to the interactive prompt. We do ship the tests in the source package. When upstream provides example scripts, we include them in the binary package. In this case there are none so we can't include them :) Indeed, this info is only available in the long description of the binary package, that for example is not visible on the tracker: https://tracker.debian.org/pkg/libexpect-simple-perl But if you click on the binary package link on that page, you land on https://packages.debian.org/unstable/libexpect-simple-perl, which includes the desired info. So, all in all, I think the only actionable aspect of this wishlist bug report are upstream stuff. Tagging accordingly.