Book HomeJava and XSLTSearch this book

8.129. IO::Pipe

Provides an interface for creating pipes between processes.

new

$pipe = new IO::Pipe([readfh, writefh])

Constructor. Creates an IO::Pipe object, which is a reference to a newly created symbol. The two optional arguments should be objects blessed into IO::Handle or one of its subclasses. These objects are used for the system call to pipe. With no arguments, the method handles is called on the new IO::Pipe object.

handles

$pipe->handles(  )

Called during construction by IO::Pipe::new on the newly created IO::Pipe object. Returns an array of two objects blessed into IO::Pipe::End, or a subclass.

reader

$pipe->reader([args])

Object is reblessed into a subclass of IO::Handle and becomes a handle at the reading end of the pipe. If there are any args, then fork is called, and the arguments are passed to exec.

writer

$pipe->writer([args])

The object is reblessed into a subclass of IO::Handle and becomes a handle at the writing end of the pipe. If there are any args, then fork is called, and the arguments are passed to exec.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.