.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "XBase::Base 3pm" .TH XBase::Base 3pm "2017-01-21" "perl v5.24.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" XBase::Base \- Base input output module for XBase suite .SH "SYNOPSIS" .IX Header "SYNOPSIS" Used indirectly, via XBase or XBase::Memo. .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module provides catch-all I/O methods for other XBase classes, should be used by people creating additional XBase classes/methods. There is nothing interesting in here for users of the \fIXBase\fR\|(3) module. Methods in XBase::Base return nothing (undef) on error and the error message can be retrieved using the \fBerrstr\fR method. .PP Methods are: .IP "new" 4 .IX Item "new" Constructor. Creates the object and if the file name is specified, opens the file. .IP "open" 4 .IX Item "open" Opens the file and using method read_header reads the header and sets the object's data structure. The read_header should be defined in the derived class, there is no default. .IP "close" 4 .IX Item "close" Closes the file, doesn't destroy the object. .IP "drop" 4 .IX Item "drop" Unlinks the file. .IP "create_file" 4 .IX Item "create_file" Creates file of given name. Second (optional) parameter is the permission specification for the file. .PP The reading/writing methods assume that the file has got header of length header_len bytes (possibly 0) and then records of length record_len. These two values should be set by the read_header method. .IP "seek_to, seek_to_record" 4 .IX Item "seek_to, seek_to_record" Seeks to absolute position or to the start of the record. .IP "read_record, read_from" 4 .IX Item "read_record, read_from" Reads data from specified position (offset) or from the given record. The second parameter (optional for \fBread_record\fR) is the length to read. It can be negative, and at that case the read will not complain if the file is shorter than requested. .IP "write_to, write_record" 4 .IX Item "write_to, write_record" Writes data to the absolute position or to specified record position. The data is not padded to record_len, just written out. .PP General locking methods are \fBlocksh\fR, \fBlockex\fR and \fBunlock\fR, they call \fB_locksh\fR, \fB_lockex\fR and \fB_unlock\fR which can be redefined to allow any way for locking (not only the default flock). The user is responsible for calling the lock if he needs it. .PP No more description \*(-- check the source code if you need to know more. .SH "VERSION" .IX Header "VERSION" 1.02 .SH "AVAILABLE FROM" .IX Header "AVAILABLE FROM" http://www.adelton.com/perl/DBD\-XBase/ .SH "AUTHOR" .IX Header "AUTHOR" (c) 1997\-\-2011 Jan Pazdziora. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIperl\fR\|(1), \fIXBase\fR\|(3)