TBX::Checker - Check TBX validity using TBXChecker
version 0.03
use TBX::Checker qw(check); my ($passed, $messages) = check('/path/to/file.tbx'); $passed && print 'ok!' or print join (qq{\n}, @$messages);
This modules allows you to use the Java TBXChecker utility from Perl. It has one function, check which returns the errors found by the TBXChecker (hopefully none!).
check
Checks the validity of the given TBX file. Returns 2 elements: a boolean representing the validity of the input TBX, and an array reference containing messages returned by TBXChecker.
Arguments: a string containing a TBX file path, or a string pointer containing TBX data to be checked, followed by named arguments accepted by TBXChecker. For example: check('file.tbx', loglevel = 'ALL')>. The allowed parameters are listed below:
check('file.tbx', loglevel =
loglevel Increase level of output while processing. OFF => Error code only. SEVERE => Error code only. WARNING => Valid or invalid message (default). INFO => Location of files used in processing. CONFIG => . FINE => . FINER => . FINEST => . ALL => All logging messages. lang ISO-639 lowercase two-letter language code. country ISO-3166 uppercase two-letter country code. variant system System ID to use for relative paths in document. Default: Uses the directory where the file is located. version Displays version information and quits. environment Adds the environmental conditions on startup to the messages.
Keep in mind that if you use a string pointer instead of a file name, all relative URI's will be resolved from the current working directory.
The TBXChecker project is located on SourceForge in a project called tbxutil.
Nathan Glenn <garfieldnate@gmail.com>
This software is copyright (c) 2013 by Alan K. 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::Checker, copy and paste the appropriate command in to your terminal.
cpanm
cpanm TBX::Checker
CPAN shell
perl -MCPAN -e shell install TBX::Checker
For more information on module installation, please visit the detailed CPAN module installation guide.