.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "ExtUtils::PL2Bat 3perl" .TH ExtUtils::PL2Bat 3perl 2024-01-12 "perl v5.38.2" "Perl Programmers Reference Guide" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME ExtUtils::PL2Bat \- Batch file creation to run perl scripts on Windows .SH VERSION .IX Header "VERSION" version 0.005 .SH OVERVIEW .IX Header "OVERVIEW" 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. .SH FUNCTIONS .IX Header "FUNCTIONS" .SS pl2bat(%opts) .IX Subsection "pl2bat(%opts)" This function takes a perl script and write a batch file that contains the script. This is sometimes necessary .IP \(bu 8 \&\f(CW\*(C`in\*(C'\fR .Sp The name of the script that is to be batchified. This argument is mandatory. .IP \(bu 8 \&\f(CW\*(C`out\*(C'\fR .Sp 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. .IP \(bu 8 \&\f(CW\*(C`ntargs\*(C'\fR .Sp Arguments to invoke perl with in generated batch file when run from Windows NT. Defaults to '\-x\ \-S\ \f(CW%0\fR\ %*'. .IP \(bu 8 \&\f(CW\*(C`otherargs\*(C'\fR .Sp Arguments to invoke perl with in 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"\ \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'. .IP \(bu 8 \&\f(CW\*(C`stripsuffix\*(C'\fR .Sp Strip a suffix string from file name before appending a ".bat" suffix. The suffix is not case-sensitive. It can be a regex or a string and a trailing \&\f(CW\*(C`$\*(C'\fR is always assumed). Defaults to \f(CW\*(C`qr/\e.plx?/\*(C'\fR. .IP \(bu 8 \&\f(CW\*(C`usewarnings\*(C'\fR .Sp With the \f(CW\*(C`usewarnings\*(C'\fR option, \f(CW" \-w"\fR is added after the value of \f(CW$Config{startperl}\fR. If a line matching \f(CW\*(C`/^#!.*perl/\*(C'\fR already exists in the script, then it is not changed and the \fB\-w\fR option is ignored. .IP \(bu 8 \&\f(CW\*(C`update\*(C'\fR .Sp If the script appears to have already been processed by \fBpl2bat\fR, then the script is skipped and not processed unless \f(CW\*(C`update\*(C'\fR was specified. If \f(CW\*(C`update\*(C'\fR is specified, the existing preamble is replaced. .SH ACKNOWLEDGEMENTS .IX Header "ACKNOWLEDGEMENTS" 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. .SH AUTHOR .IX Header "AUTHOR" Leon Timmermans .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2015 by Leon Timmermans. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.