{
    "content": [
        {
            "type": "text",
            "text": "# TAP::Parser::YAMLish::Writer (perldoc)\n\n**Summary:** TAP::Parser::YAMLish::Writer - Write YAMLish data\n\n**Synopsis:** use TAP::Parser::YAMLish::Writer;\nmy $data = {\none => 1,\ntwo => 2,\nthree => [ 1, 2, 3 ],\n};\nmy $yw = TAP::Parser::YAMLish::Writer->new;\n# Write to an array...\n$yw->write( $data, \\@somearray );\n# ...an open file handle...\n$yw->write( $data, $somefilehandle );\n# ...a string ...\n$yw->write( $data, \\$somestring );\n# ...or a closure\n$yw->write( $data, sub {\nmy $line = shift;\nprint \"$line\\n\";\n} );\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **VERSION** (2 lines)\n- **SYNOPSIS** (25 lines)\n- **DESCRIPTION** (2 lines)\n- **METHODS** (1 lines) — 2 subsections\n  - Class Methods (5 lines)\n  - Instance Methods (32 lines)\n- **AUTHOR** (2 lines)\n- **SEE ALSO** (3 lines)\n- **COPYRIGHT** (7 lines)\n\n## Full Content\n\n### NAME\n\nTAP::Parser::YAMLish::Writer - Write YAMLish data\n\n### VERSION\n\nVersion 3.43\n\n### SYNOPSIS\n\nuse TAP::Parser::YAMLish::Writer;\n\nmy $data = {\none => 1,\ntwo => 2,\nthree => [ 1, 2, 3 ],\n};\n\nmy $yw = TAP::Parser::YAMLish::Writer->new;\n\n# Write to an array...\n$yw->write( $data, \\@somearray );\n\n# ...an open file handle...\n$yw->write( $data, $somefilehandle );\n\n# ...a string ...\n$yw->write( $data, \\$somestring );\n\n# ...or a closure\n$yw->write( $data, sub {\nmy $line = shift;\nprint \"$line\\n\";\n} );\n\n### DESCRIPTION\n\nEncodes a scalar, hash reference or array reference as YAMLish.\n\n### METHODS\n\n#### Class Methods\n\n\"new\"\nmy $writer = TAP::Parser::YAMLish::Writer->new;\n\nThe constructor \"new\" creates and returns an empty \"TAP::Parser::YAMLish::Writer\" object.\n\n#### Instance Methods\n\n\"write\"\n$writer->write($obj, $output );\n\nEncode a scalar, hash reference or array reference as YAML.\n\nmy $writer = sub {\nmy $line = shift;\nprint SOMEFILE \"$line\\n\";\n};\n\nmy $data = {\none => 1,\ntwo => 2,\nthree => [ 1, 2, 3 ],\n};\n\nmy $yw = TAP::Parser::YAMLish::Writer->new;\n$yw->write( $data, $writer );\n\nThe $output argument may be:\n\n*   a reference to a scalar to append YAML to\n\n*   the handle of an open file\n\n*   a reference to an array into which YAML will be pushed\n\n*   a code reference\n\nIf you supply a code reference the subroutine will be called once for each line of output with\nthe line as its only argument. Passed lines will have no trailing newline.\n\n### AUTHOR\n\nAndy Armstrong, <andy@hexten.net>\n\n### SEE ALSO\n\nYAML::Tiny, YAML, YAML::Syck, Config::Tiny, CSS::Tiny,\n<http://use.perl.org/~Alias/journal/29427>\n\n### COPYRIGHT\n\nCopyright 2007-2011 Andy Armstrong.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n\nThe full text of the license can be found in the LICENSE file included with this module.\n\n"
        }
    ],
    "structuredContent": {
        "command": "TAP::Parser::YAMLish::Writer",
        "section": "",
        "mode": "perldoc",
        "summary": "TAP::Parser::YAMLish::Writer - Write YAMLish data",
        "synopsis": "use TAP::Parser::YAMLish::Writer;\nmy $data = {\none => 1,\ntwo => 2,\nthree => [ 1, 2, 3 ],\n};\nmy $yw = TAP::Parser::YAMLish::Writer->new;\n# Write to an array...\n$yw->write( $data, \\@somearray );\n# ...an open file handle...\n$yw->write( $data, $somefilehandle );\n# ...a string ...\n$yw->write( $data, \\$somestring );\n# ...or a closure\n$yw->write( $data, sub {\nmy $line = shift;\nprint \"$line\\n\";\n} );",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 25,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Class Methods",
                        "lines": 5
                    },
                    {
                        "name": "Instance Methods",
                        "lines": 32
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 7,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "TAP::Parser::YAMLish::Writer - Write YAMLish data\n",
                "subsections": []
            },
            "VERSION": {
                "content": "Version 3.43\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use TAP::Parser::YAMLish::Writer;\n\nmy $data = {\none => 1,\ntwo => 2,\nthree => [ 1, 2, 3 ],\n};\n\nmy $yw = TAP::Parser::YAMLish::Writer->new;\n\n# Write to an array...\n$yw->write( $data, \\@somearray );\n\n# ...an open file handle...\n$yw->write( $data, $somefilehandle );\n\n# ...a string ...\n$yw->write( $data, \\$somestring );\n\n# ...or a closure\n$yw->write( $data, sub {\nmy $line = shift;\nprint \"$line\\n\";\n} );\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Encodes a scalar, hash reference or array reference as YAMLish.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "",
                "subsections": [
                    {
                        "name": "Class Methods",
                        "content": "\"new\"\nmy $writer = TAP::Parser::YAMLish::Writer->new;\n\nThe constructor \"new\" creates and returns an empty \"TAP::Parser::YAMLish::Writer\" object.\n"
                    },
                    {
                        "name": "Instance Methods",
                        "content": "\"write\"\n$writer->write($obj, $output );\n\nEncode a scalar, hash reference or array reference as YAML.\n\nmy $writer = sub {\nmy $line = shift;\nprint SOMEFILE \"$line\\n\";\n};\n\nmy $data = {\none => 1,\ntwo => 2,\nthree => [ 1, 2, 3 ],\n};\n\nmy $yw = TAP::Parser::YAMLish::Writer->new;\n$yw->write( $data, $writer );\n\nThe $output argument may be:\n\n*   a reference to a scalar to append YAML to\n\n*   the handle of an open file\n\n*   a reference to an array into which YAML will be pushed\n\n*   a code reference\n\nIf you supply a code reference the subroutine will be called once for each line of output with\nthe line as its only argument. Passed lines will have no trailing newline.\n"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Andy Armstrong, <andy@hexten.net>\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "YAML::Tiny, YAML, YAML::Syck, Config::Tiny, CSS::Tiny,\n<http://use.perl.org/~Alias/journal/29427>\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright 2007-2011 Andy Armstrong.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n\nThe full text of the license can be found in the LICENSE file included with this module.\n",
                "subsections": []
            }
        }
    }
}