ActivePerl and Expect question

D

Dipak Prasad

Hi

I have a question regarding ActivePerl and Expect. I am working with
already existing ActivePerl (5.6.1 Build 635) s/w for Windows. I need
to integrate and automate an interactive CLI-Menu driven 3rd party s/w
to the ActivePerl s/w. I was planning to do that using Expect, when I
found out that Expect is not supported by ActivePerl. My question is
there something equivalent to Expect provided by ActivePerl (I have
never used Active Perl before), and/or is there a way to make Expect
work with ActivePerl?

Thanks

Dipak Prasad
 
D

Dipak Prasad

Are your referring to the Perl Expect module (i.e., Perl::Expect or Expect.pm)
or are you talking about the extension of the Tcl programming languange called
Expect? The former is based (I expect - pun intended!) on the latter, but they
are different things.

Kevin

I had done some Expect/Tcl scripting a long time ago, and for this
current requirement it appeared that if a similar extension was
available for Perl I can achieve what I wanted to do. I did some
digging around and came across the Expect.pm module, but found out it
was incompatible with ActivePerl.
In essence, I am looking to get the Expect/Tcl behavior within
ActivePerl.

Sorry for the confusion, and your suggestions are welcome.

Dipak
 
B

Ben Morrow

Quoth (e-mail address removed) (Dipak Prasad):
I had done some Expect/Tcl scripting a long time ago, and for this
current requirement it appeared that if a similar extension was
available for Perl I can achieve what I wanted to do. I did some
digging around and came across the Expect.pm module, but found out it
was incompatible with ActivePerl.
In essence, I am looking to get the Expect/Tcl behavior within
ActivePerl.

This will be difficult: win32 doesn't have ptys, which are usually
necessary to get programs to behave as though they're talking to a user.
If the programs you want to talk to will (can be made to) behave, you
could perhaps download Expect.pm and edit Expect::new and Expect::spawn
to start processes on pipes or sockets instead of ptys; you could rename
it to Expect::Win32 or so and install it in your perl tree by hand.

You might perhaps have luck with cygwin (and perl built for cygwin), but
if the programs you're trying to talk to are native win32 then I suspect
that however cygwin fakes ptys won't work with them.

As a very final resort, if you must get this working, you could start
the windows telnet server and use Net::Telnet, maybe with a gutted
version of Expect.

Ben
 
T

Thomas Kratz

Dipak said:
Hi

I have a question regarding ActivePerl and Expect. I am working with
already existing ActivePerl (5.6.1 Build 635) s/w for Windows. I need
to integrate and automate an interactive CLI-Menu driven 3rd party s/w
to the ActivePerl s/w. I was planning to do that using Expect, when I
found out that Expect is not supported by ActivePerl. My question is
there something equivalent to Expect provided by ActivePerl (I have
never used Active Perl before), and/or is there a way to make Expect
work with ActivePerl?

Thanks

Dipak Prasad

I don't now if it will match all your needs, but have a look at the (a bit
unfortunaltly named) Win32::Setupsup module.

Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,609
Members
45,254
Latest member
Top Crypto TwitterChannel

Latest Threads

Top