{
    "content": [
        {
            "type": "text",
            "text": "# YAML::Any (perldoc)\n\n## NAME\n\nYAML::Any - Pick a YAML implementation and use it.\n\n## SYNOPSIS\n\nuse YAML::Any;\n$YAML::Indent = 3;\nmy $yaml = Dump(@objects);\n\n## DESCRIPTION\n\nThere are several YAML implementations that support the Dump/Load API. This module selects the\nbest one available and uses it.\n\n## Sections\n\n- **NAME**\n- **STATUS**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **ORDER**\n- **OPTIONS**\n- **SUBROUTINES**\n- **METHODS**\n- **EXAMPLES** (1 subsections)\n- **AUTHOR**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "YAML::Any",
        "section": "",
        "mode": "perldoc",
        "summary": "YAML::Any - Pick a YAML implementation and use it.",
        "synopsis": "use YAML::Any;\n$YAML::Indent = 3;\nmy $yaml = Dump(@objects);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "Here is an example for \"DumpFile\":",
            "#!/usr/bin/perl",
            "use strict;",
            "use warnings;",
            "use YAML::Any qw(DumpFile);",
            "my $ds =",
            "array => [5,6,100],",
            "string => \"Hello\",",
            "};",
            "DumpFile(\"hello.yml\", $ds);",
            "When run, this creates a file called \"hello.yml\" in the current working directory, with the",
            "following contents.",
            "---",
            "array:",
            "- 5",
            "- 6",
            "- 100",
            "string: Hello",
            "In turn, the following \"LoadFile\" example, loads the contents from there and accesses them:",
            "#!/usr/bin/perl",
            "use strict;",
            "use warnings;",
            "use YAML::Any qw(LoadFile);",
            "my ($ds) = LoadFile(\"hello.yml\");",
            "print \"String == '\", $ds->{string}, \"'\\n\";",
            "Assuming \"hello.yml\" exists, and is as created by the \"DumpFile\" example, it prints:",
            "$ perl load.pl",
            "String == 'Hello'"
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "STATUS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "ORDER",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SUBROUTINES",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "DumpFile and LoadFile",
                        "lines": 46
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 7,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "YAML::Any - Pick a YAML implementation and use it.\n",
                "subsections": []
            },
            "STATUS": {
                "content": "WARNING: This module will soon be deprecated. The plan is that YAML.pm itself will act like an\n*Any* module.\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use YAML::Any;\n$YAML::Indent = 3;\nmy $yaml = Dump(@objects);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "There are several YAML implementations that support the Dump/Load API. This module selects the\nbest one available and uses it.\n",
                "subsections": []
            },
            "ORDER": {
                "content": "Currently, YAML::Any will choose the first one of these YAML implementations that is installed\non your system:\n\n*   YAML::XS\n\n*   YAML::Syck\n\n*   YAML::Old\n\n*   YAML\n\n*   YAML::Tiny\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "If you specify an option like:\n\n$YAML::Indent = 4;\n\nAnd YAML::Any is using YAML::XS, it will use the proper variable: $YAML::XS::Indent.\n",
                "subsections": []
            },
            "SUBROUTINES": {
                "content": "Like all the YAML modules that YAML::Any uses, the following subroutines are exported by\ndefault:\n\n*   Dump\n\n*   Load\n\nand the following subroutines are exportable by request:\n\n*   DumpFile\n\n*   LoadFile\n",
                "subsections": []
            },
            "METHODS": {
                "content": "YAML::Any provides the following class methods.\n\n\"YAML::Any->order\"\nThis method returns a list of the current possible implementations that YAML::Any will\nsearch for.\n\n\"YAML::Any->implementation\"\nThis method returns the implementation the YAML::Any will use. This result is obtained by\nfinding the first member of YAML::Any->order that is either already loaded in %INC or that\ncan be loaded using \"require\". If no implementation is found, an error will be thrown.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "",
                "subsections": [
                    {
                        "name": "DumpFile and LoadFile",
                        "content": "Here is an example for \"DumpFile\":\n\n#!/usr/bin/perl\n\nuse strict;\nuse warnings;\n\nuse YAML::Any qw(DumpFile);\n\nmy $ds =\n{\narray => [5,6,100],\nstring => \"Hello\",\n};\n\nDumpFile(\"hello.yml\", $ds);\n\nWhen run, this creates a file called \"hello.yml\" in the current working directory, with the\nfollowing contents.\n\n---\narray:\n- 5\n- 6\n- 100\nstring: Hello\n\nIn turn, the following \"LoadFile\" example, loads the contents from there and accesses them:\n\n#!/usr/bin/perl\n\nuse strict;\nuse warnings;\n\nuse YAML::Any qw(LoadFile);\n\nmy ($ds) = LoadFile(\"hello.yml\");\n\nprint \"String == '\", $ds->{string}, \"'\\n\";\n\nAssuming \"hello.yml\" exists, and is as created by the \"DumpFile\" example, it prints:\n\n$ perl load.pl\nString == 'Hello'\n$\n"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Ingy döt Net <ingy@cpan.org>\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright 2001-2014. Ingy döt Net\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n\nSee <http://www.perl.com/perl/misc/Artistic.html>\n",
                "subsections": []
            }
        }
    }
}