- COPYRIGHT AND LICENSE
App::Codeowners::Formatter - Base class for formatting codeowners output
my $formatter = App::Codeowners::Formatter->new(handle => *STDOUT); $formatter->add_result($_) for @results;
This is a base class for formatters. A formatter is a class that takes data records, stringifies them, and prints them to an IO handle.
This class is mostly abstract, though it is also usable as a null formatter where results are simply discarded if it is instantiated directly. These other formatters do more interesting things:
Get the IO handle associated with a formatter.
Get the format string, which may be used to customize the formatting.
Get an arrayref of column headings.
Get an arrayref of all the results that have been provided to the formatter using "add_result" but have not yet been formatted.
$formatter = App::Codeowners::Formatter->new; $formatter = App::Codeowners::Formatter->new(%attributes);
Construct a new formatter.
Destructor calls "finish".
Provide an additional lint result to be formatted.
Begin formatting results. Called before any results are passed to the "stream" method.
This method may print a header to the "handle". This method is used by subclasses and should typically not be called explicitly.
Format one result.
This method is expected to print a string representation of the result to the "handle". This method is used by subclasses and should typically not called be called explicitly.
End formatting results. Called after all results are passed to the "stream" method.
This method may print a footer to the "handle". This method is used by subclasses and should typically not be called explicitly.
@formatters = App::Codeowners::Formatter->formatters;
Get a list of package names of potential formatters within the
Please report any bugs or feature requests on the bugtracker website https://github.com/chazmcgarvey/git-codeowners/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Charles McGarvey <email@example.com>
This software is copyright (c) 2019 by Charles McGarvey.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.