/usr/pkg/bin/pod2html: perllib/GffRead.pm: unterminated list at =head in paragraph 86. ignoring. /usr/pkg/bin/pod2html: perllib/GffRead.pm: unexpected =item directive in paragraph 91. ignoring. /usr/pkg/bin/pod2html: perllib/GffRead.pm: unexpected =back directive in paragraph 118. ignoring. GffRead - Perl Module to Read Gff datastructures

NAME

GffRead - Perl Module to Read Gff datastructures


ABSTRACT

This module allows easy reading and parsing of the nwn gff files. It returns a hash structure having everything from the gff as a hierarchical hash-structure.


DESCRIPTION

The basic working is that you give hash of options to the GffRead::read, and get Gff object back from there. The data is either read from the string given to the read function, or from the file given to the read function.


GffRead::read

GffRead::read is used to read and parse gff structure. Take hash table of options in, and returns a reference to the Gff(3) object back.

USAGE

\%gff = read(%options);

OPTIONS

Following options can be given to the GffRead::read.


=over 4
filename => filename
Filename to read data from. If this exits, then data is ignored.

data => data
Data buffer to use instead of filename. This only used if filename is no present.

find_label => regexp
Find lables having value matching regexp.

find_label_proc => proc($topgff, $full_label, $label, $value, $type);
Perl procedure to call if label is found.

find_field => regexp
Find fields having value matching regexp.

find_field_proc => proc($top_gff, $full_label, $label, $value, $type);
Perl procedure to call if field is found.

include => regexp
Include structures if their label match the regexp. Note, that if this does not match the whole subtree is skipped, meaning that all the lower level labels cannot match. Use this to include top level structures.

exclude => regexp
Exclude structures if their label match the regexp Note, that if this does match the whole subtree is skipped, meaning that all the lower level labels cannot match. Use this to exclude full path structures.

include_field => regexp
Include the fields if their labels match the regexp.

exclude_field => regexp
Exclude the fields if their labels match the regexp.

no_store => boolean
Do not store anything, simply parse the structure.

seek_pos => offset
Position to seek in file or data.

return_errors => boolean
If false then die on errors, otherwise return undef on error.


GffRead::read_area_name

GffRead::read_area_name is used to quickly read are anem and tag from the area file. The file given can be either area file directly or some other area file (git or gic). Returns list having 2 elements, area name and area tag.

USAGE

($name, $tag) = read_area_name($file);


SEE ALSO

gffprint(1), Gff(3), and GffWrite(3).


AUTHOR

Tero Kivinen <kivinen@iki.fi>.


HISTORY

Created to do automated things for the cerea persistent world.