[HOME]

Path : /proc/self/root/usr/local/share/man/man3/
Upload :
Current File : //proc/self/root/usr/local/share/man/man3/IO::InnerFile.3pm

.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{
.    if \nF \{
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "IO::InnerFile 3"
.TH IO::InnerFile 3 "2015-04-22" "perl v5.16.3" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
IO::InnerFile \- define a file inside another file
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 5
\&    ### Read a subset of a file:
\&    $inner = IO::InnerFile\->new($fh, $start, $length);
\&    while (<$inner>) {
\&        ...
\&    }
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
If you have a filehandle that can \fIseek()\fR and \fItell()\fR, then you 
can open an IO::InnerFile on a range of the underlying file.
.SH "PUBLIC INTERFACE"
.IX Header "PUBLIC INTERFACE"
.IP "new \s-1FILEHANDLE,\s0 [\s-1START,\s0 [\s-1LENGTH\s0]]" 4
.IX Item "new FILEHANDLE, [START, [LENGTH]]"
\&\fIClass method, constructor.\fR
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.
.Sp
Note that \s-1FILEHANDLE\s0 must be able to \fIseek()\fR and \fItell()\fR, in addition
to whatever other methods you may desire for reading it.
.IP "set_length \s-1LENGTH\s0" 4
.IX Item "set_length LENGTH"
.PD 0
.IP "get_length" 4
.IX Item "get_length"
.IP "add_length \s-1NBYTES\s0" 4
.IX Item "add_length NBYTES"
.PD
\&\fIInstance methods.\fR
Get/set the virtual length of the inner file.
.IP "set_start \s-1START\s0" 4
.IX Item "set_start START"
.PD 0
.IP "get_start" 4
.IX Item "get_start"
.IP "add_start \s-1NBYTES\s0" 4
.IX Item "add_start NBYTES"
.PD
\&\fIInstance methods.\fR
Get/set the virtual start position of the inner file.
.IP "binmode" 4
.IX Item "binmode"
.PD 0
.IP "close" 4
.IX Item "close"
.IP "flush" 4
.IX Item "flush"
.IP "getc" 4
.IX Item "getc"
.IP "getline" 4
.IX Item "getline"
.IP "print \s-1LIST\s0" 4
.IX Item "print LIST"
.IP "printf \s-1LIST\s0" 4
.IX Item "printf LIST"
.IP "read \s-1BUF, NBYTES\s0" 4
.IX Item "read BUF, NBYTES"
.IP "readline" 4
.IX Item "readline"
.IP "seek \s-1OFFFSET, WHENCE\s0" 4
.IX Item "seek OFFFSET, WHENCE"
.IP "tell" 4
.IX Item "tell"
.IP "write \s-1ARGS...\s0" 4
.IX Item "write ARGS..."
.PD
\&\fIInstance methods.\fR
Standard filehandle methods.
.SH "VERSION"
.IX Header "VERSION"
\&\f(CW$Id:\fR InnerFile.pm,v 1.4 2005/02/10 21:21:53 dfs Exp $
.SH "AUTHOR"
.IX Header "AUTHOR"
Original version by Doru Petrescu (pdoru@kappa.ro).
.PP
Documentation and by Eryq (eryq@zeegee.com).
.PP
Currently maintained by Dianne Skoll (dfs@roaringpenguin.com).