Mini Shell
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
.\"
.\" 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 >0, 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 "2020-01-17" "perl v5.32.1" "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 3
\& use strict;
\& use warnings;
\& use IO::InnerFile;
\&
\& # Read a subset of a file:
\& my $fh = _some_file_handle;
\& my $start = 10;
\& my $length = 50;
\& my $inner = IO::InnerFile\->new($fh, $start, $length);
\& while (my $line = <$inner>) {
\& # ...
\& }
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
If you have a file handle that can \f(CW\*(C`seek\*(C'\fR and \f(CW\*(C`tell\*(C'\fR, then you
can open an IO::InnerFile on a range of the underlying file.
.SH "CONSTRUCTORS"
.IX Header "CONSTRUCTORS"
IO::InnerFile implements the following constructors.
.SS "new"
.IX Subsection "new"
.Vb 3
\& my $inner = IO::InnerFile\->new($fh);
\& $inner = IO::InnerFile\->new($fh, 10);
\& $inner = IO::InnerFile\->new($fh, 10, 50);
.Ve
.PP
Create a new IO::InnerFile opened on the given file handle.
The file handle supplied \fB\s-1MUST\s0\fR be able to both \f(CW\*(C`seek\*(C'\fR and \f(CW\*(C`tell\*(C'\fR.
.PP
The second and third parameters are start and length. Both are defaulted
to zero (\f(CW0\fR). Negative values are silently coerced to zero.
.SH "METHODS"
.IX Header "METHODS"
IO::InnerFile implements the following methods.
.SS "add_length"
.IX Subsection "add_length"
.Vb 1
\& $inner\->add_length(30);
.Ve
.PP
Add to the virtual length of the inner file by the number given in bytes.
.SS "add_start"
.IX Subsection "add_start"
.Vb 1
\& $inner\->add_start(30);
.Ve
.PP
Add to the virtual position of the inner file by the number given in bytes.
.SS "binmode"
.IX Subsection "binmode"
.Vb 1
\& $inner\->binmode();
.Ve
.PP
This is a \s-1NOOP\s0 method just to satisfy the normal IO::File interface.
.SS "close"
.IX Subsection "close"
.SS "fileno"
.IX Subsection "fileno"
.Vb 1
\& $inner\->fileno();
.Ve
.PP
This is a \s-1NOOP\s0 method just to satisfy the normal IO::File interface.
.SS "flush"
.IX Subsection "flush"
.Vb 1
\& $inner\->flush();
.Ve
.PP
This is a \s-1NOOP\s0 method just to satisfy the normal IO::File interface.
.SS "get_end"
.IX Subsection "get_end"
.Vb 1
\& my $num_bytes = $inner\->get_end();
.Ve
.PP
Get the virtual end position of the inner file in bytes.
.SS "get_length"
.IX Subsection "get_length"
.Vb 1
\& my $num_bytes = $inner\->get_length();
.Ve
.PP
Get the virtual length of the inner file in bytes.
.SS "get_start"
.IX Subsection "get_start"
.Vb 1
\& my $num_bytes = $inner\->get_start();
.Ve
.PP
Get the virtual position of the inner file in bytes.
.SS "getc"
.IX Subsection "getc"
.SS "getline"
.IX Subsection "getline"
.SS "print \s-1LIST\s0"
.IX Subsection "print LIST"
.SS "printf"
.IX Subsection "printf"
.SS "read"
.IX Subsection "read"
.SS "readline"
.IX Subsection "readline"
.SS "seek"
.IX Subsection "seek"
.SS "set_end"
.IX Subsection "set_end"
.Vb 1
\& $inner\->set_end(30);
.Ve
.PP
Set the virtual end of the inner file in bytes (this basically just alters the length).
.SS "set_length"
.IX Subsection "set_length"
.Vb 1
\& $inner\->set_length(30);
.Ve
.PP
Set the virtual length of the inner file in bytes.
.SS "set_start"
.IX Subsection "set_start"
.Vb 1
\& $inner\->set_start(30);
.Ve
.PP
Set the virtual start position of the inner file in bytes.
.SS "tell"
.IX Subsection "tell"
.SS "write"
.IX Subsection "write"
.SH "AUTHOR"
.IX Header "AUTHOR"
Eryq (\fIeryq@zeegee.com\fR).
President, ZeeGee Software Inc (\fIhttp://www.zeegee.com\fR).
.SH "CONTRIBUTORS"
.IX Header "CONTRIBUTORS"
Dianne Skoll (\fIdfs@roaringpenguin.com\fR).
.SH "COPYRIGHT & LICENSE"
.IX Header "COPYRIGHT & LICENSE"
Copyright (c) 1997 Erik (Eryq) Dorfman, ZeeGee Software, Inc. All rights reserved.
.PP
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Zerion Mini Shell 1.0