]> Dogcows Code - chaz/git-codeowners/blob - lib/App/Codeowners/Formatter/YAML.pm
Version 0.47
[chaz/git-codeowners] / lib / App / Codeowners / Formatter / YAML.pm
1 package App::Codeowners::Formatter::YAML;
2 # ABSTRACT: Format codeowners output as YAML
3
4
5 use warnings;
6 use strict;
7
8 our $VERSION = '0.47'; # VERSION
9
10 use parent 'App::Codeowners::Formatter';
11
12 use App::Codeowners::Util qw(zip);
13
14 sub finish {
15 my $self = shift;
16 my $results = shift;
17
18 eval { require YAML } or die "Missing dependency: YAML\n";
19
20 my $columns = $self->columns;
21 $results = [map { +{zip @$columns, @$_} } @$results];
22 print { $self->handle } YAML::Dump($results);
23 }
24
25 1;
26
27 __END__
28
29 =pod
30
31 =encoding UTF-8
32
33 =head1 NAME
34
35 App::Codeowners::Formatter::YAML - Format codeowners output as YAML
36
37 =head1 VERSION
38
39 version 0.47
40
41 =head1 DESCRIPTION
42
43 This is a L<App::Codeowners::Formatter> that formats output using L<YAML>.
44
45 =head1 BUGS
46
47 Please report any bugs or feature requests on the bugtracker website
48 L<https://github.com/chazmcgarvey/git-codeowners/issues>
49
50 When submitting a bug or request, please include a test-file or a
51 patch to an existing test-file that illustrates the bug or desired
52 feature.
53
54 =head1 AUTHOR
55
56 Charles McGarvey <chazmcgarvey@brokenzipper.com>
57
58 =head1 COPYRIGHT AND LICENSE
59
60 This software is copyright (c) 2019 by Charles McGarvey.
61
62 This is free software; you can redistribute it and/or modify it under
63 the same terms as the Perl 5 programming language system itself.
64
65 =cut
This page took 0.03388 seconds and 4 git commands to generate.