Experimenting in DOS arcana.
[p5sagit/p5-mst-13.2.git] / README.win32
1 If you read this file _as_is_, just ignore the funny characters you\r
2 see. It is written in the POD format (see pod/perlpod.pod) which is\r
3 specially designed to be readable as is.\r
4 \r
5 =head1 NAME\r
6 \r
7 perlwin32 - Perl under Win32\r
8 \r
9 =head1 SYNOPSIS\r
10 \r
11 These are instructions for building Perl under Windows (9x, NT and\r
12 2000).\r
13 \r
14 =head1 DESCRIPTION\r
15 \r
16 Before you start, you should glance through the README file\r
17 found in the top-level directory where the Perl distribution\r
18 was extracted.  Make sure you read and understand the terms under\r
19 which this software is being distributed.\r
20 \r
21 Also make sure you read L<BUGS AND CAVEATS> below for the\r
22 known limitations of this port.\r
23 \r
24 The INSTALL file in the perl top-level has much information that is\r
25 only relevant to people building Perl on Unix-like systems.  In\r
26 particular, you can safely ignore any information that talks about\r
27 "Configure".\r
28 \r
29 You may also want to look at two other options for building\r
30 a perl that will work on Windows NT:  the README.cygwin and\r
31 README.os2 files, which each give a different set of rules to build\r
32 a Perl that will work on Win32 platforms.  Those two methods will\r
33 probably enable you to build a more Unix-compatible perl, but you\r
34 will also need to download and use various other build-time and\r
35 run-time support software described in those files.\r
36 \r
37 This set of instructions is meant to describe a so-called "native"\r
38 port of Perl to Win32 platforms.  The resulting Perl requires no\r
39 additional software to run (other than what came with your operating\r
40 system).  Currently, this port is capable of using one of the\r
41 following compilers:\r
42 \r
43       Borland C++               version 5.02 or later\r
44       Microsoft Visual C++      version 4.2 or later\r
45       Mingw32 with GCC          version 2.95.2 or better\r
46 \r
47 The last of these is a high quality freeware compiler.  Support\r
48 for it is still experimental.  (Older versions of GCC are known\r
49 not to work.)\r
50 \r
51 This port currently supports MakeMaker (the set of modules that\r
52 is used to build extensions to perl).  Therefore, you should be\r
53 able to build and install most extensions found in the CPAN sites.\r
54 See L<Usage Hints> below for general hints about this.\r
55 \r
56 =head2 Setting Up\r
57 \r
58 =over 4\r
59 \r
60 =item Make\r
61 \r
62 You need a "make" program to build the sources.  If you are using\r
63 Visual C++ under Windows NT or 2000, nmake will work.  All other\r
64 builds need dmake.\r
65 \r
66 dmake is a freely available make that has very nice macro features\r
67 and parallelability.\r
68 \r
69 A port of dmake for Windows is available from:\r
70 \r
71     http://www.cpan.org/authors/id/GSAR/dmake-4.1pl1-win32.zip\r
72 \r
73 (This is a fixed version of original dmake sources obtained from\r
74 http://www.wticorp.com/dmake/.  As of version 4.1PL1, the original\r
75 sources did not build as shipped, and had various other problems.\r
76 A patch is included in the above fixed version.)\r
77 \r
78 Fetch and install dmake somewhere on your path (follow the instructions\r
79 in the README.NOW file).\r
80 \r
81 =item Command Shell\r
82 \r
83 Use the default "cmd" shell that comes with NT.  Some versions of the\r
84 popular 4DOS/NT shell have incompatibilities that may cause you trouble.\r
85 If the build fails under that shell, try building again with the cmd\r
86 shell.\r
87 \r
88 The nmake Makefile also has known incompatibilities with the\r
89 "command.com" shell that comes with Windows 9x.  You will need to\r
90 use dmake and makefile.mk to build under Windows 9x.\r
91 \r
92 The surest way to build it is on Windows NT, using the cmd shell.\r
93 \r
94 Make sure the path to the build directory does not contain spaces.  The\r
95 build usually works in this circumstance, but some tests will fail.\r
96 \r
97 =item Borland C++\r
98 \r
99 If you are using the Borland compiler, you will need dmake.\r
100 (The make that Borland supplies is seriously crippled, and will not\r
101 work for MakeMaker builds.)\r
102 \r
103 See L/"Make"> above.\r
104 \r
105 =item Microsoft Visual C++\r
106 \r
107 The nmake that comes with Visual C++ will suffice for building.\r
108 You will need to run the VCVARS32.BAT file usually found somewhere\r
109 like C:\MSDEV4.2\BIN.  This will set your build environment.\r
110 \r
111 You can also use dmake to build using Visual C++, provided:\r
112 you set OSRELEASE to "microsft" (or whatever the directory name\r
113 under which the Visual C dmake configuration lives) in your environment,\r
114 and edit win32/config.vc to change "make=nmake" into "make=dmake".  The\r
115 latter step is only essential if you want to use dmake as your default\r
116 make for building extensions using MakeMaker.\r
117 \r
118 =item Mingw32 with GCC\r
119 \r
120 GCC-2.95.2 binaries can be downloaded from:\r
121 \r
122     ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/\r
123 \r
124 The GCC-2.95.2 bundle comes with Mingw32 libraries and headers.\r
125 \r
126 Make sure you install the binaries that work with MSVCRT.DLL as indicated\r
127 in the README for the GCC bundle.  You may need to set up a few environment\r
128 variables (usually run from a batch file).\r
129 \r
130 The version of gcc-2.95.2-msvcrt.exe released 7 November 1999 left out\r
131 a fix for certain command line quotes, so be sure to download and install\r
132 fixes/quote-fix-msvcrt.exe too.\r
133 \r
134 You also need dmake.  See L</"Make"> above on how to get it.\r
135 \r
136 =back\r
137 \r
138 =head2 Building\r
139 \r
140 =over 4\r
141 \r
142 =item *\r
143 \r
144 Make sure you are in the "win32" subdirectory under the perl toplevel.\r
145 This directory contains a "Makefile" that will work with\r
146 versions of nmake that come with Visual C++, and a dmake "makefile.mk"\r
147 that will work for all supported compilers.  The defaults in the dmake\r
148 makefile are setup to build using the GCC compiler.\r
149 \r
150 =item *\r
151 \r
152 Edit the makefile.mk (or Makefile, if using nmake) and change the values\r
153 of INST_DRV and INST_TOP.   You can also enable various build\r
154 flags.  These are explained in the makefiles.\r
155 \r
156 You will have to make sure CCTYPE is set correctly, and CCHOME points\r
157 to wherever you installed your compiler.\r
158 \r
159 The default value for CCHOME in the makefiles for Visual C++\r
160 may not be correct for some versions.  Make sure the default exists\r
161 and is valid.\r
162 \r
163 If you have either the source or a library that contains des_fcrypt(),\r
164 enable the appropriate option in the makefile.  des_fcrypt() is not\r
165 bundled with the distribution due to US Government restrictions\r
166 on the export of cryptographic software.  Nevertheless, this routine\r
167 is part of the "libdes" library (written by Eric Young) which is widely\r
168 available worldwide, usually along with SSLeay (for example:\r
169 "ftp://fractal.mta.ca/pub/crypto/SSLeay/DES/").  Set CRYPT_SRC to the\r
170 name of the file that implements des_fcrypt().  Alternatively, if\r
171 you have built a library that contains des_fcrypt(), you can set\r
172 CRYPT_LIB to point to the library name.  The location above contains\r
173 many versions of the "libdes" library, all with slightly different\r
174 implementations of des_fcrypt().  Older versions have a single,\r
175 self-contained file (fcrypt.c) that implements crypt(), so they may be\r
176 easier to use.  A patch against the fcrypt.c found in libdes-3.06 is\r
177 in des_fcrypt.patch.\r
178 \r
179 Perl will also build without des_fcrypt(), but the crypt() builtin will\r
180 fail at run time.\r
181 \r
182 Be sure to read the instructions near the top of the makefiles carefully.\r
183 \r
184 =item *\r
185 \r
186 Type "dmake" (or "nmake" if you are using that make).\r
187 \r
188 This should build everything.  Specifically, it will create perl.exe,\r
189 perl56.dll at the perl toplevel, and various other extension dll's\r
190 under the lib\auto directory.  If the build fails for any reason, make\r
191 sure you have done the previous steps correctly.\r
192 \r
193 =back\r
194 \r
195 =head2 Testing\r
196 \r
197 Type "dmake test" (or "nmake test").  This will run most of the tests from\r
198 the testsuite (many tests will be skipped).\r
199 \r
200 There should be no test failures when running under Windows NT 4.0 or\r
201 Windows 2000.  Many tests I<will> fail under Windows 9x due to the inferior\r
202 command shell.\r
203 \r
204 Some test failures may occur if you use a command shell other than the\r
205 native "cmd.exe", or if you are building from a path that contains\r
206 spaces.  So don't do that.\r
207 \r
208 If you are running the tests from a emacs shell window, you may see\r
209 failures in op/stat.t.  Run "dmake test-notty" in that case.\r
210 \r
211 If you're using the Borland compiler, you may see a failure in op/taint.t\r
212 arising from the inability to find the Borland Runtime DLLs on the system\r
213 default path.  You will need to copy the DLLs reported by the messages\r
214 from where Borland chose to install it, into the Windows system directory\r
215 (usually somewhere like C:\WINNT\SYSTEM32), and rerun the test.\r
216 \r
217 Please report any other failures as described under L<BUGS AND CAVEATS>.\r
218 \r
219 =head2 Installation\r
220 \r
221 Type "dmake install" (or "nmake install").  This will put the newly\r
222 built perl and the libraries under whatever C<INST_TOP> points to in the\r
223 Makefile.  It will also install the pod documentation under\r
224 C<$INST_TOP\$VERSION\lib\pod> and HTML versions of the same under\r
225 C<$INST_TOP\$VERSION\lib\pod\html>.  To use the Perl you just installed,\r
226 you will need to add two components to your PATH environment variable,\r
227 C<$INST_TOP\$VERSION\bin>, and C<$INST_TOP\$VERSION\bin\$ARCHNAME>.\r
228 For example:\r
229 \r
230     set PATH c:\perl\5.6.0\bin;c:\perl\5.6.0\bin\MSWin32-x86;%PATH%\r
231 \r
232 If you opt to comment out INST_VER and INST_ARCH in the makefiles, the\r
233 installation structure is much simpler.  In that case, it will be\r
234 sufficient to add a single entry to the path, for instance:\r
235 \r
236     set PATH c:\perl\bin;%PATH%\r
237 \r
238 =head2 Usage Hints\r
239 \r
240 =over 4\r
241 \r
242 =item Environment Variables\r
243 \r
244 The installation paths that you set during the build get compiled\r
245 into perl, so you don't have to do anything additional to start\r
246 using that perl (except add its location to your PATH variable).\r
247 \r
248 If you put extensions in unusual places, you can set PERL5LIB\r
249 to a list of paths separated by semicolons where you want perl\r
250 to look for libraries.  Look for descriptions of other environment\r
251 variables you can set in L<perlrun>.\r
252 \r
253 You can also control the shell that perl uses to run system() and\r
254 backtick commands via PERL5SHELL.  See L<perlrun>.\r
255 \r
256 Perl does not depend on the registry, but it can look up certain default\r
257 values if you choose to put them there.  Perl attempts to read entries from\r
258 C<HKEY_CURRENT_USER\Software\Perl> and C<HKEY_LOCAL_MACHINE\Software\Perl>.\r
259 Entries in the former override entries in the latter.  One or more of the\r
260 following entries (of type REG_SZ or REG_EXPAND_SZ) may be set:\r
261 \r
262     lib-$]              version-specific standard library path to add to @INC\r
263     lib                 standard library path to add to @INC\r
264     sitelib-$]          version-specific site library path to add to @INC\r
265     sitelib             site library path to add to @INC\r
266     vendorlib-$]        version-specific vendor library path to add to @INC\r
267     vendorlib           vendor library path to add to @INC\r
268     PERL*               fallback for all %ENV lookups that begin with "PERL"\r
269 \r
270 Note the C<$]> in the above is not literal.  Substitute whatever version\r
271 of perl you want to honor that entry, e.g. C<5.6.0>.  Paths must be\r
272 separated with semicolons, as usual on win32.\r
273 \r
274 =item File Globbing\r
275 \r
276 By default, perl handles file globbing using the File::Glob extension,\r
277 which provides portable globbing.\r
278 \r
279 If you want perl to use globbing that emulates the quirks of DOS\r
280 filename conventions, you might want to consider using File::DosGlob\r
281 to override the internal glob() implementation.  See L<File::DosGlob> for\r
282 details.\r
283 \r
284 =item Using perl from the command line\r
285 \r
286 If you are accustomed to using perl from various command-line\r
287 shells found in UNIX environments, you will be less than pleased\r
288 with what Windows offers by way of a command shell.\r
289 \r
290 The crucial thing to understand about the Windows environment is that\r
291 the command line you type in is processed twice before Perl sees it.\r
292 First, your command shell (usually CMD.EXE on Windows NT, and\r
293 COMMAND.COM on Windows 9x) preprocesses the command line, to handle\r
294 redirection, environment variable expansion, and location of the\r
295 executable to run. Then, the perl executable splits the remaining\r
296 command line into individual arguments, using the C runtime library\r
297 upon which Perl was built.\r
298 \r
299 It is particularly important to note that neither the shell nor the C\r
300 runtime do any wildcard expansions of command-line arguments (so\r
301 wildcards need not be quoted).  Also, the quoting behaviours of the\r
302 shell and the C runtime are rudimentary at best (and may, if you are\r
303 using a non-standard shell, be inconsistent).  The only (useful) quote\r
304 character is the double quote (").  It can be used to protect spaces in\r
305 arguments and other special characters.  The Windows NT documentation\r
306 has almost no description of how the quoting rules are implemented, but\r
307 here are some general observations based on experiments:  The C runtime\r
308 breaks arguments at spaces and passes them to programs in argc/argv.\r
309 Doublequotes can be used to prevent arguments with spaces in them from\r
310 being split up.  You can put a double quote in an argument by escaping\r
311 it with a backslash and enclosing the whole argument within double\r
312 quotes.  The backslash and the pair of double quotes surrounding the\r
313 argument will be stripped by the C runtime.\r
314 \r
315 The file redirection characters "<", ">", and "|" can be quoted by\r
316 double quotes (although there are suggestions that this may not always\r
317 be true).  Single quotes are not treated as quotes by the shell or the C\r
318 runtime.  The caret "^" has also been observed to behave as a quoting\r
319 character, but this appears to be a shell feature, and the caret is not\r
320 stripped from the command line, so Perl still sees it (and the C runtime\r
321 phase does not treat the caret as a quote character).\r
322 \r
323 Here are some examples of usage of the "cmd" shell:\r
324 \r
325 This prints two doublequotes:\r
326 \r
327     perl -e "print '\"\"' "\r
328 \r
329 This does the same:\r
330 \r
331     perl -e "print \"\\\"\\\"\" "\r
332 \r
333 This prints "bar" and writes "foo" to the file "blurch":\r
334 \r
335     perl -e "print 'foo'; print STDERR 'bar'" > blurch\r
336 \r
337 This prints "foo" ("bar" disappears into nowhereland):\r
338 \r
339     perl -e "print 'foo'; print STDERR 'bar'" 2> nul\r
340 \r
341 This prints "bar" and writes "foo" into the file "blurch":\r
342 \r
343     perl -e "print 'foo'; print STDERR 'bar'" 1> blurch\r
344 \r
345 This pipes "foo" to the "less" pager and prints "bar" on the console:\r
346 \r
347     perl -e "print 'foo'; print STDERR 'bar'" | less\r
348 \r
349 This pipes "foo\nbar\n" to the less pager:\r
350 \r
351     perl -le "print 'foo'; print STDERR 'bar'" 2>&1 | less\r
352 \r
353 This pipes "foo" to the pager and writes "bar" in the file "blurch":\r
354 \r
355     perl -e "print 'foo'; print STDERR 'bar'" 2> blurch | less\r
356 \r
357 \r
358 Discovering the usefulness of the "command.com" shell on Windows 9x\r
359 is left as an exercise to the reader :)\r
360 \r
361 One particularly pernicious problem with the 4NT command shell for\r
362 Windows NT is that it (nearly) always treats a % character as indicating\r
363 that environment variable expansion is needed.  Under this shell, it is\r
364 therefore important to always double any % characters which you want\r
365 Perl to see (for example, for hash variables), even when they are\r
366 quoted.\r
367 \r
368 =item Building Extensions\r
369 \r
370 The Comprehensive Perl Archive Network (CPAN) offers a wealth\r
371 of extensions, some of which require a C compiler to build.\r
372 Look in http://www.cpan.org/ for more information on CPAN.\r
373 \r
374 Note that not all of the extensions available from CPAN may work\r
375 in the Win32 environment; you should check the information at\r
376 http://testers.cpan.org/ before investing too much effort into\r
377 porting modules that don't readily build.\r
378 \r
379 Most extensions (whether they require a C compiler or not) can\r
380 be built, tested and installed with the standard mantra:\r
381 \r
382     perl Makefile.PL\r
383     $MAKE\r
384     $MAKE test\r
385     $MAKE install\r
386 \r
387 where $MAKE is whatever 'make' program you have configured perl to\r
388 use.  Use "perl -V:make" to find out what this is.  Some extensions\r
389 may not provide a testsuite (so "$MAKE test" may not do anything, or\r
390 fail), but most serious ones do.\r
391 \r
392 It is important that you use a supported 'make' program, and\r
393 ensure Config.pm knows about it.  If you don't have nmake, you can\r
394 either get dmake from the location mentioned earlier, or get an\r
395 old version of nmake reportedly available from:\r
396 \r
397     ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe\r
398 \r
399 Another option is to use the make written in Perl, available from\r
400 CPAN:\r
401 \r
402     http://www.cpan.org/authors/id/NI-S/Make-0.03.tar.gz\r
403 \r
404 You may also use dmake.  See L</"Make"> above on how to get it.\r
405 \r
406 Note that MakeMaker actually emits makefiles with different syntax\r
407 depending on what 'make' it thinks you are using.  Therefore, it is\r
408 important that one of the following values appears in Config.pm:\r
409 \r
410     make='nmake'        # MakeMaker emits nmake syntax\r
411     make='dmake'        # MakeMaker emits dmake syntax\r
412     any other value     # MakeMaker emits generic make syntax\r
413                             (e.g GNU make, or Perl make)\r
414 \r
415 If the value doesn't match the 'make' program you want to use,\r
416 edit Config.pm to fix it.\r
417 \r
418 If a module implements XSUBs, you will need one of the supported\r
419 C compilers.  You must make sure you have set up the environment for\r
420 the compiler for command-line compilation.\r
421 \r
422 If a module does not build for some reason, look carefully for\r
423 why it failed, and report problems to the module author.  If\r
424 it looks like the extension building support is at fault, report\r
425 that with full details of how the build failed using the perlbug\r
426 utility.\r
427 \r
428 =item Command-line Wildcard Expansion\r
429 \r
430 The default command shells on DOS descendant operating systems (such\r
431 as they are) usually do not expand wildcard arguments supplied to\r
432 programs.  They consider it the application's job to handle that.\r
433 This is commonly achieved by linking the application (in our case,\r
434 perl) with startup code that the C runtime libraries usually provide.\r
435 However, doing that results in incompatible perl versions (since the\r
436 behavior of the argv expansion code differs depending on the\r
437 compiler, and it is even buggy on some compilers).  Besides, it may\r
438 be a source of frustration if you use such a perl binary with an\r
439 alternate shell that *does* expand wildcards.\r
440 \r
441 Instead, the following solution works rather well. The nice things\r
442 about it: 1) you can start using it right away 2) it is more powerful,\r
443 because it will do the right thing with a pattern like */*/*.c\r
444 3) you can decide whether you do/don't want to use it 4) you can\r
445 extend the method to add any customizations (or even entirely\r
446 different kinds of wildcard expansion).\r
447 \r
448         C:\> copy con c:\perl\lib\Wild.pm\r
449         # Wild.pm - emulate shell @ARGV expansion on shells that don't\r
450         use File::DosGlob;\r
451         @ARGV = map {\r
452                       my @g = File::DosGlob::glob($_) if /[*?]/;\r
453                       @g ? @g : $_;\r
454                     } @ARGV;\r
455         1;\r
456         ^Z\r
457         C:\> set PERL5OPT=-MWild\r
458         C:\> perl -le "for (@ARGV) { print }" */*/perl*.c\r
459         p4view/perl/perl.c\r
460         p4view/perl/perlio.c\r
461         p4view/perl/perly.c\r
462         perl5.005/win32/perlglob.c\r
463         perl5.005/win32/perllib.c\r
464         perl5.005/win32/perlglob.c\r
465         perl5.005/win32/perllib.c\r
466         perl5.005/win32/perlglob.c\r
467         perl5.005/win32/perllib.c\r
468 \r
469 Note there are two distinct steps there: 1) You'll have to create\r
470 Wild.pm and put it in your perl lib directory. 2) You'll need to\r
471 set the PERL5OPT environment variable.  If you want argv expansion\r
472 to be the default, just set PERL5OPT in your default startup\r
473 environment.\r
474 \r
475 If you are using the Visual C compiler, you can get the C runtime's\r
476 command line wildcard expansion built into perl binary.  The resulting\r
477 binary will always expand unquoted command lines, which may not be\r
478 what you want if you use a shell that does that for you.  The expansion\r
479 done is also somewhat less powerful than the approach suggested above.\r
480 \r
481 =item Win32 Specific Extensions\r
482 \r
483 A number of extensions specific to the Win32 platform are available\r
484 from CPAN.  You may find that many of these extensions are meant to\r
485 be used under the Activeware port of Perl, which used to be the only\r
486 native port for the Win32 platform.  Since the Activeware port does not\r
487 have adequate support for Perl's extension building tools, these\r
488 extensions typically do not support those tools either, and therefore\r
489 cannot be built using the generic steps shown in the previous section.\r
490 \r
491 To ensure smooth transitioning of existing code that uses the\r
492 ActiveState port, there is a bundle of Win32 extensions that contains\r
493 all of the ActiveState extensions and most other Win32 extensions from\r
494 CPAN in source form, along with many added bugfixes, and with MakeMaker\r
495 support.  This bundle is available at:\r
496 \r
497    http://www.cpan.org/authors/id/GSAR/libwin32-0.151.zip\r
498 \r
499 See the README in that distribution for building and installation\r
500 instructions.  Look for later versions that may be available at the\r
501 same location.\r
502 \r
503 =item Running Perl Scripts\r
504 \r
505 Perl scripts on UNIX use the "#!" (a.k.a "shebang") line to\r
506 indicate to the OS that it should execute the file using perl.\r
507 Win32 has no comparable means to indicate arbitrary files are\r
508 executables.\r
509 \r
510 Instead, all available methods to execute plain text files on\r
511 Win32 rely on the file "extension".  There are three methods\r
512 to use this to execute perl scripts:\r
513 \r
514 =over 8\r
515 \r
516 =item 1\r
517 \r
518 There is a facility called "file extension associations" that will\r
519 work in Windows NT 4.0.  This can be manipulated via the two\r
520 commands "assoc" and "ftype" that come standard with Windows NT\r
521 4.0.  Type "ftype /?" for a complete example of how to set this\r
522 up for perl scripts (Say what?  You thought Windows NT wasn't\r
523 perl-ready? :).\r
524 \r
525 =item 2\r
526 \r
527 Since file associations don't work everywhere, and there are\r
528 reportedly bugs with file associations where it does work, the\r
529 old method of wrapping the perl script to make it look like a\r
530 regular batch file to the OS, may be used.  The install process\r
531 makes available the "pl2bat.bat" script which can be used to wrap\r
532 perl scripts into batch files.  For example:\r
533 \r
534         pl2bat foo.pl\r
535 \r
536 will create the file "FOO.BAT".  Note "pl2bat" strips any\r
537 .pl suffix and adds a .bat suffix to the generated file.\r
538 \r
539 If you use the 4DOS/NT or similar command shell, note that\r
540 "pl2bat" uses the "%*" variable in the generated batch file to\r
541 refer to all the command line arguments, so you may need to make\r
542 sure that construct works in batch files.  As of this writing,\r
543 4DOS/NT users will need a "ParameterChar = *" statement in their\r
544 4NT.INI file, or will need to execute "setdos /p*" in the 4DOS/NT\r
545 startup file to enable this to work.\r
546 \r
547 =item 3\r
548 \r
549 Using "pl2bat" has a few problems:  the file name gets changed,\r
550 so scripts that rely on C<$0> to find what they must do may not\r
551 run properly; running "pl2bat" replicates the contents of the\r
552 original script, and so this process can be maintenance intensive\r
553 if the originals get updated often.  A different approach that\r
554 avoids both problems is possible.\r
555 \r
556 A script called "runperl.bat" is available that can be copied\r
557 to any filename (along with the .bat suffix).  For example,\r
558 if you call it "foo.bat", it will run the file "foo" when it is\r
559 executed.  Since you can run batch files on Win32 platforms simply\r
560 by typing the name (without the extension), this effectively\r
561 runs the file "foo", when you type either "foo" or "foo.bat".\r
562 With this method, "foo.bat" can even be in a different location\r
563 than the file "foo", as long as "foo" is available somewhere on\r
564 the PATH.  If your scripts are on a filesystem that allows symbolic\r
565 links, you can even avoid copying "runperl.bat".\r
566 \r
567 Here's a diversion:  copy "runperl.bat" to "runperl", and type\r
568 "runperl".  Explain the observed behavior, or lack thereof. :)\r
569 Hint: .gnidnats llits er'uoy fi ,"lrepnur" eteled :tniH\r
570 \r
571 =back\r
572 \r
573 =item Miscellaneous Things\r
574 \r
575 A full set of HTML documentation is installed, so you should be\r
576 able to use it if you have a web browser installed on your\r
577 system.\r
578 \r
579 C<perldoc> is also a useful tool for browsing information contained\r
580 in the documentation, especially in conjunction with a pager\r
581 like C<less> (recent versions of which have Win32 support).  You may\r
582 have to set the PAGER environment variable to use a specific pager.\r
583 "perldoc -f foo" will print information about the perl operator\r
584 "foo".\r
585 \r
586 If you find bugs in perl, you can run C<perlbug> to create a\r
587 bug report (you may have to send it manually if C<perlbug> cannot\r
588 find a mailer on your system).\r
589 \r
590 =back\r
591 \r
592 =head1 BUGS AND CAVEATS\r
593 \r
594 Some of the built-in functions do not act exactly as documented in\r
595 L<perlfunc>, and a few are not implemented at all.  To avoid\r
596 surprises, particularly if you have had prior exposure to Perl\r
597 in other operating environments or if you intend to write code\r
598 that will be portable to other environments, see L<perlport>\r
599 for a reasonably definitive list of these differences.\r
600 \r
601 Not all extensions available from CPAN may build or work properly\r
602 in the Win32 environment.  See L</"Building Extensions">.\r
603 \r
604 Most C<socket()> related calls are supported, but they may not\r
605 behave as on Unix platforms.  See L<perlport> for the full list.\r
606 \r
607 Signal handling may not behave as on Unix platforms (where it\r
608 doesn't exactly "behave", either :).  For instance, calling C<die()>\r
609 or C<exit()> from signal handlers will cause an exception, since most\r
610 implementations of C<signal()> on Win32 are severely crippled.\r
611 Thus, signals may work only for simple things like setting a flag\r
612 variable in the handler.  Using signals under this port should\r
613 currently be considered unsupported.\r
614 \r
615 Please send detailed descriptions of any problems and solutions that \r
616 you may find to <F<perlbug@perl.com>>, along with the output produced\r
617 by C<perl -V>.\r
618 \r
619 =head1 AUTHORS\r
620 \r
621 =over 4\r
622 \r
623 Gary Ng E<lt>71564.1743@CompuServe.COME<gt>\r
624 \r
625 Gurusamy Sarathy E<lt>gsar@activestate.comE<gt>\r
626 \r
627 Nick Ing-Simmons E<lt>nick@ni-s.u-net.comE<gt>\r
628 \r
629 =back\r
630 \r
631 This document is maintained by Gurusamy Sarathy.\r
632 \r
633 =head1 SEE ALSO\r
634 \r
635 L<perl>\r
636 \r
637 =head1 HISTORY\r
638 \r
639 This port was originally contributed by Gary Ng around 5.003_24,\r
640 and borrowed from the Hip Communications port that was available\r
641 at the time.  Various people have made numerous and sundry hacks\r
642 since then.\r
643 \r
644 Borland support was added in 5.004_01 (Gurusamy Sarathy).\r
645 \r
646 GCC/mingw32 support was added in 5.005 (Nick Ing-Simmons).\r
647 \r
648 Support for PERL_OBJECT was added in 5.005 (ActiveState Tool Corp).\r
649 \r
650 Support for fork() emulation was added in 5.6 (ActiveState Tool Corp).\r
651 \r
652 Win9x support was added in 5.6 (Benjamin Stuhl).\r
653 \r
654 Last updated: 22 March 2000\r
655 \r
656 =cut\r