NAME
ESPPlus::Storage::Record - A single ESP+ Storage record
SYNOPSIS
use ESPPlus::Storage;
my $st = ESPPlus::Storage->new
( { filename => $Repository,
uncompress_function => \&uncompress } );
my $rd = $st->reader;
while ( my $record = $rd->next_record ) {
print $record->record_number, "\t",
$record->expected_length, "\n";
}
DESCRIPTION
ESPPlus::Storage::Record
is an interface to individual ESP+ Storage repository records. Mostly it exists to make the job of uncompressing the internal .Z file easy, the other methods extract information from the record's header.
CONSTRUCTOR
- new
-
my $rc = ESPPlus::Storage::Record->new ( { header_text => \ $header_text, compressed => \ $record_body, uncompress_function => \ &uncompress, record_number => $rec_num } );
This accepts the
header_text
,record_number
and either acompressed
anduncompress_function
parameter OR anuncompressed parameter
.
PROPERTIES
- body
-
This returns the uncompressed content of the record. If the record has already been uncompressed then it caches the inflated form.
- compressed
-
This returns the compressed record (if it is stored).
- uncompressed
-
This returns the stored uncomressed record. This is not populated automatically and you should probably use the
body
method instead. - header_text
-
This returns the original record headers.
- header_length
-
This is the length of the headers.
- expected_length
-
This returns the expected length of the uncompressed record. It is used as a check to see whether the uncompression was successful or not.
- timestamp
-
The record timestamp.
- application
-
The ESP+ Storage repository name.
COPYRIGHT AND LICENSE
Copyright 2003, Joshua b. Jore. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of either:
a) the GNU General Public License as published by the Free Software Foundation; version 2, or
b) the "Artistic License" which comes with Perl.