package TDS::Information;
# $Id: Information.pm,v 1.7 2000/12/20 14:59:35 tom Exp $
################################################################

use strict;
use vars qw(@ISA);

use ObjectTemplate;
@ISA = qw(ObjectTemplate);

use JConv;

use TDS::System;
use TDS::DirInfo;

attributes qw(data filename);
################################################################
sub initialize($)
{
    my $self = shift;

    $self->filename(GetDataDir() . '/information.dat')
	unless $self->filename;

    $self->SUPER::initialize;
}
sub Read($)
{
    my $self = shift;

    my $data;
    if (open(F, $self->filename)){
	while (<F>){
	    $data .= $_;
	}
	close F;

	if ($data){
	    *jconv_tmp = mkjconv('auto', $TDS::System::InternalJcode);
	    jconv_tmp(\$data);
	}
	$self->data($data);
    }
}
sub AsPlain($)
{
    my $self = shift;

    return $self->data;
}
1;

