1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

Adding port devel/p5-Expect-Simple, a wrapper around the lang/p5-Expect module.

Approved by:	tobez (implicit)
This commit is contained in:
Aaron Dalton 2006-05-23 16:06:30 +00:00
parent f541f93a14
commit edf1c8e035
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=163181
5 changed files with 67 additions and 0 deletions

View File

@ -950,6 +950,7 @@
SUBDIR += p5-Event
SUBDIR += p5-Event-RPC
SUBDIR += p5-Exception-Class
SUBDIR += p5-Expect-Simple
SUBDIR += p5-Exporter-Lite
SUBDIR += p5-Exporter-Tidy
SUBDIR += p5-ExtUtils-AutoInstall

View File

@ -0,0 +1,31 @@
# New ports collection makefile for: Expect-Simple
# Date created: 23 May 2006
# Whom: Aaron Dalton <aaron@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= Expect-Simple
PORTVERSION= 0.02
CATEGORIES= devel perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= ../../authors/id/D/DJ/DJERIUS
PKGNAMEPREFIX= p5-
MAINTAINER= aaron@FreeBSD.org
COMMENT= Wrapper around the Expect module
BUILD_DEPENDS= ${SITE_PERL}/Expect.pm:${PORTSDIR}/lang/p5-Expect
RUN_DEPENDS= ${BUILD_DEPENDS}
MAN3= Expect::Simple.3
PERL_CONFIGURE= yes
.include <bsd.port.pre.mk>
.if ${PERL_LEVEL} < 500800
IGNORE= requires at least Perl 5.8.0. Please install lang/perl5.8 and try again
.endif
.include <bsd.port.post.mk>

View File

@ -0,0 +1,3 @@
MD5 (Expect-Simple-0.02.tar.gz) = 23c72fa4461f07522eb8c8511bad5d43
SHA256 (Expect-Simple-0.02.tar.gz) = 562ac17b70f140f793cf08333a4da0e11f2bf6ee19ce297125aefb29ef8940ef
SIZE (Expect-Simple-0.02.tar.gz) = 11100

View File

@ -0,0 +1,27 @@
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.
WWW: http://search.cpan.org/dist/Expect-Simple
Author: Diab Jerius <djerius@cpan.org>

View File

@ -0,0 +1,5 @@
%%SITE_PERL%%/Expect/Simple.pm
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Expect/Simple/.packlist
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Expect/Simple
@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Expect
@dirrmtry %%SITE_PERL%%/Expect