IPC::RunSession::Simple

Run a simple IPC session in the same vein as IPC::Run & Expect
Download

IPC::RunSession::Simple Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • Robert Krimen
  • Publisher web site:
  • http://search.cpan.org/~rkrimen/

IPC::RunSession::Simple Tags


IPC::RunSession::Simple Description

Run a simple IPC session in the same vein as IPC::Run & Expect IPC::RunSession::Simple is a simple IPC session with read/write capability using IPC::Open3 and IO::Select.SYNOPSIS use IPC::RunSession::Simple $session = IPC::RunSession::Simple->open( "fcsh" ) # Read until the prompt (which doesn't end in a newline) # Timeout after 5 seconds $result = $session->read_until( qr/\(fcsh\) /, 5 ) if ( $result->closed ) { # We encountered an (abnormal) EOF... } elsif ( $result->expired ) { # The timeout got triggered... } else { print $result->content } # Tell 'fcsh' we want to quit $session->write( "quit\n" ) Requirements: · Perl


IPC::RunSession::Simple Related Software