File Coverage

lib/App/jsonvalidate.pm
Criterion Covered Total %
statement 9 13 69.2
branch 0 2 0.0
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 12 20 60.0


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## JSON Schema Validator - ~/lib/App/jsonvalidate.pm
3             ## Version v0.2.0
4             ## Copyright(c) 2025 DEGUEST Pte. Ltd.
5             ## Author: Jacques Deguest <jack@deguest.jp>
6             ## Created 2025/11/10
7             ## Modified 2025/11/18
8             ## All rights reserved
9             ##
10             ##
11             ## This program is free software; you can redistribute it and/or modify it
12             ## under the same terms as Perl itself.
13             ##----------------------------------------------------------------------------
14             package App::jsonvalidate;
15 1     1   130901 use strict;
  1         1  
  1         27  
16 1     1   3 use warnings;
  1         5  
  1         48  
17 1     1   4 use vars qw( $VERSION );
  1         1  
  1         106  
18             our $VERSION = 'v0.2.0';
19              
20             sub init
21             {
22 0     0 0   my $self = shift( @_ );
23 0           $self->{_init_strict_use_sub} = 1;
24 0 0         $self->SUPER::init( @_ ) || return( $self->pass_error );
25 0           return( $self );
26             }
27              
28             1;
29             # NOTE: POD
30             __END__
31              
32             =encoding utf-8
33              
34             =head1 NAME
35              
36             App::jsonvalidate - App harness for the jsonvalidate CLI
37              
38             =head1 SYNOPSIS
39              
40             Run C<jsonvalidate -h> or C<perldoc jsonvalidate> for more options.
41              
42             =head1 VERSION
43              
44             v0.2.0
45              
46             =head1 DESCRIPTION
47              
48             Tiny distribution wrapper so the C<jsonvalidate> CLI can be installed via CPAN. All functionality is in the C<jsonvalidate> script.
49              
50             =head1 INSTALLATION
51              
52             =head2 Installing using cpanm
53              
54             cpanm App::jsonvalidate
55              
56             If you do not have C<cpanm>, check L<App::cpanminus>
57              
58             This will install C<jsonvalidate> to your bin directory like C</usr/local/bin>
59              
60             =head2 Manual installation
61              
62             Download from https://metacpan.org/pod/App::jsonvalidate
63              
64             Extract the data from the archive
65              
66             tar zxvf App::jsonvalidate-v0.1.0.tar.gz
67              
68             Then, go into the newly created directory, build, and install
69              
70             cd ./App::jsonvalidate && perl Makefile.PL && make && make test && sudo make install
71              
72             =head1 DEPENDENCIES
73              
74             =over 4
75              
76             =item * C<v5.16.0>
77              
78             =item * C<Getopt::Class>
79              
80             =item * C<JSON>
81              
82             =item * C<JSON::Schema::Validate>
83              
84             =item * C<Module::Generic>
85              
86             =item * C<Pod::Usage>
87              
88             =back
89              
90             =head1 AUTHOR
91              
92             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
93              
94             =head1 SEE ALSO
95              
96             L<JSON::Schema::Validate>
97              
98             =head1 COPYRIGHT & LICENSE
99              
100             Copyright(c) 2025 DEGUEST Pte. Ltd.
101              
102             All rights reserved.
103              
104             This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
105              
106             =cut