File-FDkeeper
view release on metacpan or search on metacpan
FDkeeper/Client.pm view on Meta::CPAN
my $this = {} ;
$this->{path} = $path ;
bless($this, $class) ;
while (my ($k, $v) = each %args){
croak("Invalid attribute '$k'") ;
}
my $client = endp_connect($path) ;
croak("Error connecting to server endpoint '$path': $!") unless $client ;
$client->autoflush(1) ;
$this->{client} = $client ;
return $this ;
}
sub put {
my $this = shift ;
my $fh = shift ;
FDkeeper/Server.pm view on Meta::CPAN
bless($this, $class) ;
while (my ($k, $v) = each %args){
croak("Invalid attribute '$k'") ;
}
if (-e $path){
croak("Can't unlink '$path': $!") unless unlink($path) ;
}
my $server = endp_create($path) ;
croak("Error creating server endpoint '$path': $!") unless $server ;
$this->{server} = $server ;
$this->{next_fhid} = 1 ;
$this->{locker} = {} ;
return $this ;
}
sub DESTROY {
( run in 1.178 second using v1.01-cache-2.11-cpan-2b1a40005be )