Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/polettix/io-slice
restrict reads to a range in a file
https://github.com/polettix/io-slice
Last synced: 27 days ago
JSON representation
restrict reads to a range in a file
- Host: GitHub
- URL: https://github.com/polettix/io-slice
- Owner: polettix
- Created: 2014-12-29T02:48:33.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-06-07T17:11:29.000Z (over 7 years ago)
- Last Synced: 2024-10-27T12:32:59.627Z (3 months ago)
- Language: Perl
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
Awesome Lists containing this project
README
NAME
====IO::Slice - restrict reads to a range in a file
SYNOPSIS
========use IO::Slice;
# Define a slice based on a file
my $sfh = IO::Slice->new(
filename => '/path/to/file',
offset => 13,
length => 16,
);# Ditto, based on a previously available filehandle $fh. The
# filehandle MUST be seekable.
my $sfh = IO::Slice->new(
fh => $fh,
offset => 13,
length => 16,
);# Both the filehandle and the filename can be provided. The
# filehandle will win.
my $sfh = IO::Slice->new(
fh => $fh,
filename => '/path/to/file',
offset => 13,
length => 16,
);Whatever the method to create it, `$sfh` can be used as any other
filehandle, mostly.ALL THE REST
============Want to know more? [See the module's documentation](https://metacpan.org/pod/IO::Slice) to figure out
all the bells and whistles of this module!Want to install the latest release? [Go fetch it on CPAN](https://metacpan.org/release/IO-Slice).
Want to contribute? [Fork it on GitHub](https://github.com/polettix/IO-Slice).
That's all folks!