TBX::Min - Read, write and edit TBX-Min files
version 0.01
use TBX::Min; my $min = TBX::Min->new('/path/to/file.tbx'); my $concepts = $min->concepts;
TBX-Min is a minimal, DCT-style dialect of TBX. This module allows you to read, write and edit the contents of TBX-Min data.
new_from_xml
Creates a new instance of TBX::Min. The single argument should be either a string pointer containing the TBX-Min XML data or the name of the file containing this data is required.
new
Creates a new TBX::Min instance. Optionally you may pass in a hash reference which is used to initialize the object. The allowed hash fields are title, origin, license, directionality, source_lang and target_lang, which correspond to methods of the same name, and concepts, which should be an array reference containing TBX::Min::ConceptEntry objects.
TBX::Min
title
origin
license
directionality
source_lang
target_lang
concepts
TBX::Min::ConceptEntry
Get or set the document title.
Get or set the document origin string (a note about or the title of the document's origin).
Get or set the document license string.
Get or set the document directionality string. This string represents the direction of translation this document is designed for.
Get or set the document source language (abbreviation) string.
Get or set the document target language (abbreviation) string.
doc_lang
Get or set the language used in the document outside of LangGroup contents (such as in the title or origin strings.) This should be an abbreviation such as "en".
LangGroup
Returns an array ref containing the TBX::Min::ConceptEntry objects contained in the document.The array ref is the same one used to store the objects internally, so additions or removals from the array will be reflected in future calls to this method.
add_concept
Adds the input TBX::Min::LangGroup object to the list of language groups contained by this object.
TBX::Min::LangGroup
as_xml
Returns a string pointer containing an XML representation of this TBX-Min document.
Nathan Glenn <garfieldnate@gmail.com>
This software is copyright (c) 2013 by Alan Melby.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install TBX::Min, copy and paste the appropriate command in to your terminal.
cpanm
cpanm TBX::Min
CPAN shell
perl -MCPAN -e shell install TBX::Min
For more information on module installation, please visit the detailed CPAN module installation guide.