File Coverage

blib/lib/Email/MIME/Kit/Bulk/ManifestReader/JSON.pm
Criterion Covered Total %
statement 12 12 100.0
branch 1 2 50.0
condition n/a
subroutine 3 3 100.0
pod 0 1 0.0
total 16 18 88.8


line stmt bran cond sub pod time code
1             package Email::MIME::Kit::Bulk::ManifestReader::JSON;
2             our $AUTHORITY = 'cpan:YANICK';
3             # ABSTRACT: Extension of E::M::K::ManifestReader::JSON for Email::MIME::Kit::Bulk
4             $Email::MIME::Kit::Bulk::ManifestReader::JSON::VERSION = '0.0.3';
5              
6 10     10   31 use Moose;
  10         11  
  10         80  
7              
8             extends 'Email::MIME::Kit::ManifestReader::JSON';
9              
10             sub read_manifest {
11 5     5 0 2332 my ($self) = @_;
12              
13 5         14 my $manifest = 'manifest.json';
14 5 50       156 if ($self->kit->has_language) {
15 5         198 $manifest = 'manifest.' . $self->kit->language . '.json';
16             }
17              
18 5         164 my $json_ref = $self->kit->kit_reader->get_kit_entry($manifest);
19              
20 5         42060 my $content = JSON->new->decode($$json_ref);
21             }
22              
23             __PACKAGE__->meta->make_immutable;
24 10     10   48905 no Moose;
  10         20  
  10         60  
25              
26             1;
27              
28             __END__
29              
30             =pod
31              
32             =encoding UTF-8
33              
34             =head1 NAME
35              
36             Email::MIME::Kit::Bulk::ManifestReader::JSON - Extension of E::M::K::ManifestReader::JSON for Email::MIME::Kit::Bulk
37              
38             =head1 VERSION
39              
40             version 0.0.3
41              
42             =head1 DESCRIPTION
43              
44             Extends L<Email::MIME::Kit::ManifestReader::JSON>. The manifest of the
45             kit will be 'C<manifest.I<language>.json>', where I<language> is provided
46             via 'C<targets.json>'. If no language is given, the manifest file defaults
47             to 'C<manifest.json>'.
48              
49             =head1 AUTHORS
50              
51             =over 4
52              
53             =item *
54              
55             Jesse Luehrs <doy@cpan.org>
56              
57             =item *
58              
59             Yanick Champoux <yanick.champoux@iinteractive.com>
60              
61             =back
62              
63             =head1 COPYRIGHT AND LICENSE
64              
65             This software is copyright (c) 2017 by Infinity Interactive <contact@iinteractive.com>.
66              
67             This is free software; you can redistribute it and/or modify it under
68             the same terms as the Perl 5 programming language system itself.
69              
70             =cut