manpagez: man pages & more
man ExtUtils::PL2Bat(3)
Home | html | info | man
ExtUtils::PL2Bat(3pm)  Perl Programmers Reference Guide  ExtUtils::PL2Bat(3pm)



NAME

       ExtUtils::PL2Bat - Batch file creation to run perl scripts on Windows


VERSION

       version 0.005


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 PATH and run.


FUNCTIONS

   pl2bat(%opts)
       This function takes a perl script and write a batch file that contains
       the script. This is sometimes necessary

       o       "in"

               The name of the script that is to be batchified. This argument
               is mandatory.

       o       "out"

               The name of the output batch file. If not given, it will be
               generated using "in" and "stripsuffix".

       o       "ntargs"

               Arguments to invoke perl with in generated batch file when run
               from Windows NT.  Defaults to '-x -S %0 %*'.

       o       "otherargs"

               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" %1 %2 %3 %4 %5 %6 %7 %8 %9'.

       o       "stripsuffix"

               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 "$" is always assumed).  Defaults to
               "qr/\.plx?/".

       o       "usewarnings"

               With the "usewarnings" option, " -w" is added after the value
               of $Config{startperl}.  If a line matching "/^#!.*perl/"
               already exists in the script, then it is not changed and the -w
               option is ignored.

       o       "update"

               If the script appears to have already been processed by pl2bat,
               then the script is skipped and not processed unless "update"
               was specified.  If "update" is specified, the existing preamble
               is replaced.


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.


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.

perl v5.38.2                      2023-11-28             ExtUtils::PL2Bat(3pm)

perl 5.38.2 - Generated Thu Dec 5 18:46:56 CST 2024
© manpagez.com 2000-2025
Individual documents may contain additional copyright information.