Bulk/ManifestReader/JSON.pm

filter: Statementstmt 64.7% 11 / 17 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 58.3% 14 / 24 SCAR 8.3
CC
2
Cov
58%
read_manifest
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.3
« Bulk/Command.pm ↑ Summary Bulk/Target.pm »
1 package Email::MIME::Kit::Bulk::ManifestReader::JSON;
2 BEGIN {
3 14 ▶ $Email::MIME::Kit::Bulk::ManifestReader::JSON::AUTHORITY = 'cpan:YANICK';
Subroutine BEGIN: called CC=1 SCAR=0.0
4 }
5 # ABSTRACT: Extension of E::M::K::ManifestReader::JSON for Email::MIME::Kit::Bulk
6 14 $Email::MIME::Kit::Bulk::ManifestReader::JSON::VERSION = '0.0.1';
7  
8 14 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 14 extends 'Email::MIME::Kit::ManifestReader::JSON';
11  
12 sub read_manifest {
13 0 ▶ my ($self) = @_;
Subroutine read_manifest: not called CC=2 SCAR=17.9
Pod undocumented
14  
15 0 my $manifest = 'manifest.json';
16 0 ▶ if ($self->kit->has_language) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->kit->has_language) 0 0 0
17 0 $manifest = 'manifest.' . $self->kit->language . '.json';
18 }
19  
20 0 my $json_ref = $self->kit->kit_reader->get_kit_entry($manifest);
21  
22 0 my $content = JSON->new->decode($$json_ref);
23 }
24  
25 14 __PACKAGE__->meta->make_immutable;
26 14 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
27  
28 14 1;
29  
30 __END__
31  
32 =pod
33  
34 =encoding UTF-8
35  
36 =head1 NAME
37  
38 Email::MIME::Kit::Bulk::ManifestReader::JSON - Extension of E::M::K::ManifestReader::JSON for Email::MIME::Kit::Bulk
39  
40 =head1 VERSION
41  
42 version 0.0.1
43  
44 =head1 DESCRIPTION
45  
46 Extends L<Email::MIME::Kit::ManifestReader::JSON>. The manifest of the
47 kit will be 'C<manifest.I<language>.json>', where I<language> is provided
48 via 'C<targets.json>'. If no language is given, the manifest file defaults
49 to 'C<manifest.json>'.
50  
51 =head1 AUTHORS
52  
53 =over 4
54  
55 =item *
56  
57 Jesse Luehrs <doy@cpan.org>
58  
59 =item *
60  
61 Yanick Champoux <yanick.champoux@iinteractive.com>
62  
63 =back
64  
65 =head1 COPYRIGHT AND LICENSE
66  
67 This software is copyright (c) 2015 by Infinity Interactive <contact@iinteractive.com>.
68  
69 This is free software; you can redistribute it and/or modify it under
70 the same terms as the Perl 5 programming language system itself.
71  
72 =cut
« Bulk/Command.pm ↑ Summary Bulk/Target.pm »