Skip to content

PerlServices/OPM-Validate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kwalitee status GitHub issues CPAN Cover Status Cpan license

NAME

OPM::Validate - Validate .opm files

VERSION

version 1.13

SYNOPSIS

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;

DESCRIPTION

.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.

METHODS

validate

This checks the given string if it matches the needs. It dies 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;

Development

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

AUTHOR

Perl-Services.de info@perl-services.de

COPYRIGHT AND LICENSE

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.