I'm not at all good with install problems, so this could
be totally wrong. But have you installed IO::Stty and
IO::Tty? Expect depends on both of these packages.
| [reply] |
We discussed this last night, and it would appear that
your problems were with IO::Tty. You are also on what you
called a vanilla Unix System V, Release 4. This is not
exactly the most common platform in the wild any more,
and the Expect_intro documentation warns that:
BUGS
This module has not been tested on a great variety of
platforms and is relatively young. Interesting and
unexpected features will undoubtedly surface.
Well that is what the test suites are meant to catch, and
I am sure that Austin Schutz (tex@habit.com) will be very
interested in having it pass on your platform. As I
said last night, "perl -V" contains a lot of information
about how your system is configured that will help them
do that.
Now there is a possibility that this is a 5.005_02 specific
bug, I would still try the 5.005_03 release. But my
guess is that it is some surviving BSDism due to having
started with a code base developed on SunOS. | [reply] |
Apologies for offtopic answer ;-)
I've never found a need for Expect yet. Whenever I think, oh I better try out Expect, I do a search through CPAN and find that there is a module which does exactly what I wanted anyway ;-)
What was it that you wanted to drive with Expect? | [reply] |
I agree with this one. In a lot of my EFnet #perl chatting, I see a lot of people
ask how to "get Net::Telnet working" or "having troubles with
Expect", or even "can't get this socket code to work". When I question
them further, 9 times out of 10 it's because they are either fetching a web page
(the hardest way possible {grin}) or speaking some other basic protocol like
mail or news. When I point at the myriad of solutions on the CPAN, usually
their electronic jaw drops to the table, and they're on their way, not having
to reinvent the wheel by gluing together popsicle sticks.
Perhaps it's because when people come to Perl from other languages, they're already
conditioned to have to "roll their own". The CPAN is a fairly interesting advantage
in the Perl community, and too many of us take it for granted. As I often
say in Usenet posts:
The CPAN is your friend. Use the CPAN!
-- Randal L. Schwartz, Perl hacker
| [reply] |
Thanks for the comments. I'm going to write a general answer rather than a specific one for each comment.
I've got a tracking and reporting system that I want to integrate with a terminal-based parts system. Normally, we only do paperwork tracking of the parts, and that wastes a lot of our time.
What I was thinking was, "Why not run telnet through Expect.pm and have it do screen captures (for a printout of the paperwork--without the paper backup I can't convince people to switch over) and also have it pick up the interesting parts of the order--part number, serial number, airbill number, and so on." I expect I could do this without using Expect.pm, but what I read about Expect.pm leads me to expect that this is a good solution.
On the other hand, using Net::Telnet for this hadn't occurred to me, and it should have. I'm going to treat that as option #2. This isn't a hurry-up job, just something I want to add soon when I have time.
I have installed IO::Tty and IO::Stty, and the stub I wrote indicates that my trouble is due to not getting IO::Pty working. I'm going to go up to 5.005_03 as soon as possible (I started with it last night, but make didn't like my makefile), and I have a hunch that is going to fix it, as tilly suggests. If not, well, a note to the maintainer is in order, and looking at doing my task without Expect is also on the list.
Again, thanks for the help--I'll let you know how it all turns out.
Update: Since I'm not at that job anymore, I've quit working on this particular task for the moment. I wish I had a good (i.e., useful to others) answer to the question, but I don't. Still, I promised an update... | [reply] |