Cache-Repository
view release on metacpan or search on metacpan
lib/Cache/Repository.pm view on Meta::CPAN
binmode $fh;
}
$fh->print($cb_opts{data}) if defined $cb_opts{data};
if ($cb_opts{end})
{
$fh->close();
$fh = undef;
chmod $cb_opts{mode}, $filename;
chown $cb_opts{owner}, $cb_opts{group}, $filename;
}
1;
};
return undef unless $self->retrieve_with_callback(
%opts,
callback => $callback,
);
lib/Cache/Repository/Filesys.pm view on Meta::CPAN
if (open my $dst_h, '>', $dstfile)
{
binmode $dst_h;
my $in_h = $opts{filehandle};
print $dst_h $_ while <$in_h>;
$rc = 1;
}
}
chmod $opts{mode}, $dstfile if exists $opts{mode};
chown $opts{owner}, $opts{group}, $dstfile
if exists $opts{owner} and exists $opts{group};
if ($rc)
{
$self->_add_file(%opts);
}
$rc;
}
=item retrieve_with_callback
( run in 0.334 second using v1.01-cache-2.11-cpan-8d75d55dd25 )