SYNOPSIS

    ### Read a subset of a file:
    $inner = IO::InnerFile->new($fh, $start, $length);
    while (<$inner>) {
        ...
    }

DESCRIPTION

If you have a filehandle that can seek() and tell(), then you can open an IO::InnerFile on a range of the underlying file.

PUBLIC INTERFACE

new \s-1FILEHANDLE\s0, [\s-1START\s0, [\s-1LENGTH\s0]]

Class method, constructor. Create a new inner-file opened on the given \s-1FILEHANDLE\s0, from bytes \s-1START\s0 to \s-1START+LENGTH\s0. Both \s-1START\s0 and \s-1LENGTH\s0 default to 0; negative values are silently coerced to zero. Note that \s-1FILEHANDLE\s0 must be able to seek() and tell(), in addition to whatever other methods you may desire for reading it.

set_length \s-1LENGTH\s0
get_length
add_length \s-1NBYTES\s0

Instance methods. Get/set the virtual length of the inner file.

set_start \s-1START\s0
get_start
add_start \s-1NBYTES\s0

Instance methods. Get/set the virtual start position of the inner file.

binmode
close
flush
getc
getline
print \s-1LIST\s0
printf \s-1LIST\s0
read \s-1BUF\s0, \s-1NBYTES\s0
readline
seek \s-1OFFFSET\s0, \s-1WHENCE\s0
tell
write \s-1ARGS\s0...

Instance methods. Standard filehandle methods.

VERSION

$Id: InnerFile.pm,v 1.4 2005/02/10 21:21:53 dfs Exp $

AUTHOR

Original version by Doru Petrescu ([email protected]).

Documentation and by Eryq ([email protected]).

Currently maintained by David F. Skoll ([email protected]).