Lire::DlfInfo - Objects that holds information about a DLF file. my $record_count = $dlf_info->record_count; my $start_time = $dlf_info->start_time; my $end_time = $dlf_info->end_time; if ( $dlf_info->is_field_available( "time" ) { ... }; my $key_count = $dlf_info->key_count( "action" ); Object of this class contains information about the DLF content. It can be used to obtain the number of DLF records present in the DLF file, the start and and time, the available and unavailable fields as well as the number of different keys for each indexable field. Creates a new DlfInfo object for a particular schema. The $dlf_fh parameter holds a file handle opened on a DLF file in the appropriate schema.

new_extended( $extended_schema, $extended_dlf_fh )
Creates a new DlfInfo object for an extended schema object based on the same schema of the current DlfInfo. This will compute the statistics concerning the extra fields. Note: you call this constructor as a method on the base DlfInfo object.

start_time()
Returns the start timestamp of the DLF file in epoch time.

end_time()
Returns the end timestamp of the DLF file in epoch time.

record_count()
Returns the number of DLF records in the DLF.

is_field_available( $field )
Returns true if the field is available in the DLF, false otherwise. This method will die() in the case that the requested field isn't defined in the schema.

unavail_fields()
Returns the list of fields that are unavailable in the DLF.

field_keys( $field )
Returns the number of different values there are in the field $field. This will be equal to the number of records in the case of numeric or time field. For large values, it is not a precise number but based on an interpolation from a representative sample. This method will die() in the case that the requested field isn't defined in the schema or that it isn't available. Lire::Program(3pm), Lire::Field(3pm) $Id: DlfInfo.pm,v 1.3 2002/07/30 13:27:09 vanbaal Exp $ Copyright (C) 2001 Stichting LogReport Foundation LogReport@LogReport.org This file is part of Lire. Lire is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html or write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. Francis J. Lacoste <flacoste@logreport.org>