OPM::Validate - Validate .opm files
version 1.13
use v5.20;
use OPM::Validate;
my $content = 'content of .opm file';
my $success = eval {
OPM::Validate->validate( $content );
};
say "It's valid" if $success;
.opm files are used as addons for the Znuny, OTOBO and ((OTRS)) Community Edition ticketing systems. They are XML files with specific XML tags.
This module checks if all needed XML tags are there.
Currently the error messages might be misleading, this is something we are working on.
This checks the given string if it matches the needs. It die
s if an error occurs and returns 1
otherwise.
use v5.10;
use OPM::Validate;
my $content = 'content of .opm file';
my $success = eval {
OPM::Validate->validate( $content );
};
say "It's valid" if $success;
The distribution is contained in a Git repository, so simply clone the repository
$ git clone git://github.com/perlservices/OPM-Validate.git
and change into the newly-created directory.
$ cd OPM-Validate
The project uses Dist::Zilla
to
build the distribution, hence this will need to be installed before
continuing:
$ cpanm Dist::Zilla
To install the required prequisite packages, run the following set of commands:
$ dzil authordeps --missing | cpanm
$ dzil listdeps --author --missing | cpanm
The distribution can be tested like so:
$ dzil test
To run the full set of tests (including author and release-process tests),
add the --author
and --release
options:
$ dzil test --author --release
Perl-Services.de info@perl-services.de
This software is copyright (c) 2021 by Perl-Services.de.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.