samir.del has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks, we have a telecom hardware board, which has an embedded OS which supports perl 5.8.7. Now for automating a few servcies like say (ftp,ssh,sftp) we need to use Expect.pm module from perl. If anybody has any idea whether we have to port this module(cross-compile) onto the board or just installing will do the job since the OS on the board already supports perl.
  • Comment on Does Expect.pm needs to be ported when perl already there!

Replies are listed 'Best First'.
Re: Does Expect.pm needs to be ported when perl already there!
by chromatic (Archbishop) on Feb 06, 2009 at 06:46 UTC

    If you look at the Expect distribution on the CPAN and browse it, you'll see that it contains no XS files itself. It does require two other distributions, IO::Tty and IO::Pty. I looked at the former; it does contain XS components. That may give you some work.

Re: Does Expect.pm needs to be ported when perl already there!
by NateTut (Deacon) on Feb 06, 2009 at 16:33 UTC
    I have a similar situation I need Expect on a Solaris box with Perl 5.6.1 and no C compiler so any xs dependent modules are out. I found an ancestor of Expect called Comm.pl Which is working for me. Update: You may need to use  no strict 'refs'; when printing to the PTY. See: Comm.pl Help for details.
Re: Does Expect.pm needs to be ported when perl already there!
by Bloodnok (Vicar) on Feb 07, 2009 at 01:32 UTC
    Presuming you need Expect to automate the log in, run command, log out sequences and you're asking because your EOS support for the protocol commands doesn't fit Net::SSH, Net::Ftp etc. - which, AFAIR, are pure perl wrappers for OS commands ... otherwise, they'd fit the bill, wouldn't they ???

    A user level that continues to overstate my experience :-))