| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "ExtUtils::PL2Bat 3perl" |
| 58 |
.TH ExtUtils::PL2Bat 3perl 2025-11-16 "perl v5.40.1" "Perl Programmers Reference Guide" |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
ExtUtils::PL2Bat \- Batch file creation to run perl scripts on Windows |
| 65 |
.SH VERSION |
| 66 |
.IX Header "VERSION" |
| 67 |
version 0.005 |
| 68 |
.SH OVERVIEW |
| 69 |
.IX Header "OVERVIEW" |
| 70 |
This module converts a perl script into a batch file that can be executed on Windows/DOS\-like operating systems. This is intended to allow you to 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 \fBPATH\fR and run. |
| 71 |
.SH FUNCTIONS |
| 72 |
.IX Header "FUNCTIONS" |
| 73 |
.SS pl2bat(%opts) |
| 74 |
.IX Subsection "pl2bat(%opts)" |
| 75 |
This function takes a perl script and write a batch file that contains the script. This is sometimes necessary |
| 76 |
.IP \(bu 8 |
| 77 |
\&\f(CW\*(C`in\*(C'\fR |
| 78 |
.Sp |
| 79 |
The name of the script that is to be batchified. This argument is mandatory. |
| 80 |
.IP \(bu 8 |
| 81 |
\&\f(CW\*(C`out\*(C'\fR |
| 82 |
.Sp |
| 83 |
The name of the output batch file. If not given, it will be generated using \f(CW\*(C`in\*(C'\fR and \f(CW\*(C`stripsuffix\*(C'\fR. |
| 84 |
.IP \(bu 8 |
| 85 |
\&\f(CW\*(C`ntargs\*(C'\fR |
| 86 |
.Sp |
| 87 |
Arguments to invoke perl with in generated batch file when run from |
| 88 |
Windows NT. Defaults to '\-x\ \-S\ \f(CW%0\fR\ %*'. |
| 89 |
.IP \(bu 8 |
| 90 |
\&\f(CW\*(C`otherargs\*(C'\fR |
| 91 |
.Sp |
| 92 |
Arguments to invoke perl with in generated batch file except when |
| 93 |
run from Windows NT (ie. when run from DOS, Windows 3.1, or Windows 95). |
| 94 |
Defaults to '\-x\ \-S\ "%0"\ \f(CW%1\fR\ \f(CW%2\fR\ \f(CW%3\fR\ \f(CW%4\fR\ \f(CW%5\fR\ \f(CW%6\fR\ \f(CW%7\fR\ \f(CW%8\fR\ \f(CW%9\fR'. |
| 95 |
.IP \(bu 8 |
| 96 |
\&\f(CW\*(C`stripsuffix\*(C'\fR |
| 97 |
.Sp |
| 98 |
Strip a suffix string from file name before appending a ".bat" |
| 99 |
suffix. The suffix is not case-sensitive. It can be a regex or a string and a trailing |
| 100 |
\&\f(CW\*(C`$\*(C'\fR is always assumed). Defaults to \f(CW\*(C`qr/\e.plx?/\*(C'\fR. |
| 101 |
.IP \(bu 8 |
| 102 |
\&\f(CW\*(C`usewarnings\*(C'\fR |
| 103 |
.Sp |
| 104 |
With the \f(CW\*(C`usewarnings\*(C'\fR |
| 105 |
option, \f(CW" \-w"\fR is added after the value of \f(CW$Config{startperl}\fR. |
| 106 |
If a line matching \f(CW\*(C`/^#!.*perl/\*(C'\fR already exists in the script, |
| 107 |
then it is not changed and the \fB\-w\fR option is ignored. |
| 108 |
.IP \(bu 8 |
| 109 |
\&\f(CW\*(C`update\*(C'\fR |
| 110 |
.Sp |
| 111 |
If the script appears to have already been processed by \fBpl2bat\fR, |
| 112 |
then the script is skipped and not processed unless \f(CW\*(C`update\*(C'\fR was |
| 113 |
specified. If \f(CW\*(C`update\*(C'\fR is specified, the existing preamble is replaced. |
| 114 |
.SH ACKNOWLEDGEMENTS |
| 115 |
.IX Header "ACKNOWLEDGEMENTS" |
| 116 |
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. |
| 117 |
.SH AUTHOR |
| 118 |
.IX Header "AUTHOR" |
| 119 |
Leon Timmermans <[email protected]> |
| 120 |
.SH "COPYRIGHT AND LICENSE" |
| 121 |
.IX Header "COPYRIGHT AND LICENSE" |
| 122 |
This software is copyright (c) 2015 by Leon Timmermans. |
| 123 |
.PP |
| 124 |
This is free software; you can redistribute it and/or modify it under |
| 125 |
the same terms as the Perl 5 programming language system itself. |