This is yet-another after-candidate2 -S fix:
a) We enable adding extensions for -S search on OS/2 (needed for pod2man
in makemaker after binary install);
b) remove an extra stat();
c) Update docs;
Credited: Gurusamy Sarathy <gsar@engin.umich.edu>
[editor's note: one hunk from original patch was already applied]
p5p-msgid:
199708020823.
EAA19521@monk.mps.ohio-state.edu
*nixish shell (like F<sh.exe> supplied in the binary distribution),
you need to follow the syntax specified in L<perlrun/"Switches">.
+Note that B<-S> switch enables a search with additional extensions
+F<.cmd>, F<.btm>, F<.bat>, F<.pl> as well.
+
=head2 Starting OS/2 (and DOS) programs under Perl
This is what system() (see L<perlfunc/system>), C<``> (see
environment). Known problems: $$ does not work - is 0, waitpid
returns immediately, thus Perl cannot wait for completion of
started programs.
+
+before 5.004_02:
+ -S switch to perl enables a search with additional extensions
+ .cmd, .btm, .bat, .pl as well. This means that if you have
+ mycmd.pl or mycmd.bat on PATH,
+ perl -S mycmd
+ will work. Perl will also look in the current directory first.
+ Moreover, a bug with \; in PATH being non-separator is fixed.
# define SEARCH_EXTS ".bat", ".cmd", NULL
# define MAX_EXT_LEN 4
#endif
+#ifdef OS2
+# define SEARCH_EXTS ".cmd", ".btm", ".bat", ".pl", NULL
+# define MAX_EXT_LEN 4
+#endif
#ifdef VMS
# define SEARCH_EXTS ".pl", ".com", NULL
# define MAX_EXT_LEN 4