table of contents
other versions
- Tumbleweed 0.11.0-1.2
- Leap-16.0
- Leap-15.6
| 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.
| 2025-03-22 | perl v5.42.0 |