]> Dogcows Code - chaz/git-codeowners/blob - lib/App/Codeowners/Formatter/YAML.pm
Release App-Codeowners 0.43
[chaz/git-codeowners] / lib / App / Codeowners / Formatter / YAML.pm
1 package App::Codeowners::Formatter::YAML;
2 # ABSTRACT: Format codeowners output as YAML
3
4 =head1 DESCRIPTION
5
6 This is a L<App::Codeowners::Formatter> that formats output using L<YAML>.
7
8 =cut
9
10 use warnings;
11 use strict;
12
13 our $VERSION = '9999.999'; # VERSION
14
15 use parent 'App::Codeowners::Formatter';
16
17 use App::Codeowners::Util qw(zip);
18
19 sub finish {
20 my $self = shift;
21 my $results = shift;
22
23 eval { require YAML } or die "Missing dependency: YAML\n";
24
25 my $columns = $self->columns;
26 $results = [map { +{zip @$columns, @$_} } @$results];
27 print { $self->handle } YAML::Dump($results);
28 }
29
30 1;
This page took 0.034992 seconds and 4 git commands to generate.