{
    "mode": "perldoc",
    "parameter": "ExtUtils::PL2Bat",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/ExtUtils%3A%3APL2Bat/json",
    "generated": "2026-06-03T01:36:15Z",
    "sections": {
        "NAME": {
            "content": "ExtUtils::PL2Bat - Batch file creation to run perl scripts on Windows\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 0.004\n",
            "subsections": []
        },
        "OVERVIEW": {
            "content": "This module converts a perl script into a batch file that can be executed on Windows/DOS-like\noperating systems. This is intended to allow you to use a Perl script like regular programs and\nbatch files where you just enter the name of the script [probably minus the extension] plus any\ncommand-line arguments and the script is found in your PATH and run.\n",
            "subsections": []
        },
        "FUNCTIONS": {
            "content": "pl2bat(%opts)\nThis function takes a perl script and write a batch file that contains the script. This is\nsometimes necessary\n\n*       \"in\"\n\nThe name of the script that is to be batchified. This argument is mandatory.\n\n*       \"out\"\n\nThe name of the output batch file. If not given, it will be generated using \"in\" and\n\"stripsuffix\".\n\n*       \"ntargs\"\n\nArguments to invoke perl with in generated batch file when run from Windows NT. Defaults\nto '-x -S %0 %*'.\n\n*       \"otherargs\"\n\nArguments to invoke perl with in generated batch file except when run from Windows NT\n(ie. when run from DOS, Windows 3.1, or Windows 95). Defaults to\n'-x -S \"%0\" %1 %2 %3 %4 %5 %6 %7 %8 %9'.\n\n*       \"stripsuffix\"\n\nStrip a suffix string from file name before appending a \".bat\" suffix. The suffix is not\ncase-sensitive. It can be a regex or a string and a trailing \"$\" is always assumed).\nDefaults to \"qr/\\.plx?/\".\n\n*       \"usewarnings\"\n\nWith the \"usewarnings\" option, \" -w\" is added after the value of $Config{startperl}. If\na line matching \"/^#!.*perl/\" already exists in the script, then it is not changed and\nthe -w option is ignored.\n\n*       \"update\"\n\nIf the script appears to have already been processed by pl2bat, then the script is\nskipped and not processed unless \"update\" was specified. If \"update\" is specified, the\nexisting preamble is replaced.\n",
            "subsections": []
        },
        "ACKNOWLEDGEMENTS": {
            "content": "This code was taken from Module::Build and then modified; which had taken it from perl's pl2bat\nscript. This module is an attempt at unifying all three implementations.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Leon Timmermans <leont@cpan.org>\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "This software is copyright (c) 2015 by Leon Timmermans.\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": []
        }
    },
    "summary": "ExtUtils::PL2Bat - Batch file creation to run perl scripts on Windows",
    "flags": [],
    "examples": [],
    "see_also": []
}