{
    "content": [
        {
            "type": "text",
            "text": "# Text::Template::Preprocess (perldoc)\n\n## NAME\n\nText::Template::Preprocess - Expand template text with embedded Perl\n\n## SYNOPSIS\n\nuse Text::Template::Preprocess;\nmy $t = Text::Template::Preprocess->new(...);  # identical to Text::Template\n# Fill in template, but preprocess each code fragment with pp().\nmy $result = $t->fillin(..., PREPROCESSOR => \\&pp);\nmy $oldpp = $t->preprocessor(\\&newpp);\n\n## DESCRIPTION\n\n\"Text::Template::Preprocess\" provides a new \"PREPROCESSOR\" option to \"fillin\". If the\n\"PREPROCESSOR\" option is supplied, it must be a reference to a preprocessor subroutine. When\nfilling out a template, \"Text::Template::Preprocessor\" will use this subroutine to preprocess\nthe program fragment prior to evaluating the code.\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **SEE ALSO**\n- **SOURCE**\n- **BUGS**\n- **AUTHOR**\n- **COPYRIGHT AND LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Text::Template::Preprocess",
        "section": "",
        "mode": "perldoc",
        "summary": "Text::Template::Preprocess - Expand template text with embedded Perl",
        "synopsis": "use Text::Template::Preprocess;\nmy $t = Text::Template::Preprocess->new(...);  # identical to Text::Template\n# Fill in template, but preprocess each code fragment with pp().\nmy $result = $t->fillin(..., PREPROCESSOR => \\&pp);\nmy $oldpp = $t->preprocessor(\\&newpp);",
        "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": 9,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 41,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SOURCE",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Text::Template::Preprocess - Expand template text with embedded Perl\n",
                "subsections": []
            },
            "VERSION": {
                "content": "version 1.60\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Text::Template::Preprocess;\n\nmy $t = Text::Template::Preprocess->new(...);  # identical to Text::Template\n\n# Fill in template, but preprocess each code fragment with pp().\nmy $result = $t->fillin(..., PREPROCESSOR => \\&pp);\n\nmy $oldpp = $t->preprocessor(\\&newpp);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "\"Text::Template::Preprocess\" provides a new \"PREPROCESSOR\" option to \"fillin\". If the\n\"PREPROCESSOR\" option is supplied, it must be a reference to a preprocessor subroutine. When\nfilling out a template, \"Text::Template::Preprocessor\" will use this subroutine to preprocess\nthe program fragment prior to evaluating the code.\n\nThe preprocessor subroutine will be called repeatedly, once for each program fragment. The\nprogram fragment will be in $. The subroutine should modify the contents of $ and return.\n\"Text::Template::Preprocess\" will then execute contents of $ and insert the result into the\nappropriate part of the template.\n\n\"Text::Template::Preprocess\" objects also support a utility method, \"preprocessor()\", which sets\na new preprocessor for the object. This preprocessor is used for all subsequent calls to\n\"fillin\" except where overridden by an explicit \"PREPROCESSOR\" option. \"preprocessor()\" returns\nthe previous default preprocessor function, or undefined if there wasn't one. When invoked with\nno arguments, \"preprocessor()\" returns the object's current default preprocessor function\nwithout changing it.\n\nIn all other respects, \"Text::Template::Preprocess\" is identical to \"Text::Template\".\n\nWHY?\nOne possible purpose: If your files contain a lot of JavaScript, like this:\n\nPlain text here...\n{ perl code }\n<script language=JavaScript>\nif (br== \"n3\") {\n// etc.\n}\n</script>\n{ more perl code }\nMore plain text...\n\nYou don't want \"Text::Template\" to confuse the curly braces in the JavaScript program with\nexecutable Perl code. One strategy:\n\nsub quotescripts {\ns(<script(.*?)</script>)(q{$1})gsi;\n}\n\nThen use \"PREPROCESSOR => \\&quotescripts\". This will transform\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Text::Template\n",
                "subsections": []
            },
            "SOURCE": {
                "content": "The development version is on github at <https://https://github.com/mschout/perl-text-template>\nand may be cloned from <git://https://github.com/mschout/perl-text-template.git>\n",
                "subsections": []
            },
            "BUGS": {
                "content": "Please report any bugs or feature requests on the bugtracker website\n<https://github.com/mschout/perl-text-template/issues>\n\nWhen submitting a bug or request, please include a test-file or a patch to an existing test-file\nthat illustrates the bug or desired feature.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Mark Jason Dominus, Plover Systems\n\nPlease send questions and other remarks about this software to \"mjd-perl-template+@plover.com\"\n\nYou can join a very low-volume (<10 messages per year) mailing list for announcements about this\npackage. Send an empty note to \"mjd-perl-template-request@plover.com\" to join.\n\nFor updates, visit \"http://www.plover.com/~mjd/perl/Template/\".\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "This software is copyright (c) 2013 by Mark Jason Dominus <mjd@cpan.org>.\n\nThis is free software; you can redistribute it and/or modify it under the same terms as the Perl\n5 programming language system itself.\n",
                "subsections": []
            }
        }
    }
}