kulls has asked for the wisdom of the Perl Monks concerning the following question:

Greetings,
I want to write a test suite for command line (executable) applications through perl.Is there any modules/functions available in perl, so that it can give added values to my test suite apart from perl 'system' and other perlfunction ??.

Update: Thanks for your interest.
xdg and madbombx fulfill what I need (linux,file handling, shell scripts, system commands and test modules).
Thanks in advance,
Kulls
  • Comment on Any perl modules for handling system operations

Replies are listed 'Best First'.
Re: Any perl modules for handling system operations
by xdg (Monsignor) on Nov 18, 2006 at 13:42 UTC
    I want to write a test suite for command line (executable) applications

    For testing command line apps, I like IPC::Run3 instead of system, as I can feed STDIN and capture STDOUT and STDERR independently and later check them using regular expressions.

    There are other test modules that may help, though some of them may have portability concerns. (But if you're on Unix, you're probably safe.)

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Re: Any perl modules for handling system operations
by Fletch (Bishop) on Nov 18, 2006 at 14:32 UTC

    Expect may be of interest as well.

Re: Any perl modules for handling system operations
by madbombX (Hermit) on Nov 18, 2006 at 13:07 UTC
Re: Any perl modules for handling system operations
by ambrus (Abbot) on Nov 18, 2006 at 11:19 UTC

    Could you please be more specific about what functions you'd need?

Re: Any perl modules for handling system operations
by geekphilosopher (Friar) on Nov 18, 2006 at 22:04 UTC
    If you're just looking to capture the output of a system call, the `backtick` operator is what you're looking for.