{
    "content": [
        {
            "type": "text",
            "text": "# xsubpp(1) (man)\n\n**Summary:** xsubpp - compiler to convert Perl XS code into C code\n\n**Synopsis:** xsubpp [-v] [-except] [-s pattern] [-prototypes] [-noversioncheck] [-nolinenumbers]\n[-nooptimize] [-typemap typemap] [-output filename]... file.xs\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| — | — | — | Retains '::' in type names so that C++ hierarchical types can be mapped. |\n| — | — | — | Adds exception handling stubs to the C code. |\n| — | — | — | Indicates that a user-supplied typemap should take precedence over the default typemaps. This option may be used multipl |\n| — | — | — | Specifies the name of the output file to generate. If no file is specified, output will be written to standard output. |\n| -v | — | — |  |\n| — | — | — | By default xsubpp will not automatically generate prototype code for all xsubs. This flag will enable prototypes. |\n| — | — | — | Disables the run time test that determines if the object file (derived from the \".xs\" file) and the \".pm\" files have the |\n| — | — | — | Prevents the inclusion of '#line' directives in the output. |\n| — | — | — | Disables certain optimizations. The only optimization that is currently affected is the use of targets by the output C c |\n| — | — | — | Disable recognition of \"IN\", \"OUTLIST\" and \"INOUTLIST\" declarations. |\n| — | — | — | Disable recognition of ANSI-like descriptions of function signature. |\n| — | — | — | perl, at least as far back as perl5.00307. It's allowed here for backwards compatibility. |\n| — | — | — | This option is obscure and discouraged. If specified, the given string will be stripped off from the beginning of the C  |\n\n## See Also\n\n- perl(1)\n- perlxs(1)\n- perlxstut(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (3 lines)\n- **DESCRIPTION** (15 lines)\n- **OPTIONS** (3 lines) — 13 subsections\n  - -hiertype (2 lines)\n  - -except (2 lines)\n  - -typemap typemap (4 lines)\n  - -output filename (3 lines)\n  - -v (1 lines)\n  - -prototypes (3 lines)\n  - -noversioncheck (3 lines)\n  - -nolinenumbers (2 lines)\n  - -nooptimize (4 lines)\n  - -noinout (2 lines)\n  - -noargtypes (2 lines)\n  - -C++ (3 lines)\n  - -s=... -strip=... (12 lines)\n- **ENVIRONMENT** (2 lines)\n- **AUTHOR** (2 lines)\n- **MODIFICATION HISTORY** (2 lines)\n- **SEE ALSO** (5 lines)\n\n## Full Content\n\n### NAME\n\nxsubpp - compiler to convert Perl XS code into C code\n\n### SYNOPSIS\n\nxsubpp [-v] [-except] [-s pattern] [-prototypes] [-noversioncheck] [-nolinenumbers]\n[-nooptimize] [-typemap typemap] [-output filename]... file.xs\n\n### DESCRIPTION\n\nThis compiler is typically run by the makefiles created by ExtUtils::MakeMaker or by\nModule::Build or other Perl module build tools.\n\nxsubpp will compile XS code into C code by embedding the constructs necessary to let C\nfunctions manipulate Perl values and creates the glue necessary to let Perl access those\nfunctions.  The compiler uses typemaps to determine how to map C function parameters and\nvariables to Perl values.\n\nThe compiler will search for typemap files called typemap.  It will use the following search\npath to find default typemaps, with the rightmost typemap taking precedence.\n\n../../../typemap:../../typemap:../typemap:typemap\n\nIt will also use a default typemap installed as \"ExtUtils::typemap\".\n\n### OPTIONS\n\nNote that the \"XSOPT\" MakeMaker option may be used to add these options to any makefiles\ngenerated by MakeMaker.\n\n#### -hiertype\n\nRetains '::' in type names so that C++ hierarchical types can be mapped.\n\n#### -except\n\nAdds exception handling stubs to the C code.\n\n#### -typemap typemap\n\nIndicates that a user-supplied typemap should take precedence over the default typemaps.\nThis option may be used multiple times, with the last typemap having the highest\nprecedence.\n\n#### -output filename\n\nSpecifies the name of the output file to generate.  If no file is specified, output will\nbe written to standard output.\n\n#### -v\n\n#### -prototypes\n\nBy default xsubpp will not automatically generate prototype code for all xsubs. This\nflag will enable prototypes.\n\n#### -noversioncheck\n\nDisables the run time test that determines if the object file (derived from the \".xs\"\nfile) and the \".pm\" files have the same version number.\n\n#### -nolinenumbers\n\nPrevents the inclusion of '#line' directives in the output.\n\n#### -nooptimize\n\nDisables certain optimizations.  The only optimization that is currently affected is the\nuse of targets by the output C code (see perlguts).  This may significantly slow down\nthe generated code, but this is the way xsubpp of 5.005 and earlier operated.\n\n#### -noinout\n\nDisable recognition of \"IN\", \"OUTLIST\" and \"INOUTLIST\" declarations.\n\n#### -noargtypes\n\nDisable recognition of ANSI-like descriptions of function signature.\n\n#### -C++\n\nperl, at least as far back as perl5.00307.  It's allowed here for backwards\ncompatibility.\n\n#### -s=... -strip=...\n\nThis option is obscure and discouraged.\n\nIf specified, the given string will be stripped off from the beginning of the C function\nname in the generated XS functions (if it starts with that prefix).  This only applies\nto XSUBs without \"CODE\" or \"PPCODE\" blocks.  For example, the XS:\n\nvoid foobar(int i);\n\nwhen \"xsubpp\" is invoked with \"-s foo\" will install a \"foobar\" function in Perl, but\nreally call bar(i) in C. Most of the time, this is the opposite of what you want and\nfailure modes are somewhat obscure, so please avoid this option where possible.\n\n### ENVIRONMENT\n\nNo environment variables are used.\n\n### AUTHOR\n\nOriginally by Larry Wall.  Turned into the \"ExtUtils::ParseXS\" module by Ken Williams.\n\n### MODIFICATION HISTORY\n\nSee the file Changes.\n\n### SEE ALSO\n\nperl(1), perlxs(1), perlxstut(1), ExtUtils::ParseXS\n\n\n\nperl v5.34.0                                 2025-07-25                                    XSUBPP(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "xsubpp",
        "section": "1",
        "mode": "man",
        "summary": "xsubpp - compiler to convert Perl XS code into C code",
        "synopsis": "xsubpp [-v] [-except] [-s pattern] [-prototypes] [-noversioncheck] [-nolinenumbers]\n[-nooptimize] [-typemap typemap] [-output filename]... file.xs",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Retains '::' in type names so that C++ hierarchical types can be mapped."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Adds exception handling stubs to the C code."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Indicates that a user-supplied typemap should take precedence over the default typemaps. This option may be used multiple times, with the last typemap having the highest precedence."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specifies the name of the output file to generate. If no file is specified, output will be written to standard output."
            },
            {
                "flag": "-v",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "By default xsubpp will not automatically generate prototype code for all xsubs. This flag will enable prototypes."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Disables the run time test that determines if the object file (derived from the \".xs\" file) and the \".pm\" files have the same version number."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Prevents the inclusion of '#line' directives in the output."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Disables certain optimizations. The only optimization that is currently affected is the use of targets by the output C code (see perlguts). This may significantly slow down the generated code, but this is the way xsubpp of 5.005 and earlier operated."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Disable recognition of \"IN\", \"OUTLIST\" and \"INOUTLIST\" declarations."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Disable recognition of ANSI-like descriptions of function signature."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "perl, at least as far back as perl5.00307. It's allowed here for backwards compatibility."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "This option is obscure and discouraged. If specified, the given string will be stripped off from the beginning of the C function name in the generated XS functions (if it starts with that prefix). This only applies to XSUBs without \"CODE\" or \"PPCODE\" blocks. For example, the XS: void foobar(int i); when \"xsubpp\" is invoked with \"-s foo\" will install a \"foobar\" function in Perl, but really call bar(i) in C. Most of the time, this is the opposite of what you want and failure modes are somewhat obscure, so please avoid this option where possible."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "perl",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/perl/1/json"
            },
            {
                "name": "perlxs",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/perlxs/1/json"
            },
            {
                "name": "perlxstut",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/perlxstut/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 3,
                "subsections": [
                    {
                        "name": "-hiertype",
                        "lines": 2
                    },
                    {
                        "name": "-except",
                        "lines": 2
                    },
                    {
                        "name": "-typemap typemap",
                        "lines": 4
                    },
                    {
                        "name": "-output filename",
                        "lines": 3
                    },
                    {
                        "name": "-v",
                        "lines": 1,
                        "flag": "-v"
                    },
                    {
                        "name": "-prototypes",
                        "lines": 3
                    },
                    {
                        "name": "-noversioncheck",
                        "lines": 3
                    },
                    {
                        "name": "-nolinenumbers",
                        "lines": 2
                    },
                    {
                        "name": "-nooptimize",
                        "lines": 4
                    },
                    {
                        "name": "-noinout",
                        "lines": 2
                    },
                    {
                        "name": "-noargtypes",
                        "lines": 2
                    },
                    {
                        "name": "-C++",
                        "lines": 3
                    },
                    {
                        "name": "-s=... -strip=...",
                        "lines": 12
                    }
                ]
            },
            {
                "name": "ENVIRONMENT",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "MODIFICATION HISTORY",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}