ExtUtils::PL2Bat(3pm)
Okay bestie, welcome to the ExtUtils::PL2Bat(3pm) page from the Perl Programmers Reference Guide β aka the manual for ExtUtils::PL2Bat π
β¨ NAME β¨
ExtUtils::PL2Bat β batch file creation to run perl scripts on Windows πͺβ¨
π VERSION π
version 0.005 β noted, bestie π
πΈ OVERVIEW πΈ
So hereβs the vibe: this module converts a perl script into a batch file that can be executed on Windows/DOS-like operating systems. The whole point is to let you use a Perl script like regular programs and batch files β where you just enter the name of the script [probably minus the extension] plus any command-line arguments, and the script is found in your PATH and run. Periodt. π¦
π₯ FUNCTIONS π₯
π pl2bat(%opts) π
This function takes a perl script and writes a batch file that contains the script. Sometimes this is just necessary, okay? π
inβ the name of the script that is to be batchified. This argument is mandatory, no cap. π¨outβ the name of the output batch file. If itβs not given, it will be generated usinginandstripsuffix. πntargsβ arguments to invoke perl with in the generated batch file when run from Windows NT. Defaults to-x -S %0 %*β¨otherargsβ arguments to invoke perl with in the generated batch file except when run from Windows NT (ie. when run from DOS, Windows 3.1, or Windows 95). Defaults to-x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9π«stripsuffixβ strip a suffix string from the file name before appending a.batsuffix. The suffix is not case-sensitive. It can be a regex or a string, and a trailing$is always assumed. Defaults toqr/\.plx?/πusewarningsβ with theusewarningsoption, the exact string-wis added after the value of$Config{startperl}. If a line matching/^#!.*perl/already exists in the script, then it is not changed and the-woption is ignored. π«Άupdateβ if the script appears to have already been processed bypl2bat, then the script is skipped and not processed unlessupdatewas specified. Ifupdateis specified, the existing preamble is replaced. π
π ACKNOWLEDGEMENTS π
Real talk: this code was taken from Module::Build and then modified; which had taken it from perlβs pl2bat script. This module is an attempt at unifying all three implementations. Iconic, honestly. π
π AUTHOR π
Leon Timmermans <leont@cpan.org> π
πΊ COPYRIGHT AND LICENSE πΊ
This software is copyright (c) 2015 by Leon Timmermans. π
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. β¨
Later, bestie β this page is from perl v5.42.3, dated 2026-11-03 π
π«Ά
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms