File Coverage

blib/lib/Email/MIME/Kit/ManifestReader/YAML.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 15 15 100.0


line stmt bran cond sub pod time code
1             package Email::MIME::Kit::ManifestReader::YAML 3.000008;
2             # ABSTRACT: read manifest.yaml files
3              
4 1     1   542 use v5.20.0;
  1         4  
5 1     1   6 use Moose;
  1         2  
  1         8  
6              
7             with 'Email::MIME::Kit::Role::ManifestReader',
8             'Email::MIME::Kit::Role::ManifestDesugarer';
9              
10 1     1   8309 use YAML::XS ();
  1         2857  
  1         76  
11              
12             sub read_manifest {
13             my ($self) = @_;
14              
15             my $yaml_ref = $self->kit->kit_reader->get_kit_entry('manifest.yaml');
16              
17             # YAML::XS is documented as expecting UTF-8 bytes, which we give it.
18             my ($content) = YAML::XS::Load($$yaml_ref);
19              
20             return $content;
21             }
22              
23 1     1   8 no Moose;
  1         2  
  1         7  
24             __PACKAGE__->meta->make_immutable;
25             1;
26              
27             __END__
28              
29             =pod
30              
31             =encoding UTF-8
32              
33             =head1 NAME
34              
35             Email::MIME::Kit::ManifestReader::YAML - read manifest.yaml files
36              
37             =head1 VERSION
38              
39             version 3.000008
40              
41             =head1 PERL VERSION
42              
43             This library should run on perls released even a long time ago. It should
44             work on any version of perl released in the last five years.
45              
46             Although it may work on older versions of perl, no guarantee is made that the
47             minimum required version will not be increased. The version may be increased
48             for any reason, and there is no promise that patches will be accepted to
49             lower the minimum required perl.
50              
51             =head1 AUTHOR
52              
53             Ricardo Signes <cpan@semiotic.systems>
54              
55             =head1 COPYRIGHT AND LICENSE
56              
57             This software is copyright (c) 2023 by Ricardo Signes.
58              
59             This is free software; you can redistribute it and/or modify it under
60             the same terms as the Perl 5 programming language system itself.
61              
62             =cut