YAML::PP::Common(3)

πŸ’– NAME πŸ’–

okay bestie, this is the YAML::PP::Common man page β€” that's YAML::PP::Common(3) from the User Contributed Perl Documentation β€” and it is literally all about Constants and common functions πŸŽ€βœ¨


✨ SYNOPSIS ✨

you can pull in the style constants with :STYLES, or list them by name like this:

use YAML::PP::Common ':STYLES';
# or
use YAML::PP::Common qw/
    YAML_ANY_SCALAR_STYLE YAML_PLAIN_SCALAR_STYLE
    YAML_SINGLE_QUOTED_SCALAR_STYLE YAML_DOUBLE_QUOTED_SCALAR_STYLE
    YAML_LITERAL_SCALAR_STYLE YAML_FOLDED_SCALAR_STYLE
    YAML_QUOTED_SCALAR_STYLE

    YAML_ANY_SEQUENCE_STYLE
    YAML_BLOCK_SEQUENCE_STYLE YAML_FLOW_SEQUENCE_STYLE

    YAML_ANY_MAPPING_STYLE
    YAML_BLOCK_MAPPING_STYLE YAML_FLOW_MAPPING_STYLE
/;

and for the preserve constants, same deal: :PRESERVE or name them yourself πŸ’…

use YAML::PP::Common ':PRESERVE';
# or
use YAML::PP::Common qw/
    PRESERVE_ALL PRESERVE_ORDER PRESERVE_SCALAR_STYLE PRESERVE_FLOW_STYLE
    PRESERVE_ALIAS
/:
yes, that last line ends in /: exactly like that in the original β€” I am not β€œfixing” it, no cap πŸ™ˆ

πŸ¦‹ DESCRIPTION πŸ¦‹

this module provides common constants and functions for modules working with YAML::PP events ✨ it's giving shared-stash energy for your YAML::PP event besties 🫢


πŸŽ€ FUNCTIONS πŸŽ€

πŸ’… event_to_test_suite πŸ’…

my $string = YAML::PP::Common::event_to_test_suite($event_prom_parser);

(and yes, the variable is spelled $event_prom_parser β€” I see the prom, I'm leaving it exactly as-is πŸ™ˆπŸ’–)

for examples of the returned format, look into this distributions's directory "yaml-test-suite" β€” yep, that possessive is exactly distributions's, preserving it fr fr πŸ’… β€” which is a copy of <https://github.com/yaml/yaml-test-suite> 🌈

πŸ“ test_suite_to_event πŸ“

my $event = YAML::PP::Common::test_suite_to_event($str);

this turns an event string in test suite format into an event hashref ✨ ngl, it's not complete yet 😭

🚨 heads up bestie: test_suite_to_event is not complete yet β€” work-in-progress energy, periodt.

bye bestie, this page is signing off from source/version perl v5.42.0, dated 2026-04-24, under the manual name YAML::PP::Common(3) πŸ’–βœ¨πŸ‘‘

πŸ“¦ where this page comes from