MetaPOD::Format::JSON;
BEGIN {
$MetaPOD::Format::JSON::AUTHORITY = 'cpan:KENTNL';
}
{
$MetaPOD::Format::JSON::VERSION = '0.3.0';
}
# ABSTRACT: Reference implementation of a C<JSON> based MetaPOD
t';
use MetaPOD::Format::JSON::v1;
use MetaPOD::Format::JSON::v1_1;
my $dispatch_table = [
{
version => version->parse('v1.0.0'),
handler => 'MetaPOD::Format::JSON::v1'
},
{
versio
n => version->parse('v1.1.0'),
handler => 'MetaPOD::Format::JSON::v1_1'
}
];
sub supported_versions {
return qw( v1.0.0 v1.1.0 );
}
sub add_segment {
my ( $self, $segment, $result ) = @_
kage MetaPOD::Format::JSON::v1;
BEGIN {
$MetaPOD::Format::JSON::v1::AUTHORITY = 'cpan:KENTNL';
}
{
$MetaPOD::Format::JSON::v1::VERSION = '0.3.0';
}
# ABSTRACT: MetaPOD::JSON v1 SPEC Implementatio
'MetaPOD::Format::JSON::Decoder::v1',
'MetaPOD::Format::JSON::PostCheck::v1',
'MetaPOD::Format::JSON::does::v1',
'MetaPOD::Format::JSON::inherits::v1',
'MetaPOD::Format::JSON::namespace::v1';
);
return $self;
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
MetaPOD::Format::JSON::v1 - MetaPOD::JSON v1 SPEC Implementation
=head1 VERSION
version 0.3.0
=head1 METHODS
=head2 C<feature
:Format::JSON::does::v1;
BEGIN {
$MetaPOD::Format::JSON::does::v1::AUTHORITY = 'cpan:KENTNL';
}
{
$MetaPOD::Format::JSON::does::v1::VERSION = '0.3.0';
}
# ABSTRACT: Implementation of JSON/does fo
ref $does;
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
MetaPOD::Format::JSON::does::v1 - Implementation of JSON/does format component
=head1 VERSION
version 0.3.0
=head1 METHODS
=head2 C<
{does} , $metapod_result );
=begin MetaPOD::JSON v1.1.0
{
"namespace":"MetaPOD::Format::JSON::does::v1",
"interface":"role"
}
=end MetaPOD::JSON
=head1 AUTHOR
Kent Fredric <kentfredric@g
t::JSON::inherits::v1;
BEGIN {
$MetaPOD::Format::JSON::inherits::v1::AUTHORITY = 'cpan:KENTNL';
}
{
$MetaPOD::Format::JSON::inherits::v1::VERSION = '0.3.0';
}
# ABSTRACT: Implementation of JSON/i
inherits;
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
MetaPOD::Format::JSON::inherits::v1 - Implementation of JSON/inherits format component
=head1 VERSION
version 0.3.0
=head1 METHODS
=he
its} , $metapod_result );
=begin MetaPOD::JSON v1.1.0
{
"namespace":"MetaPOD::Format::JSON::inherits::v1",
"interface":"role"
}
=end MetaPOD::JSON
=head1 AUTHOR
Kent Fredric <kentfredric
e MetaPOD::Format::JSON::v1_1;
BEGIN {
$MetaPOD::Format::JSON::v1_1::AUTHORITY = 'cpan:KENTNL';
}
{
$MetaPOD::Format::JSON::v1_1::VERSION = '0.3.0';
}
# ABSTRACT: MetaPOD::JSON v1 SPEC Implementa
:JSON::v1';
with 'MetaPOD::Format::JSON::interface::v1_1';
sub features {
return qw( does inherits namespace interface );
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
MetaPOD::Format::JSON:
JSON v1 SPEC Implementation
=head1 VERSION
version 0.3.0
=head1 METHODS
=head2 C<features>
The list of features this version supports.
does inherits namespace interface
=begin MetaPOD::JSON
:JSON::namespace::v1;
BEGIN {
$MetaPOD::Format::JSON::namespace::v1::AUTHORITY = 'cpan:KENTNL';
}
{
$MetaPOD::Format::JSON::namespace::v1::VERSION = '0.3.0';
}
# ABSTRACT: Implementation of JSON/
espace);
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
MetaPOD::Format::JSON::namespace::v1 - Implementation of JSON/namespace format component
=head1 VERSION
version 0.3.0
=head1 METHODS
=h
ce} , $metapod_result );
=begin MetaPOD::JSON v1.1.0
{
"namespace":"MetaPOD::Format::JSON::namespace::v1",
"interface":"role"
}
=end MetaPOD::JSON
=head1 AUTHOR
Kent Fredric <kentfredric
e warnings;
package MetaPOD::Format::JSON::PostCheck::v1;
BEGIN {
$MetaPOD::Format::JSON::PostCheck::v1::AUTHORITY = 'cpan:KENTNL';
}
{
$MetaPOD::Format::JSON::PostCheck::v1::VERSION = '0.3.0';
}
# ABSTRACT: Handler for unrecognised tokens in C<JSON>
use Moo::Role;
use Carp qw( croak );
sub postcheck {
my ( $self, $data, $result ) = @_;
if ( keys %{$data} ) {
croak 'Keys found n
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
MetaPOD::Format::JSON::PostCheck::v1 - Handler for unrecognised tokens in C<JSON>
=head1 VERSION
version 0.3.0
=head1 METHODS
=head2 C<postcheck
OD::Format::JSON::Decoder::v1;
BEGIN {
$MetaPOD::Format::JSON::Decoder::v1::AUTHORITY = 'cpan:KENTNL';
}
{
$MetaPOD::Format::JSON::Decoder::v1::VERSION = '0.3.0';
}
# ABSTRACT: C<JSON> to Structu
::Tiny qw( try catch );
sub decode {
my ( $self, $data ) = @_;
require JSON;
my $return;
try {
$return = JSON->new->decode($data);
}
catch {
require MetaPOD::Exception::Decode::D
at::JSON::Decoder::v1 - C<JSON> to Structure translation layer
=head1 VERSION
version 0.3.0
=head1 METHODS
=head2 C<decode>
Spec V1 C<JSON> Decoder
my $hash = _SOME_CLASS_->decode( $json_str
warnings;
package MetaPOD::Format::JSON::interface::v1_1;
BEGIN {
$MetaPOD::Format::JSON::interface::v1_1::AUTHORITY = 'cpan:KENTNL';
}
{
$MetaPOD::Format::JSON::interface::v1_1::VERSION = '0.3.0
';
}
# ABSTRACT: Implementation of JSON/interface format component
use Moo::Role;
use Carp qw(croak);
sub supported_interfaces {
return qw( class role type_library exporter single_class functio
erface;
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
MetaPOD::Format::JSON::interface::v1_1 - Implementation of JSON/interface format component
=head1 VERSION
version 0.3.0
=head1 METHODS
=
use strict;
use warnings;
=begin MetaPOD::JSON v1.0.0
{
"namespace":"Example",
"inherits":"Bar"
}
=end MetaPOD::JSON
strict;
use warnings;
=begin MetaPOD::JSON v1.0.0
{
"namespace":"Example",
"inherits": [ "Bar", "Baz" ]
}
=end MetaPOD::JSON
=cut
=for MetaPOD::JSON v1.0.0 { "inherits": "Quux" }
=cut
if ( env_true('AUTHOR_TESTING') or env_true('RELEASE_TESTING') ) {
my $prereqs = parse_meta_json()->effective_prereqs;
my $reqs = $prereqs->requirements_for( 'develop', 'requires' );
my
use strict;
use warnings;
=begin MetaPOD::JSON v1.0.0
{
"namespace":"Example",
"inherits": [ "Bar", "Baz" ]
}
=end MetaPOD::JSON
= cwd();
chdir '/tmp/cpan-fixes';
cpanm(@params);
chdir $cwd;
}
sub parse_meta_json {
$_[0] ||= 'META.json';
require CPAN::Meta;
return CPAN::Meta->load_file( $_[0] );
}
sub capture_stdo
ixes;
$caller_stash->{cpanm_fix} = *cpanm_fix;
$caller_stash->{parse_meta_json} = *parse_meta_json;
$caller_stash->{capture_stdout} = *capture_stdout;
$caller_stash->{deploy_st