devel/p5-Expect-Simple 0.04_1 FreeBSD
Wrapper around the Expect module
- System
- FreeBSD
- Repository
- FreeBSD ports
- Maintainer
- [email protected]
- License
- GPLv2+
- Categories
- devel, perl5
- Package size
- 15.0 KiB, 30.8 KiB installed
Description
Expect::Simple is a wrapper around the Expect module which should suffice for simple applications. It hides most of the Expect machinery; the Expect object is available for tweaking if need be.
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 the before, after, match_str, and match_idx methods. Since Expect simulates a terminal, there will be extra \r characters at the end of each line in the result (on UNIX at least). This is easily fixed:
($res = $obj->before) =~ tr/\\r//d;
@lines = split( "\\n", $res );
This is not done automatically.
Exceptions will be thrown on error (match with /Expect::Simple/). Errors from Expect are available via the error_expect method. More human readable errors are available via the error method.
The connection is automatically broken (by sending the specified disconnect command to the target) when the Expect::Simple object is destroyed.
In the other systems
| System | Port | Version |
|---|---|---|
| FreeBSD | devel/p5-Expect-Simple | 0.04_1 |
| OpenBSD | devel/p5-Expect-Simple | 0.04p1 |
| NetBSD | devel/p5-Expect-Simple | 0.04nb17 |
| DragonFly | devel/p5-Expect-Simple | 0.04_1 |
| HardenedBSD | devel/p5-Expect-Simple | 0.04_1 |
| GhostBSD | devel/p5-Expect-Simple | 0.04_1 |
Install
Binary package:
pkg install p5-Expect-Simple
From the ports tree:
cd /usr/ports/devel/p5-Expect-Simple/ && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= p5-Expect-Simple>0:devel/p5-Expect-Simple
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | aarch64 | amd64 | armv6 | armv7 | i386 |
|---|---|---|---|---|---|
| FreeBSD:14:latest | 0.04_1 | 0.04_1 | 0.04_1 | 0.04_1 | 0.04_1 |
| FreeBSD:14:quarterly | 0.04_1 | 0.04_1 | n/a | 0.04_1 | 0.04_1 |
| FreeBSD:15:latest | 0.04_1 | 0.04_1 | n/a | 0.04_1 | 0.04_1 |
| FreeBSD:15:quarterly | 0.04_1 | 0.04_1 | n/a | n/a | n/a |
| FreeBSD:16:latest | 0.04_1 | 0.04_1 | n/a | n/a | n/a |
| FreeBSD:16:quarterly | n/a | n/a | n/a | n/a | n/a |
Dependencies
As this port's Makefile names them.
Build 1
p5-Expect>=0: lang/p5-Expect
Runtime 1
p5-Expect>=0: lang/p5-Expect
The full lists below include those, and their dependencies in turn.
Build dependencies 3
Run dependencies 3
Required by 1
Configuration
No options to configure.
- USES
- perl5
- Service scripts
- none
Files
pkg-plist 2
- %%PERL5_MAN3%%/Expect::Simple.3.gz
- %%SITE_PERL%%/Expect/Simple.pm
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| Expect-Simple-0.04.tar.gz | 13856 | af83b92185e642695913ff138efe819752e80857759996deafcaab2700ad5db5 |
Master sites 1
- CPAN
Commit history 0
No commits in the history this site was built from.