table of contents
YAML::Tidy(3) | User Contributed Perl Documentation | YAML::Tidy(3) |
NAME¶
YAML::Tidy - Tidy YAML files
SYNOPSIS¶
% cat in.yaml a: # a comment b: c: d % yamltidy in.yaml a: # a comment b: c: d
DESCRIPTION¶
yamltidy is a linter or rather a formatter for YAML files.
It can adjust formatting without removing comments or blank lines.
For examples see <https://perlpunk.github.io/yamltidy>
The code can be found at <https://github.com/perlpunk/yamltidy>.
FEATURES¶
- Trim trailing spaces
- Adjust indentation
- Add or remove headers and footers
- Remove unnecessary quotes (currently according to the YAML 1.2 Core Schema)
- Serialize reused aliases
Plans¶
METHODS¶
- "new"
-
my $yt = YAML::Tidy->new;
- "tidy"
-
my $outyaml = $yt->tidy($inyaml);
- "highlight"
-
my $ansicolored = $yt->highlight($yaml, 'ansi'); my $html = $yt->highlight($yaml, 'html');
- "cfg"
-
my $cfg = $yt->cfg;
Return YAML::Tidy::Config
AUTHOR¶
Tina Müller <tinita@cpan.org>
SEE ALSO¶
COPYRIGHT AND LICENSE¶
Copyright 2024 by Tina Müller
This library is free software and may be distributed under the same terms as perl itself.
2024-02-02 | perl v5.38.2 |