#!/usr/bin/perl

use strict;
use warnings;

use CGI qw(:standard);
use YAML qw(Dump Bless LoadFile);
use YAML::Node;
use Data::Dumper;

my $corpusName = param('corpus');

#my $corpusATT = $hash[0]{ATTRIBUTES};

print header;
print start_html("-title"=>"Corpora Forge"),
		h1("Meta-informa&ccedil;&atilde;o sobre $corpusName"), hr;
#showInfo($corpusName);

my $corpusID;
my $corpusATT;
my $file = "/corpora/$corpusName.meta";
if (-e $file) {
	my $struct = LoadFile($file);
	my @hash = ($struct);
	print p("A meta-informa&ccedil;&atilde;o dispon&iacute;vel sobre este corpus &eacute; a seguinte: \n");
	$corpusID = $hash[0]{CORPUS};
	$corpusATT = $hash[0]{ATTRIBUTES};
	print b("Nome do corpus: "),$corpusID,br;
	print b("Atributos do corpus: "),$corpusATT, br;
}
else {
	print p("N&atilde;o existe meta-informa&ccedil;&atilde;o deste corpus");
}
		
print end_html;

