App-MARC-Validator-Report
view release on metacpan or search on metacpan
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: App-MARC-Validator-Report
no_index:
directory:
- inc
- t
- xt
requires:
Class::Utils: 0
Cpanel::JSON::XS: 0
Error::Pure: 0
Getopt::Std: 0
Perl6::Slurp: 0
perl: 5.6.0
resources:
bugtracker: https://github.com/michal-josef-spacek/App-MARC-Validator-Report/issues
homepage: https://github.com/michal-josef-spacek/App-MARC-Validator-Report
license: http://opensource.org/licenses/bsd-license.php
repository: git://github.com/michal-josef-spacek/App-MARC-Validator-Report
version: '0.01'
Makefile.PL view on Meta::CPAN
author_requires 'Test::NoWarnings' => 0;
author_requires 'Test::Pod' => 0;
author_requires 'Test::Pod::Coverage' => 0;
install_script 'bin/marc-validator-report';
license 'bsd';
name 'App-MARC-Validator-Report';
perl_version 5.006;
readme_from 'bin/marc-validator-report';
recursive_author_tests('xt');
requires 'Class::Utils' => 0;
requires 'Cpanel::JSON::XS' => 0;
requires 'Error::Pure' => 0;
requires 'Getopt::Std' => 0;
requires 'Perl6::Slurp' => 0;
resources 'bugtracker' => 'https://github.com/michal-josef-spacek/App-MARC-Validator-Report/issues',
resources 'homepage' => 'https://github.com/michal-josef-spacek/App-MARC-Validator-Report';
resources 'repository' => 'git://github.com/michal-josef-spacek/App-MARC-Validator-Report';
test_requires 'English' => 0;
test_requires 'File::Object' => 0;
test_requires 'File::Spec::Functions' => 0;
test_requires 'Test::More' => 0;
package App::MARC::Validator::Report;
use strict;
use warnings;
use Class::Utils qw(set_params);
use Cpanel::JSON::XS;
use Error::Pure qw(err);
use Getopt::Std;
use Perl6::Slurp qw(slurp);
our $VERSION = 0.01;
# Constructor.
sub new {
my ($class, @params) = @_;
return 0;
}
sub _process_report {
my ($self, $report_file) = @_;
my $report = slurp($report_file);
# JSON output.
my $j = Cpanel::JSON::XS->new;
$self->{'_report'} = $j->decode($report);
$self->{'_list'} = {};
foreach my $plugin (keys %{$self->{'_report'}}) {
if (! exists $self->{'_report'}->{$plugin}->{'checks'}) {
err "Doesn't exist key '".$self->{'_report'}->{$plugin}->{'checks'}." in plugin $plugin.";
}
if (! exists $self->{'_report'}->{$plugin}->{'checks'}->{'not_valid'}) {
err "Doesn't exist key '".$self->{'_report'}->{$plugin}->{'checks'}->{'not_valid'}." in plugin $plugin.";
}
( run in 0.840 second using v1.01-cache-2.11-cpan-4ee56698ea0 )