App-MARC-Validator
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
no_index:
directory:
- inc
- t
- xt
requires:
Class::Utils: 0
Cpanel::JSON::XS: 0
English: 0
Getopt::Std: 0
IO::Barf: 0
MARC::File::XML: 1.0.4
MARC::Validator: 0
Unicode::UTF8: 0
perl: 5.6.0
resources:
bugtracker: https://github.com/michal-josef-spacek/App-MARC-Validator/issues
homepage: https://github.com/michal-josef-spacek/App-MARC-Validator
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';
license 'bsd';
name 'App-MARC-Validator';
perl_version 5.006;
readme_from 'bin/marc-validator';
recursive_author_tests('xt');
requires 'Class::Utils' => 0;
requires 'Cpanel::JSON::XS' => 0;
requires 'English' => 0;
requires 'Getopt::Std' => 0;
requires 'IO::Barf' => 0;
requires 'MARC::Validator' => 0;
requires 'MARC::File::XML' => '1.0.4';
requires 'Unicode::UTF8' => 0;
resources 'bugtracker' => 'https://github.com/michal-josef-spacek/App-MARC-Validator/issues',
resources 'homepage' => 'https://github.com/michal-josef-spacek/App-MARC-Validator';
resources 'repository' => 'git://github.com/michal-josef-spacek/App-MARC-Validator';
test_requires 'English' => 0;
Validator.pm view on Meta::CPAN
package App::MARC::Validator;
use strict;
use warnings;
use Class::Utils qw(set_params);
use Cpanel::JSON::XS;
use English;
use Getopt::Std;
use IO::Barf qw(barf);
use MARC::Validator;
use MARC::File::XML (BinaryEncoding => 'utf8', RecordFormat => 'MARC21');
use Unicode::UTF8 qw(encode_utf8);
our $VERSION = 0.01;
# Constructor.
Validator.pm view on Meta::CPAN
}
}
$self->_postprocess_plugins;
my $output_struct_hr = {};
foreach my $plugin_obj (@{$self->{'_plugins'}}) {
$output_struct_hr->{$plugin_obj->name} = $plugin_obj->struct;
}
# JSON output.
my $j = Cpanel::JSON::XS->new;
if ($self->{'_opts'}->{'p'}) {
$j = $j->pretty;
}
my $json = $j->canonical(1)->encode($output_struct_hr);
# Save to file.
if (defined $self->{'_opts'}->{'o'}) {
barf($self->{'_opts'}->{'o'}, encode_utf8($json));
# Print to STDOUT.
( run in 1.245 second using v1.01-cache-2.11-cpan-4ee56698ea0 )