
Sprocket::Util::FDpasser - Pass File Descripters using File::FDpasser

my $passer = Sprocket::Util::FDpasser->new(
EndpointFile => '/tmp/fdpasser',
Connect => 0
);
$passer->attach_hook( 'sprocket.fdpasser.accept', sub {
my $event = shift;
warn "received filehandle: $event->{fh}";
} );
# send a file handle
$passer->send_fd( *STDIN{IO} );

This module provides a session that watches File::FDpasser's filehandle for readability, and emits an event for received file handles.
This module is a subclass of Sprocket::Util::Observable and inherits all of its methods.

Create a new FD passer object
A path to an FDpasser endpoint.
Connect to (true) or create (false) the endpoint

Emitted on $self and $sprocket, in that order. $event->{fh} is the filehandle received.

Sprocket, Sprocket::Util::Observable, File::FDpasser

David Davis <xantus@cpan.org>

Copyright 2006-2007 by David Davis
See Sprocket for license information.