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
Getopt::Std: 0
List::Util: 1.33
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.04'
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 'Getopt::Std' => 0;
requires 'List::Util' => 1.33;
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 Getopt::Std;
use List::Util 1.33 qw(none);
use Perl6::Slurp qw(slurp);
our $VERSION = 0.04;
# 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'}) {
print STDERR "Doesn't exist key 'checks' in plugin $plugin.";
return 1;
}
if (! exists $self->{'_report'}->{$plugin}->{'checks'}->{'not_valid'}) {
print STDERR "Doesn't exist key 'checks'->'not_valid' in plugin $plugin.";
( run in 1.070 second using v1.01-cache-2.11-cpan-39bf76dae61 )