Scroll to navigation

LOCALE::PO4A::YAMLFRONTMATTER.3PM(1) User Contributed Perl Documentation LOCALE::PO4A::YAMLFRONTMATTER.3PM(1)

NAME

Locale::Po4a::YamlFrontMatter - parse YAML front matter

DESCRIPTION

The po4a (PO for anything) project goal is to ease translations (and more interestingly, the maintenance of translations) using gettext tools on areas where they were not expected like documentation.

Locale::Po4a::YamlFrontMatter is a module to parse YAML front matter, especially in Markdown documents. This is intended to be used by other format modules such as "Text" module.

FUNCTIONS

"parse_yaml_front_matter"

Parse YAML Front Matter (especially in Markdown documents).

If the text starts with a YAML "---\n" separator, the full text until the next YAML "---\n" separator is considered YAML metadata. The "...\n" "end of document" separator can be used at the end of the YAML block.

It takes three arguments $ref, and $options. $options is a hash reference which has keys "keys", "skip_array", "paths", and "lenient".

Returns truthy value if it is a valid YAML, otherwise returns falthy value.

AUTHORS

 Nicolas François <nicolas.francois@centraliens.net>

COPYRIGHT AND LICENSE

 Copyright © 2005-2008 Nicolas FRANÇOIS <nicolas.francois@centraliens.net>.
 Copyright © 2008-2009, 2018 Jonas Smedegaard <dr@jones.dk>.
 Copyright © 2020 Martin Quinson <mquinson#debian.org>.

This program is free software; you may redistribute it and/or modify it under the terms of GPL v2.0 or later (see the COPYING file).

2026-03-23 perl v5.42.0