|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| Cross/ | | 03-Oct-2014 | - | 1,591 | 1,439 |
| NetWare/ | | 03-Oct-2014 | - | 19,189 | 13,875 |
| Porting/ | | 03-Oct-2014 | - | 17,427 | 14,245 |
| apollo/ | | 03-Oct-2014 | - | 9 | 4 |
| beos/ | | 03-Oct-2014 | - | 161 | 99 |
| cygwin/ | | 03-Oct-2014 | - | 527 | 365 |
| djgpp/ | | 03-Oct-2014 | - | 719 | 594 |
| emacs/ | | 03-Oct-2014 | - | 8,765 | 6,353 |
| epoc/ | | 03-Oct-2014 | - | 1,566 | 1,319 |
| ext/ | | 03-Oct-2014 | - | 442,370 | 384,770 |
| h2pl/ | | 03-Oct-2014 | - | 578 | 491 |
| hints/ | | 03-Oct-2014 | - | 12,027 | 6,864 |
| jpl/ | | 03-Oct-2014 | - | 9,462 | 7,842 |
| lib/ | | 03-Oct-2014 | - | 331,323 | 226,000 |
| mint/ | | 03-Oct-2014 | - | 156 | 82 |
| mpeix/ | | 03-Oct-2014 | - | 1,437 | 834 |
| os2/ | | 03-Oct-2014 | - | 15,782 | 11,270 |
| plan9/ | | 03-Oct-2014 | - | 10,443 | 9,243 |
| pod/ | | 03-Oct-2014 | - | 146,163 | 100,579 |
| qnx/ | | 03-Oct-2014 | - | 59 | 23 |
| t/ | | 03-Oct-2014 | - | 58,032 | 45,093 |
| utils/ | | 03-Oct-2014 | - | 9,750 | 7,698 |
| uts/ | | 03-Oct-2014 | - | 372 | 271 |
| vmesa/ | | 03-Oct-2014 | - | 620 | 353 |
| vms/ | | 03-Oct-2014 | - | 18,534 | 14,066 |
| vos/ | | 03-Oct-2014 | - | 10,983 | 3,121 |
| win32/ | | 03-Oct-2014 | - | 43,268 | 36,074 |
| wince/ | | 03-Oct-2014 | - | 20,242 | 16,283 |
| x2p/ | | 03-Oct-2014 | - | 11,622 | 10,393 |
| AUTHORS | D | 30-Jun-2006 | 30.7 KiB | 861 | 860 |
| Artistic | D | 05-Feb-2005 | 6 KiB | 132 | 99 |
| Changes | D | 30-Jun-2006 | 354.9 KiB | 8,121 | 6,993 |
| Changes5.000 | D | 05-Feb-2005 | 7.5 KiB | 186 | 129 |
| Changes5.001 | D | 05-Feb-2005 | 47 KiB | 1,300 | 1,039 |
| Changes5.002 | D | 05-Feb-2005 | 118.5 KiB | 4,004 | 2,844 |
| Changes5.003 | D | 05-Feb-2005 | 4.1 KiB | 101 | 76 |
| Changes5.004 | D | 05-Feb-2005 | 500.7 KiB | 16,074 | 11,776 |
| Changes5.005 | D | 05-Feb-2005 | 1,012.9 KiB | 19,342 | 18,635 |
| Changes5.6 | D | 05-Feb-2005 | 1.4 MiB | 27,431 | 27,112 |
| Changes5.8 | D | 30-Jun-2006 | 4.5 MiB | | |
| Changes5.8.1 | D | 30-Jun-2006 | 728.7 KiB | 16,706 | 14,368 |
| Changes5.8.2 | D | 05-Feb-2005 | 60.4 KiB | 1,308 | 1,228 |
| Changes5.8.3 | D | 05-Feb-2005 | 100.2 KiB | 2,176 | 2,009 |
| Changes5.8.4 | D | 05-Feb-2005 | 111.2 KiB | 2,491 | 2,190 |
| Changes5.8.5 | D | 05-Feb-2005 | 79.6 KiB | 1,796 | 1,584 |
| Changes5.8.6 | D | 30-Jun-2006 | 91.1 KiB | 2,019 | 1,796 |
| Changes5.8.7 | D | 30-Jun-2006 | 170.3 KiB | 3,843 | 3,334 |
| Configure | D | 23-Mar-2014 | 495.6 KiB | 22,122 | 20,541 |
| Copying | D | 05-Feb-2005 | 12.2 KiB | 249 | 200 |
| EXTERN.h | D | 05-Feb-2005 | 1.7 KiB | 62 | 42 |
| INSTALL | D | 30-Jun-2006 | 104 KiB | 2,654 | 1,992 |
| INTERN.h | D | 05-Feb-2005 | 1.4 KiB | 55 | 35 |
| MANIFEST | D | 13-Dec-2008 | 151.1 KiB | 3,118 | 3,117 |
| META.yml | D | 30-Jun-2006 | 6 KiB | 254 | 251 |
| Makefile.SH | D | 30-Jun-2006 | 43.6 KiB | 1,439 | 975 |
| Makefile.bsd-wrapper | D | 12-Mar-2014 | 5.3 KiB | 184 | 123 |
| Makefile.bsd-wrapper1 | D | 29-Jun-2012 | 21.5 KiB | 555 | 536 |
| Makefile.micro | D | 05-Feb-2005 | 3.6 KiB | 161 | 106 |
| Policy_sh.SH | D | 05-Feb-2005 | 7.9 KiB | 256 | 123 |
| README | D | 30-Jun-2006 | 4.1 KiB | 89 | 67 |
| README.Y2K | D | 05-Feb-2005 | 2.3 KiB | 48 | 40 |
| README.aix | D | 30-Jun-2006 | 10.4 KiB | 271 | 204 |
| README.amiga | D | 05-Feb-2005 | 6.9 KiB | 279 | 175 |
| README.apollo | D | 05-Feb-2005 | 829 | 24 | 16 |
| README.beos | D | 30-Jun-2006 | 2.9 KiB | 110 | 67 |
| README.bs2000 | D | 05-Feb-2005 | 7.7 KiB | 242 | 168 |
| README.ce | D | 05-Feb-2005 | 4.5 KiB | 138 | 91 |
| README.cn | D | 05-Feb-2005 | 4 KiB | 149 | 90 |
| README.cygwin | D | 30-Jun-2006 | 20.9 KiB | 618 | 423 |
| README.dgux | D | 05-Feb-2005 | 2.8 KiB | 118 | 79 |
| README.dos | D | 05-Feb-2005 | 10.6 KiB | 333 | 224 |
| README.epoc | D | 05-Feb-2005 | 3.7 KiB | 160 | 97 |
| README.freebsd | D | 05-Feb-2005 | 1.9 KiB | 48 | 33 |
| README.hpux | D | 30-Jun-2006 | 23.7 KiB | 592 | 453 |
| README.hurd | D | 30-Jun-2006 | 1.9 KiB | 55 | 37 |
| README.irix | D | 05-Feb-2005 | 4.5 KiB | 142 | 92 |
| README.jp | D | 05-Feb-2005 | 6.7 KiB | 205 | 131 |
| README.ko | D | 05-Feb-2005 | 6.2 KiB | 219 | 132 |
| README.linux | D | 30-Jun-2006 | 1.5 KiB | 40 | 26 |
| README.machten | D | 05-Feb-2005 | 4.4 KiB | 117 | 87 |
| README.macos | D | 05-Feb-2005 | 2.1 KiB | 65 | 42 |
| README.macosx | D | 30-Jun-2006 | 9.2 KiB | 234 | 165 |
| README.micro | D | 05-Feb-2005 | 875 | 28 | 20 |
| README.mint | D | 30-Jun-2006 | 9.3 KiB | 230 | 176 |
| README.mpeix | D | 30-Jun-2006 | 14.7 KiB | 731 | 429 |
| README.netware | D | 05-Feb-2005 | 6.3 KiB | 214 | 139 |
| README.openbsd | D | 30-Jun-2006 | 1.2 KiB | 31 | 20 |
| README.os2 | D | 30-Jun-2006 | 90.6 KiB | 2,744 | 1,892 |
| README.os390 | D | 30-Jun-2006 | 15.7 KiB | 459 | 312 |
| README.os400 | D | 05-Feb-2005 | 4.5 KiB | 121 | 85 |
| README.plan9 | D | 05-Feb-2005 | 5 KiB | 147 | 104 |
| README.qnx | D | 05-Feb-2005 | 4.1 KiB | 144 | 97 |
| README.solaris | D | 30-Jun-2006 | 28.4 KiB | 691 | 518 |
| README.tru64 | D | 05-Feb-2005 | 7.2 KiB | 164 | 121 |
| README.tw | D | 05-Feb-2005 | 4.4 KiB | 175 | 103 |
| README.uts | D | 05-Feb-2005 | 3.1 KiB | 108 | 74 |
| README.vmesa | D | 30-Jun-2006 | 3.9 KiB | 132 | 84 |
| README.vms | D | 30-Jun-2006 | 30.5 KiB | 807 | 586 |
| README.vos | D | 05-Feb-2005 | 13 KiB | 370 | 272 |
| README.win32 | D | 30-Jun-2006 | 36.6 KiB | 925 | 664 |
| Todo.micro | D | 05-Feb-2005 | 319 | 10 | 5 |
| XSUB.h | D | 29-Apr-2007 | 18.5 KiB | 586 | 390 |
| autodoc.pl | D | 30-Jun-2006 | 7.8 KiB | 302 | 234 |
| av.c | D | 30-Jun-2006 | 23.3 KiB | 1,057 | 768 |
| av.h | D | 05-Feb-2005 | 3 KiB | 88 | 35 |
| bytecode.pl | D | 30-Jun-2006 | 14.2 KiB | 516 | 399 |
| cc_runtime.h | D | 05-Feb-2005 | 2.1 KiB | 85 | 67 |
| cflags.SH | D | 30-Jun-2006 | 3.9 KiB | 178 | 154 |
| config.over | D | 12-Mar-2014 | 2 KiB | 74 | 61 |
| config_h.SH | D | 30-Jun-2006 | 136.1 KiB | 4,397 | 3,428 |
| configpm | D | 30-Jun-2006 | 22.4 KiB | 906 | 694 |
| configure.com | D | 30-Jun-2006 | 203.9 KiB | 7,065 | 7,033 |
| configure.gnu | D | 05-Feb-2005 | 2.7 KiB | 142 | 107 |
| cop.h | D | 30-Jun-2006 | 18 KiB | 587 | 447 |
| cv.h | D | 30-Jun-2006 | 7.8 KiB | 211 | 101 |
| deb.c | D | 30-Jun-2006 | 6.8 KiB | 313 | 219 |
| doio.c | D | 30-Jun-2006 | 61.1 KiB | 2,488 | 2,150 |
| doop.c | D | 30-Jun-2006 | 32 KiB | 1,432 | 1,272 |
| dosish.h | D | 05-Feb-2005 | 5.6 KiB | 195 | 98 |
| dump.c | D | 30-Jun-2006 | 46.9 KiB | 1,571 | 1,449 |
| embed.fnc | D | 30-Jun-2006 | 62.2 KiB | 1,586 | 1,528 |
| embed.h | D | 30-Jun-2006 | 146.7 KiB | 4,226 | 4,168 |
| embed.pl | D | 30-Jun-2006 | 21.7 KiB | 959 | 727 |
| embedvar.h | D | 30-Jun-2006 | 60.5 KiB | 1,514 | 1,447 |
| fakesdio.h | D | 05-Feb-2005 | 3.1 KiB | 126 | 103 |
| fakethr.h | D | 05-Feb-2005 | 1.8 KiB | 66 | 40 |
| form.h | D | 05-Feb-2005 | 723 | 28 | 18 |
| genpacksizetables.pl | D | 30-Jun-2006 | 3.3 KiB | 137 | 113 |
| global.sym | D | 30-Jun-2006 | 12 KiB | 724 | 723 |
| globals.c | D | 30-Jun-2006 | 1.7 KiB | 66 | 20 |
| globvar.sym | D | 30-Jun-2006 | 958 | 73 | 71 |
| gv.c | D | 30-Jun-2006 | 51 KiB | 2,025 | 1,587 |
| gv.h | D | 30-Jun-2006 | 5.3 KiB | 167 | 112 |
| handy.h | D | 09-Jun-2007 | 24.6 KiB | 720 | 400 |
| hv.c | D | 30-Jun-2006 | 56 KiB | 2,131 | 1,444 |
| hv.h | D | 30-Jun-2006 | 13.3 KiB | 350 | 166 |
| installhtml | D | 30-Jun-2006 | 18.4 KiB | 613 | 414 |
| installman | D | 05-Feb-2005 | 8.2 KiB | 285 | 230 |
| installperl | D | 30-Jun-2006 | 30 KiB | 984 | 864 |
| intrpvar.h | D | 30-Jun-2006 | 20.4 KiB | 589 | 361 |
| iperlsys.h | D | 30-Jun-2006 | 47.2 KiB | 1,408 | 1,231 |
| keywords.h | D | 30-Jun-2006 | 6.1 KiB | 263 | 246 |
| keywords.pl | D | 30-Jun-2006 | 2.8 KiB | 296 | 283 |
| locale.c | D | 30-Jun-2006 | 14.6 KiB | 621 | 441 |
| makeaperl.SH | D | 05-Feb-2005 | 3.8 KiB | 131 | 106 |
| makedef.pl | D | 30-Jun-2006 | 32.4 KiB | 1,496 | 1,408 |
| makedepend.SH | D | 05-Feb-2005 | 7.1 KiB | 255 | 220 |
| makedir.SH | D | 05-Feb-2005 | 1.2 KiB | 69 | 58 |
| malloc.c | D | 30-Jun-2006 | 75.7 KiB | 2,583 | 1,793 |
| malloc_ctl.h | D | 05-Feb-2005 | 1.4 KiB | 65 | 48 |
| mg.c | D | 29-Apr-2007 | 62.3 KiB | 2,784 | 2,370 |
| mg.h | D | 30-Jun-2006 | 2 KiB | 62 | 46 |
| minimod.pl | D | 30-Jun-2006 | 3.2 KiB | 140 | 99 |
| miniperlmain.c | D | 30-Jun-2006 | 3.4 KiB | 130 | 63 |
| myconfig.SH | D | 05-Feb-2005 | 2.5 KiB | 64 | 56 |
| nostdio.h | D | 30-Jun-2006 | 3.2 KiB | 127 | 104 |
| numeric.c | D | 30-Jun-2006 | 30.7 KiB | 1,044 | 697 |
| op.c | D | 30-Jun-2006 | 175.8 KiB | 7,110 | 5,987 |
| op.h | D | 30-Jun-2006 | 15.9 KiB | 512 | 345 |
| opcode.h | D | 30-Jun-2006 | 45.6 KiB | 1,831 | 1,801 |
| opcode.pl | D | 30-Jun-2006 | 24.8 KiB | 947 | 666 |
| opnames.h | D | 30-Jun-2006 | 9.1 KiB | 424 | 400 |
| pad.c | D | 30-Jun-2006 | 40.2 KiB | 1,579 | 973 |
| pad.h | D | 30-Jun-2006 | 8.6 KiB | 277 | 98 |
| patchlevel.h | D | 30-Jun-2006 | 4.6 KiB | 138 | 20 |
| perl.c | D | 30-Jun-2006 | 141.1 KiB | 5,307 | 3,952 |
| perl.h | D | 31-Oct-2013 | 139.4 KiB | 4,935 | 3,845 |
| perl_keyword.pl | D | 30-Jun-2006 | 2.7 KiB | 80 | 64 |
| perlapi.c | D | 30-Jun-2006 | 1.8 KiB | 71 | 33 |
| perlapi.h | D | 30-Jun-2006 | 36.2 KiB | 1,057 | 1,002 |
| perlio.c | D | 30-Jun-2006 | 113.8 KiB | 5,114 | 4,180 |
| perlio.h | D | 31-Oct-2013 | 10.7 KiB | 391 | 270 |
| perlio.sym | D | 05-Feb-2005 | 461 | 30 | 28 |
| perliol.h | D | 30-Jun-2006 | 13.4 KiB | 284 | 229 |
| perlsdio.h | D | 05-Feb-2005 | 4.8 KiB | 155 | 113 |
| perlsfio.h | D | 30-Jun-2006 | 2.5 KiB | 76 | 52 |
| perlsh | D | 05-Feb-2005 | 396 | 16 | 7 |
| perltoc2.gen | D | 29-Jun-2012 | 13.6 KiB | 553 | 486 |
| perlvars.h | D | 30-Jun-2006 | 2.4 KiB | 75 | 29 |
| perly.c | D | 13-Dec-2008 | 102 KiB | 2,563 | 2,511 |
| perly.fixer | D | 05-Feb-2005 | 7.6 KiB | 257 | 188 |
| perly.h | D | 05-Feb-2005 | 1.2 KiB | 71 | 69 |
| perly.y | D | 30-Jun-2006 | 22 KiB | 813 | 661 |
| perly_c.diff | D | 30-Jun-2006 | 13.7 KiB | 447 | 438 |
| perlyline.pl | D | 05-Feb-2005 | 331 | 12 | 9 |
| pod.lst | D | 30-Jun-2006 | 6.1 KiB | 205 | 169 |
| pp.c | D | 30-Jun-2006 | 104 KiB | 4,840 | 4,174 |
| pp.h | D | 30-Jun-2006 | 17.3 KiB | 506 | 234 |
| pp.sym | D | 30-Jun-2006 | 5.8 KiB | 396 | 393 |
| pp_ctl.c | D | 30-Jun-2006 | 92.5 KiB | 4,014 | 3,424 |
| pp_hot.c | D | 30-Jun-2006 | 79 KiB | 3,286 | 2,775 |
| pp_pack.c | D | 30-Jun-2006 | 70.8 KiB | 2,780 | 2,415 |
| pp_proto.h | D | 30-Jun-2006 | 10.3 KiB | 397 | 386 |
| pp_sort.c | D | 30-Jun-2006 | 63.2 KiB | 1,947 | 1,098 |
| pp_sys.c | D | 30-Jun-2006 | 125 KiB | 5,848 | 5,010 |
| proto.h | D | 30-Jun-2006 | 92.9 KiB | 2,317 | 1,867 |
| reentr.c | D | 30-Jun-2006 | 15.8 KiB | 535 | 494 |
| reentr.h | D | 30-Jun-2006 | 25.5 KiB | 785 | 649 |
| reentr.inc | D | 30-Jun-2006 | 123.8 KiB | 1,532 | 1,474 |
| reentr.pl | D | 30-Jun-2006 | 32 KiB | 1,200 | 1,075 |
| regcomp.c | D | 20-Nov-2007 | 145.1 KiB | 5,220 | 4,346 |
| regcomp.h | D | 30-Jun-2006 | 13 KiB | 399 | 228 |
| regcomp.pl | D | 30-Jun-2006 | 1.9 KiB | 125 | 93 |
| regcomp.sym | D | 05-Feb-2005 | 4.7 KiB | 117 | 97 |
| regen.pl | D | 30-Jun-2006 | 1.9 KiB | 66 | 50 |
| regen_lib.pl | D | 05-Feb-2005 | 1,010 | 46 | 34 |
| regexec.c | D | 30-Jun-2006 | 124.5 KiB | 4,653 | 3,851 |
| regexp.h | D | 05-Feb-2005 | 4.6 KiB | 130 | 91 |
| regnodes.h | D | 30-Jun-2006 | 9.5 KiB | 343 | 327 |
| run.c | D | 30-Jun-2006 | 1.3 KiB | 54 | 12 |
| scope.c | D | 30-Jun-2006 | 28.5 KiB | 1,194 | 1,030 |
| scope.h | D | 30-Jun-2006 | 13 KiB | 412 | 268 |
| shlib_version | D | 13-Dec-2008 | 17 | 3 | 2 |
| sv.c | D | 21-Sep-2006 | 294.4 KiB | 11,837 | 8,357 |
| sv.h | D | 30-Jun-2006 | 47.2 KiB | 1,390 | 748 |
| taint.c | D | 30-Jun-2006 | 4.4 KiB | 180 | 131 |
| thrdvar.h | D | 30-Jun-2006 | 10.1 KiB | 278 | 165 |
| thread.h | D | 30-Jun-2006 | 14 KiB | 527 | 414 |
| toke.c | D | 30-Jun-2006 | 279.7 KiB | 11,017 | 8,730 |
| uconfig.h | D | 30-Jun-2006 | 132.1 KiB | 4,352 | 336 |
| uconfig.sh | D | 30-Jun-2006 | 13.7 KiB | 729 | 727 |
| universal.c | D | 30-Jun-2006 | 16.2 KiB | 727 | 572 |
| unixish.h | D | 05-Feb-2005 | 4.2 KiB | 143 | 34 |
| utf8.c | D | 30-Jun-2006 | 53 KiB | 2,100 | 1,405 |
| utf8.h | D | 30-Jun-2006 | 12 KiB | 336 | 198 |
| utfebcdic.h | D | 30-Jun-2006 | 26.3 KiB | 421 | 334 |
| util.c | D | 30-Jun-2006 | 113.3 KiB | 4,729 | 3,755 |
| util.h | D | 30-Jun-2006 | 1.4 KiB | 44 | 32 |
| utils.lst | D | 05-Feb-2005 | 454 | 28 | 27 |
| warnings.h | D | 30-Jun-2006 | 3.8 KiB | 118 | 93 |
| warnings.pl | D | 30-Jun-2006 | 18.2 KiB | 767 | 497 |
| writemain.SH | D | 30-Jun-2006 | 2.8 KiB | 109 | 87 |
| xsutils.c | D | 30-Jun-2006 | 7.1 KiB | 342 | 256 |
README
1
2 Perl Kit, Version 5
3
4 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
5 2000, 2001, 2002, 2003, 2004, 2005, 2006 by Larry Wall and others
6
7 All rights reserved.
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of either:
11
12 a) the GNU General Public License as published by the Free
13 Software Foundation; either version 1, or (at your option) any
14 later version, or
15
16 b) the "Artistic License" which comes with this Kit.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either
21 the GNU General Public License or the Artistic License for more details.
22
23 You should have received a copy of the Artistic License with this
24 Kit, in the file named "Artistic". If not, I'll be glad to provide one.
25
26 You should also have received a copy of the GNU General Public License
27 along with this program in the file named "Copying". If not, write to the
28 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
29 02111-1307, USA or visit their web page on the internet at
30 http://www.gnu.org/copyleft/gpl.html.
31
32 For those of you that choose to use the GNU General Public License,
33 my interpretation of the GNU General Public License is that no Perl
34 script falls under the terms of the GPL unless you explicitly put
35 said script under the terms of the GPL yourself. Furthermore, any
36 object code linked with perl does not automatically fall under the
37 terms of the GPL, provided such object code only adds definitions
38 of subroutines and variables, and does not otherwise impair the
39 resulting interpreter from executing any standard Perl script. I
40 consider linking in C subroutines in this manner to be the moral
41 equivalent of defining subroutines in the Perl language itself. You
42 may sell such an object file as proprietary provided that you provide
43 or offer to provide the Perl source, as specified by the GNU General
44 Public License. (This is merely an alternate way of specifying input
45 to the program.) You may also sell a binary produced by the dumping of
46 a running Perl script that belongs to you, provided that you provide or
47 offer to provide the Perl source as specified by the GPL. (The
48 fact that a Perl interpreter and your code are in the same binary file
49 is, in this case, a form of mere aggregation.) This is my interpretation
50 of the GPL. If you still have concerns or difficulties understanding
51 my intent, feel free to contact me. Of course, the Artistic License
52 spells all this out for your protection, so you may prefer to use that.
53
54--------------------------------------------------------------------------
55
56Perl is a language that combines some of the features of C, sed, awk
57and shell. See the manual page for more hype. There are also many Perl
58books available, covering a wide variety of topics, from various publishers.
59See pod/perlbook.pod for more information.
60
61Please read all the directions below before you proceed any further, and
62then follow them carefully.
63
64Installation
65
661) Detailed instructions are in the file "INSTALL", which you should
67read if you are either installing on a system resembling Unix
68or porting perl to another platform. For non-Unix platforms, see the
69corresponding README.
70
712) Read the manual entries before running perl.
72
733) IMPORTANT! Help save the world! Communicate any problems and suggested
74patches to perlbug@perl.org so we can keep the world in sync.
75If you have a problem, there's someone else out there who either has had
76or will have the same problem. See the section on "Reporting Problems"
77in the INSTALL file.
78
79The latest versions of perl are always available on the various CPAN
80(Comprehensive Perl Archive Network) sites around the world.
81See http://www.cpan.org/src/ .
82
83
84Just a personal note: I want you to know that I create nice things like this
85because it pleases the Author of my story. If this bothers you, then your
86notion of Authorship needs some revision. But you can use perl anyway. :-)
87
88 The author.
89
README.Y2K
1The following information about Perl and the year 2000 is a modified
2version of the information that can be found in the Frequently Asked
3Question (FAQ) documents.
4
5Does Perl have a year 2000 problem? Is Perl Y2K compliant?
6
7Short answer: No, Perl does not have a year 2000 problem. Yes,
8 Perl is Y2K compliant (whatever that means). The
9 programmers you've hired to use it, however, probably are
10 not. If you want perl to complain when your programmers
11 create programs with certain types of possible year 2000
12 problems, a build option allows you to turn on warnings.
13
14Long answer: The question belies a true understanding of the
15 issue. Perl is just as Y2K compliant as your pencil
16 --no more, and no less. Can you use your pencil to write
17 a non-Y2K-compliant memo? Of course you can. Is that
18 the pencil's fault? Of course it isn't.
19
20 The date and time functions supplied with perl (gmtime and
21 localtime) supply adequate information to determine the
22 year well beyond 2000 (2038 is when trouble strikes for
23 32-bit machines). The year returned by these functions
24 when used in a list context is the year minus 1900. For
25 years between 1910 and 1999 this happens to be a 2-digit
26 decimal number. To avoid the year 2000 problem simply do
27 not treat the year as a 2-digit number. It isn't.
28
29 When gmtime() and localtime() are used in scalar context
30 they return a timestamp string that contains a fully-
31 expanded year. For example, $timestamp =
32 gmtime(1005613200) sets $timestamp to "Tue Nov 13 01:00:00
33 2001". There's no year 2000 problem here.
34
35 That doesn't mean that Perl can't be used to create non-
36 Y2K compliant programs. It can. But so can your pencil.
37 It's the fault of the user, not the language. At the risk
38 of inflaming the NRA: ``Perl doesn't break Y2K, people
39 do.'' See http://language.perl.com/news/y2k.html for a
40 longer exposition.
41
42 If you want perl to warn you when it sees a program which
43 concatenates a number with the string "19" -- a common
44 indication of a year 2000 problem -- build perl using the
45 Configure option "-Accflags=-DPERL_Y2KWARN".
46 (See the file INSTALL for more information about building
47 perl.)
48
README.aix
1If you read this file _as_is_, just ignore the funny characters you see.
2It is written in the POD format (see pod/perlpod.pod) which is specially
3designed to be readable as is.
4
5=head1 NAME
6
7README.aix - Perl version 5 on IBM Unix (AIX) systems
8
9=head1 DESCRIPTION
10
11This document describes various features of IBM's Unix operating
12system (AIX) that will affect how Perl version 5 (hereafter just Perl)
13is compiled and/or runs.
14
15=head2 Compiling Perl 5 on AIX
16
17When compiling Perl, you must use an ANSI C compiler. AIX does not ship
18an ANSI compliant C-compiler with AIX by default, but binary builds of
19gcc for AIX are widely available.
20
21At the moment of writing, AIX supports two different native C compilers,
22for which you have to pay: B<xlC> and B<vac>. If you decide to use either
23of these two (which is quite a lot easier than using gcc), be sure to
24upgrade to the latest available patch level. Currently:
25
26 xlC.C 3.1.4.10 or 3.6.6.0 or 4.0.2.2 or 5.0.2.9 or 6.0.0.3
27 vac.C 4.4.0.3 or 5.0.2.6 or 6.0.0.1
28
29note that xlC has the OS version in the name as of version 4.0.2.0, so
30you will find xlC.C for AIX-5.0 as package
31
32 xlC.aix50.rte 5.0.2.0 or 6.0.0.3
33
34subversions are not the same "latest" on all OS versions. For example,
35the latest xlC-5 on aix41 is 5.0.2.9, while on aix43, it is 5.0.2.7.
36
37Perl can be compiled with either IBM's ANSI C compiler or with gcc.
38The former is recommended, as not only can it compile Perl with no
39difficulty, but also can take advantage of features listed later that
40require the use of IBM compiler-specific command-line flags.
41
42The IBM's compiler patch levels 5.0.0.0 and 5.0.1.0 have compiler
43optimization bugs that affect compiling perl.c and regcomp.c,
44respectively. If Perl's configuration detects those compiler patch
45levels, optimization is turned off for the said source code files.
46Upgrading to at least 5.0.2.0 is recommended.
47
48If you decide to use gcc, make sure your installation is recent and
49complete, and be sure to read the Perl README file for more gcc-specific
50details. Please report any hoops you had to jump through to the development
51team.
52
53=head2 OS level
54
55Before installing the patches to the IBM C-compiler you need to know the
56level of patching for the Operating System. IBM's command 'oslevel' will
57show the base, but is not always complete (in this example oslevel shows
584.3.NULL, whereas the system might run most of 4.3.THREE):
59
60 # oslevel
61 4.3.0.0
62 # lslpp -l | grep 'bos.rte '
63 bos.rte 4.3.3.75 COMMITTED Base Operating System Runtime
64 bos.rte 4.3.2.0 COMMITTED Base Operating System Runtime
65 #
66
67The same might happen to AIX 5.1 or other OS levels. As a side note, perl
68cannot be built without bos.adt.syscalls and bos.adt.libm installed
69
70 # lslpp -l | egrep "syscalls|libm"
71 bos.adt.libm 5.1.0.25 COMMITTED Base Application Development
72 bos.adt.syscalls 5.1.0.36 COMMITTED System Calls Application
73 #
74
75=head2 Building Dynamic Extensions on AIX
76
77AIX supports dynamically loadable objects as well as shared libraries.
78Shared libraries by convention end with the suffix .a, which is a bit
79misleading, as an archive can contain static as well as dynamic members.
80For perl dynamically loaded objects we use the .so suffix also used on
81many other platforms.
82
83Note that starting from Perl 5.7.2 (and consequently 5.8.0) and AIX 4.3
84or newer Perl uses the AIX native dynamic loading interface in the so
85called runtime linking mode instead of the emulated interface that was
86used in Perl releases 5.6.1 and earlier or, for AIX releases 4.2 and
87earlier. This change does break backward compatibility with compiled
88modules from earlier perl releases. The change was made to make Perl
89more compliant with other applications like Apache/mod_perl which are
90using the AIX native interface. This change also enables the use of C++
91code with static constructors and destructors in perl extensions, which
92was not possible using the emulated interface.
93
94=head2 The IBM ANSI C Compiler
95
96All defaults for Configure can be used.
97
98If you've chosen to use vac 4, be sure to run 4.4.0.3. Older versions
99will turn up nasty later on. For vac 5 be sure to run at least 5.0.1.0,
100but vac 5.0.2.6 or up is highly recommended. Note that since IBM has
101removed vac 5.0.2.1 through 5.0.2.5 from the software depot, these
102versions should be considered obsolete.
103
104Here's a brief lead of how to upgrade the compiler to the latest
105level. Of course this is subject to changes. You can only upgrade
106versions from ftp-available updates if the first three digit groups
107are the same (in where you can skip intermediate unlike the patches
108in the developer snapshots of perl), or to one version up where the
109"base" is available. In other words, the AIX compiler patches are
110cumulative.
111
112 vac.C.4.4.0.1 => vac.C.4.4.0.3 is OK (vac.C.4.4.0.2 not needed)
113 xlC.C.3.1.3.3 => xlC.C.3.1.4.10 is NOT OK (xlC.C.3.1.4.0 is not available)
114
115 # ftp ftp.software.ibm.com
116 Connected to service.boulder.ibm.com.
117 : welcome message ...
118 Name (ftp.software.ibm.com:merijn): anonymous
119 331 Guest login ok, send your complete e-mail address as password.
120 Password:
121 ... accepted login stuff
122 ftp> cd /aix/fixes/v4/
123 ftp> dir other other.ll
124 output to local-file: other.ll? y
125 200 PORT command successful.
126 150 Opening ASCII mode data connection for /bin/ls.
127 226 Transfer complete.
128 ftp> dir xlc xlc.ll
129 output to local-file: xlc.ll? y
130 200 PORT command successful.
131 150 Opening ASCII mode data connection for /bin/ls.
132 226 Transfer complete.
133 ftp> bye
134 ... goodbye messages
135 # ls -l *.ll
136 -rw-rw-rw- 1 merijn system 1169432 Nov 2 17:29 other.ll
137 -rw-rw-rw- 1 merijn system 29170 Nov 2 17:29 xlc.ll
138
139On AIX 4.2 using xlC, we continue:
140
141 # lslpp -l | fgrep 'xlC.C '
142 xlC.C 3.1.4.9 COMMITTED C for AIX Compiler
143 xlC.C 3.1.4.0 COMMITTED C for AIX Compiler
144 # grep 'xlC.C.3.1.4.*.bff' xlc.ll
145 -rw-r--r-- 1 45776101 1 6286336 Jul 22 1996 xlC.C.3.1.4.1.bff
146 -rw-rw-r-- 1 45776101 1 6173696 Aug 24 1998 xlC.C.3.1.4.10.bff
147 -rw-r--r-- 1 45776101 1 6319104 Aug 14 1996 xlC.C.3.1.4.2.bff
148 -rw-r--r-- 1 45776101 1 6316032 Oct 21 1996 xlC.C.3.1.4.3.bff
149 -rw-r--r-- 1 45776101 1 6315008 Dec 20 1996 xlC.C.3.1.4.4.bff
150 -rw-rw-r-- 1 45776101 1 6178816 Mar 28 1997 xlC.C.3.1.4.5.bff
151 -rw-rw-r-- 1 45776101 1 6188032 May 22 1997 xlC.C.3.1.4.6.bff
152 -rw-rw-r-- 1 45776101 1 6191104 Sep 5 1997 xlC.C.3.1.4.7.bff
153 -rw-rw-r-- 1 45776101 1 6185984 Jan 13 1998 xlC.C.3.1.4.8.bff
154 -rw-rw-r-- 1 45776101 1 6169600 May 27 1998 xlC.C.3.1.4.9.bff
155 # wget ftp://ftp.software.ibm.com/aix/fixes/v4/xlc/xlC.C.3.1.4.10.bff
156 #
157
158On AIX 4.3 using vac, we continue:
159
160 # lslpp -l | grep 'vac.C '
161 vac.C 5.0.2.2 COMMITTED C for AIX Compiler
162 vac.C 5.0.2.0 COMMITTED C for AIX Compiler
163 # grep 'vac.C.5.0.2.*.bff' other.ll
164 -rw-rw-r-- 1 45776101 1 13592576 Apr 16 2001 vac.C.5.0.2.0.bff
165 -rw-rw-r-- 1 45776101 1 14133248 Apr 9 2002 vac.C.5.0.2.3.bff
166 -rw-rw-r-- 1 45776101 1 14173184 May 20 2002 vac.C.5.0.2.4.bff
167 -rw-rw-r-- 1 45776101 1 14192640 Nov 22 2002 vac.C.5.0.2.6.bff
168 # wget ftp://ftp.software.ibm.com/aix/fixes/v4/other/vac.C.5.0.2.6.bff
169 #
170
171Likewise on all other OS levels. Then execute the following command, and
172fill in its choices
173
174 # smit install_update
175 -> Install and Update from LATEST Available Software
176 * INPUT device / directory for software [ vac.C.5.0.2.6.bff ]
177 [ OK ]
178 [ OK ]
179
180Follow the messages ... and you're done.
181
182If you like a more web-like approach, a good start point can be
183http://www14.software.ibm.com/webapp/download/downloadaz.jsp and click
184"C for AIX", and follow the instructions.
185
186=head2 The usenm option
187
188If linking miniperl
189
190 cc -o miniperl ... miniperlmain.o opmini.o perl.o ... -lm -lc ...
191
192causes error like this
193
194 ld: 0711-317 ERROR: Undefined symbol: .aintl
195 ld: 0711-317 ERROR: Undefined symbol: .copysignl
196 ld: 0711-317 ERROR: Undefined symbol: .syscall
197 ld: 0711-317 ERROR: Undefined symbol: .eaccess
198 ld: 0711-317 ERROR: Undefined symbol: .setresuid
199 ld: 0711-317 ERROR: Undefined symbol: .setresgid
200 ld: 0711-317 ERROR: Undefined symbol: .setproctitle
201 ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
202
203you could retry with
204
205 make realclean
206 rm config.sh
207 ./Configure -Dusenm ...
208
209which makes Configure to use the C<nm> tool when scanning for library
210symbols, which usually is not done in AIX.
211
212Related to this, you probably should not use the C<-r> option of
213Configure in AIX, because that affects of how the C<nm> tool is used.
214
215=head2 Using GNU's gcc for building perl
216
217Using gcc-3.x (tested with 3.0.4, 3.1, and 3.2) now works out of the box,
218as do recent gcc-2.9 builds available directly from IBM as part of their
219Linux compatibility packages, available here:
220
221 http://www.ibm.com/servers/aix/products/aixos/linux/
222
223=head2 Using Large Files with Perl
224
225Should yield no problems.
226
227=head2 Threaded Perl
228
229Threads seem to work OK, though at the moment not all tests pass when
230threads are used in combination with 64-bit configurations.
231
232You may get a warning when doing a threaded build:
233
234 "pp_sys.c", line 4640.39: 1506-280 (W) Function argument assignment between types "unsigned char*" and "const void*" is not allowed.
235
236The exact line number may vary, but if the warning (W) comes from a line
237line this
238
239 hent = PerlSock_gethostbyaddr(addr, (Netdb_hlen_t) addrlen, addrtype);
240
241in the "pp_ghostent" function, you may ignore it safely. The warning
242is caused by the reentrant variant of gethostbyaddr() having a slightly
243different prototype than its non-reentrant variant, but the difference
244is not really significant here.
245
246=head2 64-bit Perl
247
248If your AIX is installed with 64-bit support, you can expect 64-bit
249configurations to work. In combination with threads some tests might
250still fail.
251
252=head2 AIX 4.2 and extensions using C++ with statics
253
254In AIX 4.2 Perl extensions that use C++ functions that use statics
255may have problems in that the statics are not getting initialized.
256In newer AIX releases this has been solved by linking Perl with
257the libC_r library, but unfortunately in AIX 4.2 the said library
258has an obscure bug where the various functions related to time
259(such as time() and gettimeofday()) return broken values, and
260therefore in AIX 4.2 Perl is not linked against the libC_r.
261
262=head1 AUTHOR
263
264H.Merijn Brand <h.m.brand@xs4all.nl>
265
266=head1 DATE
267
268Version 0.0.6: 23 Dec 2002
269
270=cut
271
README.amiga
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see perlpod manpage) which is
3specially designed to be readable as is.
4
5=head1 NAME
6
7perlamiga - Perl under Amiga OS
8
9=head1 NOTE
10
11B<Perl 5.8.0 cannot be built in AmigaOS. You can use either the
12maintenance release Perl 5.6.1 or the development release Perl 5.7.2
13in AmigaOS. See L</"PERL 5.8.0 BROKEN IN AMIGAOS"> if you want to help
14fixing this problem.>
15
16=head1 SYNOPSIS
17
18One can read this document in the following formats:
19
20 man perlamiga
21 multiview perlamiga.guide
22
23to list some (not all may be available simultaneously), or it may
24be read I<as is>: either as F<README.amiga>, or F<pod/perlamiga.pod>.
25
26A recent version of perl for the Amiga can be found at the Geek Gadgets
27section of the Aminet:
28
29 http://www.aminet.net/~aminet/dev/gg/index.html
30
31=cut
32
33Contents
34
35 perlamiga - Perl under Amiga OS
36
37 NAME
38 SYNOPSIS
39 DESCRIPTION
40 - Prerequisites
41 - Starting Perl programs under AmigaOS
42 - Shortcomings of Perl under AmigaOS
43 INSTALLATION
44 Accessing documentation
45 - Manpages
46 - HTML
47 - GNU info files
48 - LaTeX docs
49 BUILD
50 - Build Prerequisites
51 - Getting the perl source
52 - Application of the patches
53 - Making
54 - Testing
55 - Installing the built perl
56 AUTHOR
57 SEE ALSO
58
59=head1 DESCRIPTION
60
61=head2 Prerequisites for Compiling Perl on AmigaOS
62
63=over 6
64
65=item B<Unix emulation for AmigaOS: ixemul.library>
66
67You need the Unix emulation for AmigaOS, whose most important part is
68B<ixemul.library>. For a minimum setup, get the latest versions
69of the following packages from the Aminet archives
70( http://www.aminet.net/~aminet/ ):
71
72 ixemul-bin
73 ixemul-env-bin
74 pdksh-bin
75
76Note also that this is a minimum setup; you might want to add other
77packages of B<ADE> (the I<Amiga Developers Environment>).
78
79=item B<Version of Amiga OS>
80
81You need at the very least AmigaOS version 2.0. Recommended is version 3.1.
82
83=back
84
85=head2 Starting Perl programs under AmigaOS
86
87Start your Perl program F<foo> with arguments C<arg1 arg2 arg3> the
88same way as on any other platform, by
89
90 perl foo arg1 arg2 arg3
91
92If you want to specify perl options C<-my_opts> to the perl itself (as
93opposed to your program), use
94
95 perl -my_opts foo arg1 arg2 arg3
96
97Alternately, you can try to get a replacement for the system's B<Execute>
98command that honors the #!/usr/bin/perl syntax in scripts and set the s-Bit
99of your scripts. Then you can invoke your scripts like under UNIX with
100
101 foo arg1 arg2 arg3
102
103(Note that having *nixish full path to perl F</usr/bin/perl> is not
104necessary, F<perl> would be enough, but having full path would make it
105easier to use your script under *nix.)
106
107=head2 Shortcomings of Perl under AmigaOS
108
109Perl under AmigaOS lacks some features of perl under UNIX because of
110deficiencies in the UNIX-emulation, most notably:
111
112=over 6
113
114=item *
115
116fork()
117
118=item *
119
120some features of the UNIX filesystem regarding link count and file dates
121
122=item *
123
124inplace operation (the -i switch) without backup file
125
126=item *
127
128umask() works, but the correct permissions are only set when the file is
129finally close()d
130
131=back
132
133=head1 INSTALLATION
134
135Change to the installation directory (most probably ADE:), and
136extract the binary distribution:
137
138lha -mraxe x perl-$VERSION-bin.lha
139
140or
141
142tar xvzpf perl-$VERSION-bin.tgz
143
144(Of course you need lha or tar and gunzip for this.)
145
146For installation of the Unix emulation, read the appropriate docs.
147
148=head1 Accessing documentation
149
150=head2 Manpages for Perl on AmigaOS
151
152If you have C<man> installed on your system, and you installed perl
153manpages, use something like this:
154
155 man perlfunc
156 man less
157 man ExtUtils.MakeMaker
158
159to access documentation for different components of Perl. Start with
160
161 man perl
162
163Note: You have to modify your man.conf file to search for manpages
164in the /ade/lib/perl5/man/man3 directory, or the man pages for the
165perl library will not be found.
166
167Note that dot (F<.>) is used as a package separator for documentation
168for packages, and as usual, sometimes you need to give the section - C<3>
169above - to avoid shadowing by the I<less(1) manpage>.
170
171
172=head2 Perl HTML Documentation on AmigaOS
173
174If you have some WWW browser available, you can build B<HTML> docs.
175Cd to directory with F<.pod> files, and do like this
176
177 cd /ade/lib/perl5/pod
178 pod2html
179
180After this you can direct your browser the file F<perl.html> in this
181directory, and go ahead with reading docs.
182
183Alternatively you may be able to get these docs prebuilt from C<CPAN>.
184
185=head2 Perl GNU Info Files on AmigaOS
186
187Users of C<Emacs> would appreciate it very much, especially with
188C<CPerl> mode loaded. You need to get latest C<pod2info> from C<CPAN>,
189or, alternately, prebuilt info pages.
190
191=head2 Perl LaTeX Documentation on AmigaOS
192
193Can be constructed using C<pod2latex>.
194
195=head1 BUILDING PERL ON AMIGAOS
196
197Here we discuss how to build Perl under AmigaOS.
198
199=head2 Build Prerequisites for Perl on AmigaOS
200
201You need to have the latest B<ixemul> (Unix emulation for Amiga)
202from Aminet.
203
204=head2 Getting the Perl Source for AmigaOS
205
206You can either get the latest perl-for-amiga source from Ninemoons
207and extract it with:
208
209 tar xvzpf perl-$VERSION-src.tgz
210
211or get the official source from CPAN:
212
213 http://www.cpan.org/src/5.0
214
215Extract it like this
216
217 tar xvzpf perl-$VERSION.tar.gz
218
219You will see a message about errors while extracting F<Configure>. This
220is normal and expected. (There is a conflict with a similarly-named file
221F<configure>, but it causes no harm.)
222
223=head2 Making Perl on AmigaOS
224
225Remember to use a hefty wad of stack (I use 2000000)
226
227 sh configure.gnu --prefix=/gg
228
229Now type
230
231 make depend
232
233Now!
234
235 make
236
237=head2 Testing Perl on AmigaOS
238
239Now run
240
241 make test
242
243Some tests will be skipped because they need the fork() function:
244
245F<io/pipe.t>, F<op/fork.t>, F<lib/filehand.t>, F<lib/open2.t>, F<lib/open3.t>,
246F<lib/io_pipe.t>, F<lib/io_sock.t>
247
248=head2 Installing the built Perl on AmigaOS
249
250Run
251
252 make install
253
254=head1 PERL 5.8.0 BROKEN IN AMIGAOS
255
256As told above, Perl 5.6.1 was still good in AmigaOS, as was 5.7.2.
257After Perl 5.7.2 (change #11423, see the Changes file, and the file
258pod/perlhack.pod for how to get the individual changes) Perl dropped
259its internal support for vfork(), and that was very probably the step
260that broke AmigaOS (since the ixemul library has only vfork).
261The build finally fails when the ext/DynaLoader is being built, and
262PERL ends up as "0" in the produced Makefile, trying to run "0" does
263not quite work. Also, executing miniperl in backticks seems to
264generate nothing: very probably related to the (v)fork problems.
265B<Fixing the breakage requires someone quite familiar with the ixemul
266library, and how one is supposed to run external commands in AmigaOS
267without fork().>
268
269=head1 AUTHORS
270
271Norbert Pueschel, pueschel@imsdd.meb.uni-bonn.de
272Jan-Erik Karlsson, trg@privat.utfors.se
273
274=head1 SEE ALSO
275
276perl(1).
277
278=cut
279
README.apollo
README.beos
1If you read this file _as_is_, just ignore the funny characters you see.
2It is written in the POD format (see pod/perlpod.pod) which is specially
3designed to be readable as is.
4
5=head1 NAME
6
7README.beos - Perl version 5.8+ on BeOS
8
9=head1 DESCRIPTION
10
11This file contains instructions how to build Perl under BeOS and lists
12known problems.
13
14=head1 BUILD AND INSTALL
15
16=head2 Requirements
17
18I have built and tested Perl 5.8.6 and 5.9.1 under BeOS R5 x86 net server.
19I can't say anything with regard to PPC. Since Perl 5.8.0 had been released
20for BeOS BONE, I suspect, there is a good chance, that it still compiles on
21a BONE system. The only change I've made, that affects BONE systems is the
22recognition of whether it is a BONE system or not in C<hints/beos.sh>. Now
23network socket support should remain enabled on BONE systems. This might
24as well break the build, though.
25
26As more recent versions of autoconf require flock() support, I wrote a flock()
27emulation (flock_server) and released it on BeBits:
28
29 http://www.bebits.com/app/4030
30
31If you want to build a Perl with flock() support, you have to install this
32package first.
33
34=head2 Configure
35
36With flock() support:
37
38 CFLAGS=-I/path/to/flock/server/headers ./configure.gnu \
39 --prefix=/boot/home/config
40
41Replace C</path/to/flock/server/headers> with the path to the directory
42containing the C<flock.h> header.
43
44Without flock() support:
45
46 ./configure.gnu --prefix=/boot/home/config
47
48=head2 Build
49
50With flock() support:
51
52 make LDLOADLIBS="-lnet -lflock"
53
54Without flock() support:
55
56 make LDLOADLIBS="-lnet"
57
58C<-lnet> is needed on net server systems only and if the compiler doesn't
59add it automatically (Be's R5 gcc does, Oliver Tappe's gcc 2.95.3 does not).
60
61=head2 Install
62
63Install all perl files:
64
65 make install
66
67Create a symlink for libperl:
68
69 cd ~/config/lib; ln -s perl5/5.8.6/BePC-beos/CORE/libperl.so .
70
71Replace C<5.8.6> with your respective version of Perl.
72
73=head1 KNOWN PROBLEMS
74
75=over 4
76
77=item *
78
79Network socket support is disabled for BeOS R5 net server. I didn't dare yet
80to try enabling it and see what problems occur.
81
82=item *
83
84The LFS (large file support) tests (C<t/op/lfs> and C<xt/Fcntl/t/syslfs>) are
85disabled as seeking beyond 2 GB is broken according to jhi@iki.fi who was the
86last one checking the BeOS port and updating this file before me. Haven't
87checked this myself.
88
89=item *
90
91The C<t/io/fflush> test fails at #6. As far as I can tell, this is caused by
92a bug in the BeOS pipes implementation that occurs when starting other child
93processes. In the particular test case a C<system("perl -e 0")> flushes the
94stdout pipe of another child process.
95
96=item *
97
98The C<ext/POSIX/t/waitpid> test fails at #1. After all child processes are
99gone BeOS' waitpid(-1,...) returns 0 instead of -1 (as it should). No idea
100how to fix this.
101
102=back
103
104=head1 CONTACT
105
106For BeOS specifics problems feel free to mail to:
107Ingo Weinhold <bonefish@cs.tu-berlin.de>
108
109Last update: 2004-12-16
110
README.bs2000
1This document is written in pod format hence there are punctuation
2characters in odd places. Do not worry, you've apparently got the
3ASCII->EBCDIC translation worked out correctly. You can read more
4about pod in pod/perlpod.pod or the short summary in the INSTALL file.
5
6=head1 NAME
7
8README.BS2000 - building and installing Perl for BS2000.
9
10=head1 SYNOPSIS
11
12This document will help you Configure, build, test and install Perl
13on BS2000 in the POSIX subsystem.
14
15=head1 DESCRIPTION
16
17This is a ported perl for the POSIX subsystem in BS2000 VERSION OSD
18V3.1A or later. It may work on other versions, but we started porting
19and testing it with 3.1A and are currently using Version V4.0A.
20
21You may need the following GNU programs in order to install perl:
22
23=head2 gzip on BS2000
24
25We used version 1.2.4, which could be installed out of the box with
26one failure during 'make check'.
27
28=head2 bison on BS2000
29
30The yacc coming with BS2000 POSIX didn't work for us. So we had to
31use bison. We had to make a few changes to perl in order to use the
32pure (reentrant) parser of bison. We used version 1.25, but we had to
33add a few changes due to EBCDIC. See below for more details
34concerning yacc.
35
36=head2 Unpacking Perl Distribution on BS2000
37
38To extract an ASCII tar archive on BS2000 POSIX you need an ASCII
39filesystem (we used the mountpoint /usr/local/ascii for this). Now
40you extract the archive in the ASCII filesystem without
41I/O-conversion:
42
43cd /usr/local/ascii
44export IO_CONVERSION=NO
45gunzip < /usr/local/src/perl.tar.gz | pax -r
46
47You may ignore the error message for the first element of the archive
48(this doesn't look like a tar archive / skipping to next file...),
49it's only the directory which will be created automatically anyway.
50
51After extracting the archive you copy the whole directory tree to your
52EBCDIC filesystem. B<This time you use I/O-conversion>:
53
54cd /usr/local/src
55IO_CONVERSION=YES
56cp -r /usr/local/ascii/perl5.005_02 ./
57
58=head2 Compiling Perl on BS2000
59
60There is a "hints" file for BS2000 called hints.posix-bc (because
61posix-bc is the OS name given by `uname`) that specifies the correct
62values for most things. The major problem is (of course) the EBCDIC
63character set. We have german EBCDIC version.
64
65Because of our problems with the native yacc we used GNU bison to
66generate a pure (=reentrant) parser for perly.y. So our yacc is
67really the following script:
68
69-----8<-----/usr/local/bin/yacc-----8<-----
70#! /usr/bin/sh
71
72# Bison as a reentrant yacc:
73
74# save parameters:
75params=""
76while [[ $# -gt 1 ]]; do
77 params="$params $1"
78 shift
79done
80
81# add flag %pure_parser:
82
83tmpfile=/tmp/bison.$$.y
84echo %pure_parser > $tmpfile
85cat $1 >> $tmpfile
86
87# call bison:
88
89echo "/usr/local/bin/bison --yacc $params $1\t\t\t(Pure Parser)"
90/usr/local/bin/bison --yacc $params $tmpfile
91
92# cleanup:
93
94rm -f $tmpfile
95-----8<----------8<-----
96
97We still use the normal yacc for a2p.y though!!! We made a softlink
98called byacc to distinguish between the two versions:
99
100ln -s /usr/bin/yacc /usr/local/bin/byacc
101
102We build perl using GNU make. We tried the native make once and it
103worked too.
104
105=head2 Testing Perl on BS2000
106
107We still got a few errors during C<make test>. Some of them are the
108result of using bison. Bison prints I<parser error> instead of I<syntax
109error>, so we may ignore them. The following list shows
110our errors, your results may differ:
111
112op/numconvert.......FAILED tests 1409-1440
113op/regexp...........FAILED tests 483, 496
114op/regexp_noamp.....FAILED tests 483, 496
115pragma/overload.....FAILED tests 152-153, 170-171
116pragma/warnings.....FAILED tests 14, 82, 129, 155, 192, 205, 207
117lib/bigfloat........FAILED tests 351-352, 355
118lib/bigfltpm........FAILED tests 354-355, 358
119lib/complex.........FAILED tests 267, 487
120lib/dumper..........FAILED tests 43, 45
121Failed 11/231 test scripts, 95.24% okay. 57/10595 subtests failed, 99.46% okay.
122
123=head2 Installing Perl on BS2000
124
125We have no nroff on BS2000 POSIX (yet), so we ignored any errors while
126installing the documentation.
127
128
129=head2 Using Perl in the Posix-Shell of BS2000
130
131BS2000 POSIX doesn't support the shebang notation
132(C<#!/usr/local/bin/perl>), so you have to use the following lines
133instead:
134
135: # use perl
136 eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
137 if $running_under_some_shell;
138
139=head2 Using Perl in "native" BS2000
140
141We don't have much experience with this yet, but try the following:
142
143Copy your Perl executable to a BS2000 LLM using bs2cp:
144
145C<bs2cp /usr/local/bin/perl 'bs2:perl(perl,l)'>
146
147Now you can start it with the following (SDF) command:
148
149C</START-PROG FROM-FILE=*MODULE(PERL,PERL),PROG-MODE=*ANY,RUN-MODE=*ADV>
150
151First you get the BS2000 commandline prompt ('*'). Here you may enter
152your parameters, e.g. C<-e 'print "Hello World!\\n";'> (note the
153double backslash!) or C<-w> and the name of your Perl script.
154Filenames starting with C</> are searched in the Posix filesystem,
155others are searched in the BS2000 filesystem. You may even use
156wildcards if you put a C<%> in front of your filename (e.g. C<-w
157checkfiles.pl %*.c>). Read your C/C++ manual for additional
158possibilities of the commandline prompt (look for
159PARAMETER-PROMPTING).
160
161=head2 Floating point anomalies on BS2000
162
163There appears to be a bug in the floating point implementation on BS2000 POSIX
164systems such that calling int() on the product of a number and a small
165magnitude number is not the same as calling int() on the quotient of
166that number and a large magnitude number. For example, in the following
167Perl code:
168
169 my $x = 100000.0;
170 my $y = int($x * 1e-5) * 1e5; # '0'
171 my $z = int($x / 1e+5) * 1e5; # '100000'
172 print "\$y is $y and \$z is $z\n"; # $y is 0 and $z is 100000
173
174Although one would expect the quantities $y and $z to be the same and equal
175to 100000 they will differ and instead will be 0 and 100000 respectively.
176
177=head2 Using PerlIO and different encodings on ASCII and EBCDIC partitions
178
179Since version 5.8 Perl uses the new PerlIO on BS2000. This enables
180you using different encodings per IO channel. For example you may use
181
182 use Encode;
183 open($f, ">:encoding(ascii)", "test.ascii");
184 print $f "Hello World!\n";
185 open($f, ">:encoding(posix-bc)", "test.ebcdic");
186 print $f "Hello World!\n";
187 open($f, ">:encoding(latin1)", "test.latin1");
188 print $f "Hello World!\n";
189 open($f, ">:encoding(utf8)", "test.utf8");
190 print $f "Hello World!\n";
191
192to get two files containing "Hello World!\n" in ASCII, EBCDIC, ISO
193Latin-1 (in this example identical to ASCII) respective UTF-EBCDIC (in
194this example identical to normal EBCDIC). See the documentation of
195Encode::PerlIO for details.
196
197As the PerlIO layer uses raw IO internally, all this totally ignores
198the type of your filesystem (ASCII or EBCDIC) and the IO_CONVERSION
199environment variable. If you want to get the old behavior, that the
200BS2000 IO functions determine conversion depending on the filesystem
201PerlIO still is your friend. You use IO_CONVERSION as usual and tell
202Perl, that it should use the native IO layer:
203
204 export IO_CONVERSION=YES
205 export PERLIO=stdio
206
207Now your IO would be ASCII on ASCII partitions and EBCDIC on EBCDIC
208partitions. See the documentation of PerlIO (without C<Encode::>!)
209for further posibilities.
210
211=head1 AUTHORS
212
213Thomas Dorner
214
215=head1 SEE ALSO
216
217L<INSTALL>, L<perlport>.
218
219=head2 Mailing list
220
221If you are interested in the VM/ESA, z/OS (formerly known as OS/390)
222and POSIX-BC (BS2000) ports of Perl then see the perl-mvs mailing list.
223To subscribe, send an empty message to perl-mvs-subscribe@perl.org.
224
225See also:
226
227 http://lists.perl.org/showlist.cgi?name=perl-mvs
228
229There are web archives of the mailing list at:
230
231 http://www.xray.mpe.mpg.de/mailing-lists/perl-mvs/
232 http://archive.develooper.com/perl-mvs@perl.org/
233
234=head1 HISTORY
235
236This document was originally written by Thomas Dorner for the 5.005
237release of Perl.
238
239This document was podified for the 5.6 release of perl 11 July 2000.
240
241=cut
242
README.ce
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see pod/perlpod.pod) which is
3specifically designed to be readable as is.
4
5=head1 NAME
6
7perlce - Perl for WinCE
8
9=head1 DESCRIPTION
10
11This file gives the instructions for building Perl5.8 and above for
12WinCE. Please read and understand the terms under which this
13software is distributed.
14
15=head1 BUILD
16
17This section describes the steps to be performed to build PerlCE.
18You may find additional and newer information about building perl
19for WinCE using following URL:
20
21 http://perlce.sourceforge.net
22
23There should also be pre-built binaries there.
24
25Don't be confused by large size of downloaded distribution or constructed
26binaries: entire distribution could be large for WinCE ideology, but
27you may strip it at your wish and use only required parts.
28
29=head2 Tools & SDK
30
31For compiling, you need following:
32
33=over 4
34
35=item * Microsoft Embedded Visual Tools
36
37=item * Microsoft Visual C++
38
39=item * Rainer Keuchel's celib-sources
40
41=item * Rainer Keuchel's console-sources
42
43=back
44
45Needed source files can be downloaded via:
46www.rainer-keuchel.de/wince/dirlist.html
47
48=head2 Make
49
50Please pay attention that starting from 5.8.0 miniperl *is* built
51and it facilitates in further building process. This means that
52in addition to compiler installation for mobile device you also need
53to have Microsoft Visual C++ installed as well.
54
55On the bright side, you do not need to edit any files from ./win32
56subdirectory. Normally you only need to edit ./wince/compile.bat
57to reflect your system and run it.
58
59File ./wince/compile.bat is actually a wrapper to call
60nmake -f makefile.ce with appropriate parameters and it accepts extra
61parameters and forwards them to "nmake" command as additional
62arguments. You should pass target this way.
63
64To prepare distribution you need to do following:
65
66=over 4
67
68=item * go to ./wince subdirectory
69
70=item * edit file compile.bat
71
72=item * run
73 compile.bat
74
75=item * run
76 compile.bat dist
77
78=back
79
80makefile.ce has CROSS_NAME macro, and it is used further to refer to
81your cross-compilation scheme. You could assign a name to it, but this
82is not necessary, because by default it is assigned after your machine
83configuration name, such as "wince-sh3-hpc-wce211", and this is enough
84to distinguish different builds at the same time. This option could be
85handy for several different builds on same platform to perform, say,
86threaded build. In a following example we assume that all required
87environment variables are set properly for C cross-compiler (a special
88*.bat file could fit perfectly to this purpose) and your compile.bat
89has proper "MACHINE" parameter set, to, say, "wince-mips-pocket-wce300".
90
91 compile.bat
92 compile.bat dist
93 compile.bat CROSS_NAME=mips-wce300-thr "USE_ITHREADS=define" "USE_IMP_SYS=define" "USE_MULTI=define"
94 compile.bat CROSS_NAME=mips-wce300-thr "USE_ITHREADS=define" "USE_IMP_SYS=define" "USE_MULTI=define" dist
95
96If all goes okay and no errors during a build, you'll get two independent
97distributions: "wince-mips-pocket-wce300" and "mips-wce300-thr".
98
99Target 'dist' prepares distribution file set. Target 'zipdist' performs
100same as 'dist' but additionally compresses distribution files into zip
101archive.
102
103NOTE: during a build there could be created a number (or one) of Config.pm
104for cross-compilation ("foreign" Config.pm) and those are hidden inside
105../xlib/$(CROSS_NAME) with other auxilary files, but, and this is important to
106note, there should be *no* Config.pm for host miniperl.
107If you'll get an error that perl could not find Config.pm somewhere in building
108process this means something went wrong. Most probably you forgot to
109specify a cross-compilation when invoking miniperl.exe to Makefile.PL
110When building an extension for cross-compilation your command line should
111look like
112
113 ..\miniperl.exe -I..\lib -MCross=mips-wce300-thr Makefile.PL
114
115or just
116
117 ..\miniperl.exe -I..\lib -MCross Makefile.PL
118
119to refer a cross-compilation that was created last time.
120
121
122If you decided to build with fcrypt.c file, please refer to README.win32
123file, as long as all legal considerations and steps to do are exactly same
124in this case.
125
126All questions related to building for WinCE devices could be asked in
127perlce-users@lists.sourceforge.net mailing list.
128
129=head1 ACKNOWLEDGEMENTS
130
131The port for Win32 was used as a reference.
132
133=head1 AUTHORS
134
135Rainer Keuchel (keuchel@netwave.de)
136Vadim Konovalov (vkonovalov@spb.lucent.com)
137
138
README.cn
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see perlpod manpage) which is
3specially designed to be readable as is.
4
5The following documentation is written in EUC-CN encoding.
6
7�������һ������ֱ༭����������ļ�, ������������ص�ע���ַ�.
8����ļ����� POD (�����ļ���ʽ) д��; ���ָ�ʽ��Ϊ��������ֱ���Ķ�,
9���ر���Ƶ�. ���ڴ˸�ʽ�Ľ�һ����Ϣ, ��ο� perlpod �����ļ�.
10
11=head1 NAME
12
13perlcn - �������� Perl ָ��
14
15=head1 DESCRIPTION
16
17��ӭ���� Perl �����!
18
19�� 5.8.0 �濪ʼ, Perl �߱������Ƶ� Unicode (ͳһ��) ֧Ԯ,
20Ҳ����֧Ԯ�����������ϵ����ı��뷽ʽ; CJK (���պ�) �������е�һ����.
21Unicode �ǹ����Եı�, ��ͼ�������������е��ַ�: ��������, ��������,
22�Լ������һ�� (ϣ����, ��������, ��������, ϣ������, ӡ����,
23ӡ�ذ���, �ȵ�). ��Ҳ�����˶�����ҵϵͳ��ƽ̨ (�� PC �������).
24
25Perl ������ Unicode ���в���. ���ʾ Perl �ڲ����ַ������ݿ��� Unicode
26��ʾ; Perl �ĺ�ʽ����� (���������ʾʽ�ȶ�) Ҳ�ܶ� Unicode ���в���.
27�����뼰���ʱ, Ϊ�˴����� Unicode ֮ǰ�ı��뷽ʽ��ŵ�����, Perl
28�ṩ�� Encode ���ģ��, �����������ض�ȡ��д����еı�������.
29
30Encode ����ģ��֧Ԯ���м������ĵı��뷽ʽ ('gb2312' ��ʾ 'euc-cn'):
31
32 euc-cn Unix �����ַ���, Ҳ�����׳ƵĹ�����
33 gb2312-raw δ������� (�ͱ���) GB2312 �ַ���
34 gb12345 δ��������й��÷������ı���
35 iso-ir-165 GB2312 + GB6345 + GB8565 + �����ַ�
36 cp936 ����ҳ 936, Ҳ������ 'GBK' (���������) ָ��
37 hz 7 �����ݳ�ʽ GB2312 ����
38
39������˵, �� EUC-CN ����ĵ���ת�� Unicode, �����������ָ��:
40
41 perl -Mencoding=euc-cn,STDOUT,utf8 -pe1 < file.euc-cn > file.utf8
42
43Perl Ҳ�ڸ��� "piconv", һ֧��ȫ�� Perl д�ɵ��ַ�ת�����߳���, �÷�����:
44
45 piconv -f euc-cn -t utf8 < file.euc-cn > file.utf8
46 piconv -f utf8 -t euc-cn < file.utf8 > file.euc-cn
47
48����, ���� encoding ģ��, ���������д�����ַ�Ϊ��λ�ij�����, ������ʾ:
49
50 #!/usr/bin/env perl
51 # ���� euc-cn �ִ�����; ������뼰��������Ϊ euc-cn ����
52 use encoding 'euc-cn', STDIN => 'euc-cn', STDOUT => 'euc-cn';
53 print length("����"); # 2 (˫���ű�ʾ�ַ�)
54 print length('����'); # 4 (�����ű�ʾ�ֽ�)
55 print index("�̻�", "��"); # -1 (�����������ַ���)
56 print index('�̻�', '��'); # 1 (�ӵڶ����ֽڿ�ʼ)
57
58�����һ��������, "" �ĵڶ����ֽ��� "" �ĵ�һ���ֽڽ�ϳ� EUC-CN
59��� "��"; "" �ĵڶ����ֽ����� "��" �ĵ�һ���ֽڽ�ϳ� "��".
60��������ǰ EUC-CN ��ȶԴ����ϳ���������.
61
62=head2 ��������ı���
63
64�����Ҫ��������ı���, ���Դ� CPAN (L<http://www.cpan.org/>) ����
65Encode::HanExtra ģ��. ��Ŀǰ�ṩ���б��뷽ʽ:
66
67 gb18030 �����������, ������������
68
69����, Encode::HanConvert ģ�����ṩ�˼�ת���õ����ֱ���:
70
71 big5-simp Big5 ���������� Unicode �������Ļ�ת
72 gbk-trad GBK ���������� Unicode �������Ļ�ת
73
74������ GBK �� Big5 ֮�以ת, ��ο���ģ���ڸ��� b2g.pl �� g2b.pl ��֧����,
75���ڳ�����ʹ������д��:
76
77 use Encode::HanConvert;
78 $euc_cn = big5_to_gb($big5); # �� Big5 תΪ GBK
79 $big5 = gb_to_big5($euc_cn); # �� GBK תΪ Big5
80
81=head2 ��һ������Ϣ
82
83��ο� Perl �ڸ��Ĵ���˵���ļ� (����ȫ����Ӣ��д��), ��ѧϰ�������
84Perl ��֪ʶ, �Լ� Unicode ��ʹ�÷�ʽ. ����, �ⲿ����Դ�൱�ḻ:
85
86=head2 �ṩ Perl ��Դ����ַ
87
88=over 4
89
90=item L<http://www.perl.com/>
91
92Perl ����ҳ (��ŷ����˾ά��)
93
94=item L<http://www.cpan.org/>
95
96Perl �ۺϵ���� (Comprehensive Perl Archive Network)
97
98=item L<http://lists.perl.org/>
99
100Perl �ʵ���̳һ��
101
102=back
103
104=head2 ѧϰ Perl ����ַ
105
106=over 4
107
108=item L<http://www.oreilly.com.cn/html/perl.html>
109
110�������İ��ŷ���� Perl ���
111
112=back
113
114=head2 Perl ʹ������
115
116=over 4
117
118=item L<http://www.pm.org/groups/asia.shtml#China>
119
120�й� Perl �ƹ���һ��
121
122=back
123
124=head2 Unicode �����ַ
125
126=over 4
127
128=item L<http://www.unicode.org/>
129
130Unicode ѧ��ѧ�� (Unicode �����ƶ���)
131
132=item L<http://www.cl.cam.ac.uk/%7Emgk25/unicode.html>
133
134Unix/Linux �ϵ� UTF-8 �� Unicode �����
135
136=back
137
138=head1 SEE ALSO
139
140L<Encode>, L<Encode::CN>, L<encoding>, L<perluniintro>, L<perlunicode>
141
142=head1 AUTHORS
143
144Jarkko Hietaniemi E<lt>jhi@iki.fiE<gt>
145
146Autrijus Tang (���ں�) E<lt>autrijus@autrijus.orgE<gt>
147
148=cut
149
README.cygwin
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see pod/perlpod.pod) which is
3specially designed to be readable as is.
4
5=head1 NAME
6
7README.cygwin - Perl for Cygwin
8
9=head1 SYNOPSIS
10
11This document will help you configure, make, test and install Perl
12on Cygwin. This document also describes features of Cygwin that will
13affect how Perl behaves at runtime.
14
15B<NOTE:> There are pre-built Perl packages available for Cygwin and a
16version of Perl is provided in the normal Cygwin install. If you do
17not need to customize the configuration, consider using one of those
18packages.
19
20
21=head1 PREREQUISITES FOR COMPILING PERL ON CYGWIN
22
23=head2 Cygwin = GNU+Cygnus+Windows (Don't leave UNIX without it)
24
25The Cygwin tools are ports of the popular GNU development tools for Win32
26platforms. They run thanks to the Cygwin library which provides the UNIX
27system calls and environment these programs expect. More information
28about this project can be found at:
29
30 http://www.cygwin.com/
31
32A recent net or commercial release of Cygwin is required.
33
34At the time this document was last updated, Cygwin 1.5.2 was current.
35
36
37=head2 Cygwin Configuration
38
39While building Perl some changes may be necessary to your Cygwin setup so
40that Perl builds cleanly. These changes are B<not> required for normal
41Perl usage.
42
43B<NOTE:> The binaries that are built will run on all Win32 versions.
44They do not depend on your host system (Win9x/WinME, WinNT/Win2K)
45or your Cygwin configuration (I<ntea>, I<ntsec>, binary/text mounts).
46The only dependencies come from hard-coded pathnames like C</usr/local>.
47However, your host system and Cygwin configuration will affect Perl's
48runtime behavior (see L</"TEST">).
49
50=over 4
51
52=item * C<PATH>
53
54Set the C<PATH> environment variable so that Configure finds the Cygwin
55versions of programs. Any Windows directories should be removed or
56moved to the end of your C<PATH>.
57
58=item * I<nroff>
59
60If you do not have I<nroff> (which is part of the I<groff> package),
61Configure will B<not> prompt you to install I<man> pages.
62
63=item * Permissions
64
65On WinNT with either the I<ntea> or I<ntsec> C<CYGWIN> settings, directory
66and file permissions may not be set correctly. Since the build process
67creates directories and files, to be safe you may want to run a
68C<chmod -R +w *> on the entire Perl source tree.
69
70Also, it is a well known WinNT "feature" that files created by a login
71that is a member of the I<Administrators> group will be owned by the
72I<Administrators> group. Depending on your umask, you may find that you
73can not write to files that you just created (because you are no longer
74the owner). When using the I<ntsec> C<CYGWIN> setting, this is not an
75issue because it "corrects" the ownership to what you would expect on
76a UNIX system.
77
78=back
79
80=head1 CONFIGURE PERL ON CYGWIN
81
82The default options gathered by Configure with the assistance of
83F<hints/cygwin.sh> will build a Perl that supports dynamic loading
84(which requires a shared F<libperl.dll>).
85
86This will run Configure and keep a record:
87
88 ./Configure 2>&1 | tee log.configure
89
90If you are willing to accept all the defaults run Configure with B<-de>.
91However, several useful customizations are available.
92
93=head2 Stripping Perl Binaries on Cygwin
94
95It is possible to strip the EXEs and DLLs created by the build process.
96The resulting binaries will be significantly smaller. If you want the
97binaries to be stripped, you can either add a B<-s> option when Configure
98prompts you,
99
100 Any additional ld flags (NOT including libraries)? [none] -s
101 Any special flags to pass to gcc to use dynamic linking? [none] -s
102 Any special flags to pass to ld2 to create a dynamically loaded library?
103 [none] -s
104
105or you can edit F<hints/cygwin.sh> and uncomment the relevant variables
106near the end of the file.
107
108=head2 Optional Libraries for Perl on Cygwin
109
110Several Perl functions and modules depend on the existence of
111some optional libraries. Configure will find them if they are
112installed in one of the directories listed as being used for library
113searches. Pre-built packages for most of these are available from
114the Cygwin installer.
115
116=over 4
117
118=item * C<-lcrypt>
119
120The crypt package distributed with Cygwin is a Linux compatible 56-bit
121DES crypt port by Corinna Vinschen.
122
123Alternatively, the crypt libraries in GNU libc have been ported to Cygwin.
124
125The DES based Ultra Fast Crypt port was done by Alexey Truhan:
126
127 ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/porters/Okhapkin_Sergey/cw32crypt-dist-0.tgz
128
129NOTE: There are various export restrictions on DES implementations,
130see the glibc README for more details.
131
132The MD5 port was done by Andy Piper:
133
134 ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/porters/Okhapkin_Sergey/libcrypt.tgz
135
136=item * C<-lgdbm> (C<use GDBM_File>)
137
138GDBM is available for Cygwin.
139
140NOTE: The GDBM library only works on NTFS partitions.
141
142=item * C<-ldb> (C<use DB_File>)
143
144BerkeleyDB is available for Cygwin.
145
146NOTE: The BerkeleyDB library only completely works on NTFS partitions.
147
148=item * C<-lcygipc> (C<use IPC::SysV>)
149
150A port of SysV IPC is available for Cygwin.
151
152NOTE: This has B<not> been extensively tested. In particular,
153C<d_semctl_semun> is undefined because it fails a Configure test
154and on Win9x the I<shm*()> functions seem to hang. It also creates
155a compile time dependency because F<perl.h> includes F<<sys/ipc.h>>
156and F<<sys/sem.h>> (which will be required in the future when compiling
157CPAN modules). CURRENTLY NOT SUPPORTED!
158
159=item * C<-lutil>
160
161Included with the standard Cygwin netrelease is the inetutils package
162which includes libutil.a.
163
164=back
165
166=head2 Configure-time Options for Perl on Cygwin
167
168The F<INSTALL> document describes several Configure-time options. Some of
169these will work with Cygwin, others are not yet possible. Also, some of
170these are experimental. You can either select an option when Configure
171prompts you or you can define (undefine) symbols on the command line.
172
173=over 4
174
175=item * C<-Uusedl>
176
177Undefining this symbol forces Perl to be compiled statically.
178
179=item * C<-Uusemymalloc>
180
181By default Perl uses the C<malloc()> included with the Perl source. If you
182want to force Perl to build with the system C<malloc()> undefine this symbol.
183
184=item * C<-Uuseperlio>
185
186Undefining this symbol disables the PerlIO abstraction. PerlIO is now the
187default; it is not recommended to disable PerlIO.
188
189=item * C<-Dusemultiplicity>
190
191Multiplicity is required when embedding Perl in a C program and using
192more than one interpreter instance. This works with the Cygwin port.
193
194=item * C<-Duse64bitint>
195
196By default Perl uses 32 bit integers. If you want to use larger 64
197bit integers, define this symbol.
198
199=item * C<-Duselongdouble>
200
201I<gcc> supports long doubles (12 bytes). However, several additional
202long double math functions are necessary to use them within Perl
203(I<{atan2, cos, exp, floor, fmod, frexp, isnan, log, modf, pow, sin, sqrt}l,
204strtold>).
205These are B<not> yet available with Cygwin.
206
207=item * C<-Dusethreads>
208
209POSIX threads are implemented in Cygwin, define this symbol if you want
210a threaded perl.
211
212=item * C<-Duselargefiles>
213
214Cygwin uses 64-bit integers for internal size and position calculations,
215this will be correctly detected and defined by Configure.
216
217=item * C<-Dmksymlinks>
218
219Use this to build perl outside of the source tree. This works with Cygwin.
220Details can be found in the F<INSTALL> document. This is the recommended
221way to build perl from sources.
222
223=back
224
225=head2 Suspicious Warnings on Cygwin
226
227You may see some messages during Configure that seem suspicious.
228
229=over 4
230
231=item * I<dlsym()>
232
233I<ld2> is needed to build dynamic libraries, but it does not exist
234when C<dlsym()> checking occurs (it is not created until C<make> runs).
235You will see the following message:
236
237 Checking whether your C<dlsym()> needs a leading underscore ...
238 ld2: not found
239 I can't compile and run the test program.
240 I'm guessing that dlsym doesn't need a leading underscore.
241
242Since the guess is correct, this is not a problem.
243
244=item * Win9x and C<d_eofnblk>
245
246Win9x does not correctly report C<EOF> with a non-blocking read on a
247closed pipe. You will see the following messages:
248
249 But it also returns -1 to signal EOF, so be careful!
250 WARNING: you can't distinguish between EOF and no data!
251
252 *** WHOA THERE!!! ***
253 The recommended value for $d_eofnblk on this machine was "define"!
254 Keep the recommended value? [y]
255
256At least for consistency with WinNT, you should keep the recommended
257value.
258
259=item * Compiler/Preprocessor defines
260
261The following error occurs because of the Cygwin C<#define> of
262C<_LONG_DOUBLE>:
263
264 Guessing which symbols your C compiler and preprocessor define...
265 try.c:<line#>: missing binary operator
266
267This failure does not seem to cause any problems. With older gcc
268versions, "parse error" is reported instead of "missing binary
269operator".
270
271=back
272
273=head1 MAKE ON CYGWIN
274
275Simply run I<make> and wait:
276
277 make 2>&1 | tee log.make
278
279=head2 Errors on Cygwin
280
281Errors like these are normal:
282
283 ...
284 make: [extra.pods] Error 1 (ignored)
285 ...
286 make: [extras.make] Error 1 (ignored)
287
288=head2 ld2 on Cygwin
289
290During C<make>, I<ld2> will be created and installed in your $installbin
291directory (where you said to put public executables). It does not
292wait until the C<make install> process to install the I<ld2> script,
293this is because the remainder of the C<make> refers to I<ld2> without
294fully specifying its path and does this from multiple subdirectories.
295The assumption is that $installbin is in your current C<PATH>. If this
296is not the case C<make> will fail at some point. If this happens,
297just manually copy I<ld2> from the source directory to somewhere in
298your C<PATH>.
299
300=head1 TEST ON CYGWIN
301
302There are two steps to running the test suite:
303
304 make test 2>&1 | tee log.make-test
305
306 cd t;./perl harness 2>&1 | tee ../log.harness
307
308The same tests are run both times, but more information is provided when
309running as C<./perl harness>.
310
311Test results vary depending on your host system and your Cygwin
312configuration. If a test can pass in some Cygwin setup, it is always
313attempted and explainable test failures are documented. It is possible
314for Perl to pass all the tests, but it is more likely that some tests
315will fail for one of the reasons listed below.
316
317=head2 File Permissions on Cygwin
318
319UNIX file permissions are based on sets of mode bits for
320{read,write,execute} for each {user,group,other}. By default Cygwin
321only tracks the Win32 read-only attribute represented as the UNIX file
322user write bit (files are always readable, files are executable if they
323have a F<.{com,bat,exe}> extension or begin with C<#!>, directories are
324always readable and executable). On WinNT with the I<ntea> C<CYGWIN>
325setting, the additional mode bits are stored as extended file attributes.
326On WinNT with the I<ntsec> C<CYGWIN> setting, permissions use the standard
327WinNT security descriptors and access control lists. Without one of
328these options, these tests will fail (listing not updated yet):
329
330 Failed Test List of failed
331 ------------------------------------
332 io/fs.t 5, 7, 9-10
333 lib/anydbm.t 2
334 lib/db-btree.t 20
335 lib/db-hash.t 16
336 lib/db-recno.t 18
337 lib/gdbm.t 2
338 lib/ndbm.t 2
339 lib/odbm.t 2
340 lib/sdbm.t 2
341 op/stat.t 9, 20 (.tmp not an executable extension)
342
343=head2 NDBM_File and ODBM_File do not work on FAT filesystems
344
345Do not use NDBM_File or ODBM_File on FAT filesystem. They can be
346built on a FAT filesystem, but many tests will fail:
347
348 ../ext/NDBM_File/ndbm.t 13 3328 71 59 83.10% 1-2 4 16-71
349 ../ext/ODBM_File/odbm.t 255 65280 ?? ?? % ??
350 ../lib/AnyDBM_File.t 2 512 12 2 16.67% 1 4
351 ../lib/Memoize/t/errors.t 0 139 11 5 45.45% 7-11
352 ../lib/Memoize/t/tie_ndbm.t 13 3328 4 4 100.00% 1-4
353 run/fresh_perl.t 97 1 1.03% 91
354
355If you intend to run only on FAT (or if using AnyDBM_File on FAT),
356run Configure with the -Ui_ndbm and -Ui_dbm options to prevent
357NDBM_File and ODBM_File being built.
358
359With NTFS (and CYGWIN=ntsec), there should be no problems even if
360perl was built on FAT.
361
362=head2 C<fork()> failures in io_* tests
363
364A C<fork()> failure may result in the following tests failing:
365
366 ext/IO/lib/IO/t/io_multihomed.t
367 ext/IO/lib/IO/t/io_sock.t
368 ext/IO/lib/IO/t/io_unix.t
369
370See comment on fork in L<Miscellaneous> below.
371
372=head1 Specific features of the Cygwin port
373
374=head2 Script Portability on Cygwin
375
376Cygwin does an outstanding job of providing UNIX-like semantics on top of
377Win32 systems. However, in addition to the items noted above, there are
378some differences that you should know about. This is a very brief guide
379to portability, more information can be found in the Cygwin documentation.
380
381=over 4
382
383=item * Pathnames
384
385Cygwin pathnames can be separated by forward (F</>) or backward (F<\\>)
386slashes. They may also begin with drive letters (F<C:>) or Universal
387Naming Codes (F<//UNC>). DOS device names (F<aux>, F<con>, F<prn>,
388F<com*>, F<lpt?>, F<nul>) are invalid as base filenames. However, they
389can be used in extensions (e.g., F<hello.aux>). Names may contain all
390printable characters except these:
391
392 : * ? " < > |
393
394File names are case insensitive, but case preserving. A pathname that
395contains a backslash or drive letter is a Win32 pathname (and not subject
396to the translations applied to POSIX style pathnames).
397
398=item * Text/Binary
399
400When a file is opened it is in either text or binary mode. In text mode
401a file is subject to CR/LF/Ctrl-Z translations. With Cygwin, the default
402mode for an C<open()> is determined by the mode of the mount that underlies
403the file. Perl provides a C<binmode()> function to set binary mode on files
404that otherwise would be treated as text. C<sysopen()> with the C<O_TEXT>
405flag sets text mode on files that otherwise would be treated as binary:
406
407 sysopen(FOO, "bar", O_WRONLY|O_CREAT|O_TEXT)
408
409C<lseek()>, C<tell()> and C<sysseek()> only work with files opened in binary
410mode.
411
412The text/binary issue is covered at length in the Cygwin documentation.
413
414=item * PerlIO
415
416PerlIO overrides the default Cygwin Text/Binary behaviour. A file will
417always treated as binary, regardless which mode of the mount it lives on,
418just like it is in UNIX. So CR/LF translation needs to be requested in
419either the C<open()> call like this:
420
421 open(FH, ">:crlf", "out.txt");
422
423which will do conversion from LF to CR/LF on the output, or in the
424environment settings (add this to your .bashrc):
425
426 export PERLIO=crlf
427
428which will pull in the crlf PerlIO layer which does LF -> CRLF conversion
429on every output generated by perl.
430
431=item * F<.exe>
432
433The Cygwin C<stat()>, C<lstat()> and C<readlink()> functions make the F<.exe>
434extension transparent by looking for F<foo.exe> when you ask for F<foo>
435(unless a F<foo> also exists). Cygwin does not require a F<.exe>
436extension, but I<gcc> adds it automatically when building a program.
437However, when accessing an executable as a normal file (e.g., I<cp>
438in a makefile) the F<.exe> is not transparent. The I<install> included
439with Cygwin automatically appends a F<.exe> when necessary.
440
441=item * cygwin vs. windows process ids
442
443Cygwin processes have their own pid, which is different from the
444underlying windows pid. Most posix compliant Proc functions expect
445the cygwin pid, but several Win32::Process functions expect the
446winpid. E.g. C<$$> is the cygwin pid of F</usr/bin/perl>, which is not
447the winpid. Use C<Cygwin::winpid_to_pid()> and C<Cygwin::winpid_to_pid()>
448to translate between them.
449
450=item * C<chown()>
451
452On WinNT C<chown()> can change a file's user and group IDs. On Win9x C<chown()>
453is a no-op, although this is appropriate since there is no security model.
454
455=item * Miscellaneous
456
457File locking using the C<F_GETLK> command to C<fcntl()> is a stub that
458returns C<ENOSYS>.
459
460Win9x can not C<rename()> an open file (although WinNT can).
461
462The Cygwin C<chroot()> implementation has holes (it can not restrict file
463access by native Win32 programs).
464
465Inplace editing C<perl -i> of files doesn't work without doing a backup
466of the file being edited C<perl -i.bak> because of windowish restrictions,
467therefore Perl adds the suffix C<.bak> automatically if you use C<perl -i>
468without specifying a backup extension.
469
470Using C<fork()> after loading multiple dlls may fail with an internal cygwin
471error like the following:
472
473 C:\CYGWIN\BIN\PERL.EXE: *** couldn't allocate memory 0x10000(4128768) for 'C:\CYGWIN\LIB\PERL5\5.6.1\CYGWIN-MULTI\AUTO\SOCKET\SOCKET.DLL' alignment, Win32 error 8
474
475 200 [main] perl 377147 sync_with_child: child -395691(0xB8) died before initialization with status code 0x1
476 1370 [main] perl 377147 sync_with_child: *** child state child loading dlls
477
478Use the rebase utility to resolve the conflicting dll addresses. The
479rebase package is included in the Cygwin netrelease. Use setup.exe from
480F<http://www.cygwin.com/setup.exe> to install it and run rebaseall.
481
482=back
483
484=head2 Prebuilt methods:
485
486=over 4
487
488=item C<Cwd::cwd>
489
490Returns current working directory.
491
492=item C<Cygwin::pid_to_winpid>
493
494Translates a cygwin pid to the corresponding Windows pid (which may or
495may not be the same).
496
497=item C<Cygwin::winpid_to_pid>
498
499Translates a Windows pid to the corresponding cygwin pid (if any).
500
501=back
502
503=head1 INSTALL PERL ON CYGWIN
504
505This will install Perl, including I<man> pages.
506
507 make install 2>&1 | tee log.make-install
508
509NOTE: If C<STDERR> is redirected C<make install> will B<not> prompt
510you to install I<perl> into F</usr/bin>.
511
512You may need to be I<Administrator> to run C<make install>. If you
513are not, you must have write access to the directories in question.
514
515Information on installing the Perl documentation in HTML format can be
516found in the F<INSTALL> document.
517
518=head1 MANIFEST ON CYGWIN
519
520These are the files in the Perl release that contain references to Cygwin.
521These very brief notes attempt to explain the reason for all conditional
522code. Hopefully, keeping this up to date will allow the Cygwin port to
523be kept as clean as possible (listing not updated yet).
524
525=over 4
526
527=item Documentation
528
529 INSTALL README.cygwin README.win32 MANIFEST
530 Changes Changes5.005 Changes5.004 Changes5.6
531 pod/perl.pod pod/perlport.pod pod/perlfaq3.pod
532 pod/perldelta.pod pod/perl5004delta.pod pod/perl56delta.pod
533 pod/perlhist.pod pod/perlmodlib.pod perl/buildtoc pod/perltoc.pod
534
535=item Build, Configure, Make, Install
536
537 cygwin/Makefile.SHs
538 cygwin/ld2.in
539 cygwin/perlld.in
540 ext/IPC/SysV/hints/cygwin.pl
541 ext/NDBM_File/hints/cygwin.pl
542 ext/ODBM_File/hints/cygwin.pl
543 hints/cygwin.sh
544 Configure - help finding hints from uname,
545 shared libperl required for dynamic loading
546 Makefile.SH - linklibperl
547 Porting/patchls - cygwin in port list
548 installman - man pages with :: translated to .
549 installperl - install dll/ld2/perlld, install to pods
550 makedepend.SH - uwinfix
551
552=item Tests
553
554 t/io/tell.t - binmode
555 t/lib/b.t - ignore Cwd from os_extras
556 t/lib/glob-basic.t - Win32 directory list access differs from read mode
557 t/op/magic.t - $^X/symlink WORKAROUND, s/.exe//
558 t/op/stat.t - no /dev, skip Win32 ftCreationTime quirk
559 (cache manager sometimes preserves ctime of file
560 previously created and deleted), no -u (setuid)
561 t/lib/cygwin.t - builtin cygwin function tests
562
563=item Compiled Perl Source
564
565 EXTERN.h - __declspec(dllimport)
566 XSUB.h - __declspec(dllexport)
567 cygwin/cygwin.c - os_extras (getcwd, spawn, Cygwin::winpid_to_pid,
568 Cygwin::pid_to_winpid)
569 perl.c - os_extras
570 perl.h - binmode
571 doio.c - win9x can not rename a file when it is open
572 pp_sys.c - do not define h_errno, pp_system with spawn
573 util.c - use setenv
574
575=item Compiled Module Source
576
577 ext/POSIX/POSIX.xs - tzname defined externally
578 ext/SDBM_File/sdbm/pair.c
579 - EXTCONST needs to be redefined from EXTERN.h
580 ext/SDBM_File/sdbm/sdbm.c
581 - binary open
582
583=item Perl Modules/Scripts
584
585 lib/Cwd.pm - hook to internal Cwd::cwd
586 lib/ExtUtils/MakeMaker.pm
587 - require MM_Cygwin.pm
588 lib/ExtUtils/MM_Cygwin.pm
589 - canonpath, cflags, manifypods, perl_archive
590 lib/File/Find.pm - on remote drives stat() always sets st_nlink to 1
591 lib/File/Spec/Unix.pm - preserve //unc
592 lib/File/Temp.pm - no directory sticky bit
593 lib/perl5db.pl - use stdin not /dev/tty
594 utils/perldoc.PL - version comment
595
596=back
597
598=head1 BUGS ON CYGWIN
599
600Support for swapping real and effective user and group IDs is incomplete.
601On WinNT Cygwin provides C<setuid()>, C<seteuid()>, C<setgid()> and C<setegid()>.
602However, additional Cygwin calls for manipulating WinNT access tokens
603and security contexts are required.
604
605=head1 AUTHORS
606
607Charles Wilson <cwilson@ece.gatech.edu>,
608Eric Fifer <egf7@columbia.edu>,
609alexander smishlajev <als@turnhere.com>,
610Steven Morlock <newspost@morlock.net>,
611Sebastien Barre <Sebastien.Barre@utc.fr>,
612Teun Burgers <burgers@ecn.nl>,
613Gerrit P. Haase <gp@familiehaase.de>.
614
615=head1 HISTORY
616
617Last updated: 2005-02-11
618
README.dgux
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see perlpod manpage) which is
3specially designed to be readable as is.
4
5=head1 NAME
6
7perldgux - Perl under DG/UX.
8
9=head1 SYNOPSIS
10
11One can read this document in the following formats:
12
13 man perldgux
14 view perl perldgux
15 explorer perldgux.html
16 info perldgux
17
18to list some (not all may be available simultaneously), or it may
19be read I<as is>: as F<README.dgux>.
20
21=cut
22
23Contents
24
25 perldgux - Perl under DG/UX.
26
27 NAME
28 SYNOPSIS
29 DESCRIPTION
30 BUILD
31 - Non-threaded Case
32 - Threaded Case
33 - Testing
34 - Installing the built perl
35 AUTHOR
36 SEE ALSO
37
38=head1 DESCRIPTION
39
40Perl 5.7/8.x for DG/UX ix86 R4.20MU0x
41
42=head1 BUILDING PERL ON DG/UX
43
44=head2 Non-threaded Perl on DG/UX
45
46Just run ./Configure script from the top directory.
47Then give "make" to compile.
48
49=head2 Threaded Perl on DG/UX
50
51If you are using as compiler GCC-2.95.x rev(DG/UX)
52an easy solution for configuring perl in your DG/UX
53machine is to run the command:
54
55./Configure -Dusethreads -Duseithreads -Dusedevel -des
56
57This will automatically accept all the defaults and
58in particular /usr/local/ as installation directory.
59Note that GCC-2.95.x rev(DG/UX) knows the switch
60-pthread which allows it to link correctly DG/UX's
61-lthread library.
62
63If you want to change the installation directory or
64have a standard DG/UX with C compiler GCC-2.7.2.x
65then you have no choice than to do an interactive
66build by issuing the command:
67
68./Configure -Dusethreads -Duseithreads
69
70In particular with GCC-2.7.2.x accept all the defaults
71and *watch* out for the message:
72
73 Any additional ld flags (NOT including libraries)? [ -pthread]
74
75Instead of -pthread put here -lthread. CGCC-2.7.2.x
76that comes with the DG/UX OS does NOT know the -pthread
77switch. So your build will fail if you choose the defaults.
78After configuration is done correctly give "make" to compile.
79
80=head2 Testing Perl on DG/UX
81
82Issuing a "make test" will run all the tests.
83If the test lib/ftmp-security gives you as a result
84something like
85
86 lib/ftmp-security....File::Temp::_gettemp:
87 Parent directory (/tmp/) is not safe (sticky bit not set
88 when world writable?) at lib/ftmp-security.t line 100
89
90don't panic and just set the sticky bit in your /tmp
91directory by doing the following as root:
92
93cd /
94chmod +t /tmp (=set the sticky bit to /tmp).
95
96Then rerun the tests. This time all must be OK.
97
98=head2 Installing the built perl on DG/UX
99
100Run the command "make install"
101
102=head1 AUTHOR
103
104Takis Psarogiannakopoulos
105Universirty of Cambridge
106Centre for Mathematical Sciences
107Department of Pure Mathematics
108Wilberforce road
109Cambridge CB3 0WB , UK
110email <takis@XFree86.Org>
111
112=head1 SEE ALSO
113
114perl(1).
115
116=cut
117
118
README.dos
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see perlpod manpage) which is
3specially designed to be readable as is.
4
5=head1 NAME
6
7perldos - Perl under DOS, W31, W95.
8
9=head1 SYNOPSIS
10
11These are instructions for building Perl under DOS (or w??), using
12DJGPP v2.03 or later. Under w95 long filenames are supported.
13
14=head1 DESCRIPTION
15
16Before you start, you should glance through the README file
17found in the top-level directory where the Perl distribution
18was extracted. Make sure you read and understand the terms under
19which this software is being distributed.
20
21This port currently supports MakeMaker (the set of modules that
22is used to build extensions to perl). Therefore, you should be
23able to build and install most extensions found in the CPAN sites.
24
25Detailed instructions on how to build and install perl extension
26modules, including XS-type modules, is included. See 'BUILDING AND
27INSTALLING MODULES'.
28
29=head2 Prerequisites for Compiling Perl on DOS
30
31=over 4
32
33=item DJGPP
34
35DJGPP is a port of GNU C/C++ compiler and development tools to 32-bit,
36protected-mode environment on Intel 32-bit CPUs running MS-DOS and compatible
37operating systems, by DJ Delorie <dj@delorie.com> and friends.
38
39For more details (FAQ), check out the home of DJGPP at:
40
41 http://www.delorie.com/djgpp/
42
43If you have questions about DJGPP, try posting to the DJGPP newsgroup:
44comp.os.msdos.djgpp, or use the email gateway djgpp@delorie.com.
45
46You can find the full DJGPP distribution on any SimTel.Net mirror all over
47the world. Like:
48
49 ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2*
50
51You need the following files to build perl (or add new modules):
52
53 v2/djdev203.zip
54 v2gnu/bnu2112b.zip
55 v2gnu/gcc2953b.zip
56 v2gnu/bsh204b.zip
57 v2gnu/mak3791b.zip
58 v2gnu/fil40b.zip
59 v2gnu/sed3028b.zip
60 v2gnu/txt20b.zip
61 v2gnu/dif272b.zip
62 v2gnu/grep24b.zip
63 v2gnu/shl20jb.zip
64 v2gnu/gwk306b.zip
65 v2misc/csdpmi5b.zip
66
67or possibly any newer version.
68
69=item Pthreads
70
71Thread support is not tested in this version of the djgpp perl.
72
73=back
74
75=head2 Shortcomings of Perl under DOS
76
77Perl under DOS lacks some features of perl under UNIX because of
78deficiencies in the UNIX-emulation, most notably:
79
80=over 4
81
82=item *
83
84fork() and pipe()
85
86=item *
87
88some features of the UNIX filesystem regarding link count and file dates
89
90=item *
91
92in-place operation is a little bit broken with short filenames
93
94=item *
95
96sockets
97
98=back
99
100=head2 Building Perl on DOS
101
102=over 4
103
104=item *
105
106Unpack the source package F<perl5.8*.tar.gz> with djtarx. If you want
107to use long file names under w95 and also to get Perl to pass all its
108tests, don't forget to use
109
110 set LFN=y
111 set FNCASE=y
112
113before unpacking the archive.
114
115=item *
116
117Create a "symlink" or copy your bash.exe to sh.exe in your C<($DJDIR)/bin>
118directory.
119
120 ln -s bash.exe sh.exe
121
122[If you have the recommended version of bash for DJGPP, this is already
123done for you.]
124
125And make the C<SHELL> environment variable point to this F<sh.exe>:
126
127 set SHELL=c:/djgpp/bin/sh.exe (use full path name!)
128
129You can do this in F<djgpp.env> too. Add this line BEFORE any section
130definition:
131
132 +SHELL=%DJDIR%/bin/sh.exe
133
134=item *
135
136If you have F<split.exe> and F<gsplit.exe> in your path, then rename
137F<split.exe> to F<djsplit.exe>, and F<gsplit.exe> to F<split.exe>.
138Copy or link F<gecho.exe> to F<echo.exe> if you don't have F<echo.exe>.
139Copy or link F<gawk.exe> to F<awk.exe> if you don't have F<awk.exe>.
140
141[If you have the recommended versions of djdev, shell utilities and
142gawk, all these are already done for you, and you will not need to do
143anything.]
144
145=item *
146
147Chdir to the djgpp subdirectory of perl toplevel and type the following
148commands:
149
150 set FNCASE=y
151 configure.bat
152
153This will do some preprocessing then run the Configure script for you.
154The Configure script is interactive, but in most cases you just need to
155press ENTER. The "set" command ensures that DJGPP preserves the letter
156case of file names when reading directories. If you already issued this
157set command when unpacking the archive, and you are in the same DOS
158session as when you unpacked the archive, you don't have to issue the
159set command again. This command is necessary *before* you start to
160(re)configure or (re)build perl in order to ensure both that perl builds
161correctly and that building XS-type modules can succeed. See the DJGPP
162info entry for "_preserve_fncase" for more information:
163
164 info libc alphabetical _preserve_fncase
165
166If the script says that your package is incomplete, and asks whether
167to continue, just answer with Y (this can only happen if you don't use
168long filenames or forget to issue "set FNCASE=y" first).
169
170When Configure asks about the extensions, I suggest IO and Fcntl,
171and if you want database handling then SDBM_File or GDBM_File
172(you need to install gdbm for this one). If you want to use the
173POSIX extension (this is the default), make sure that the stack
174size of your F<cc1.exe> is at least 512kbyte (you can check this
175with: C<stubedit cc1.exe>).
176
177You can use the Configure script in non-interactive mode too.
178When I built my F<perl.exe>, I used something like this:
179
180 configure.bat -des
181
182You can find more info about Configure's command line switches in
183the F<INSTALL> file.
184
185When the script ends, and you want to change some values in the
186generated F<config.sh> file, then run
187
188 sh Configure -S
189
190after you made your modifications.
191
192IMPORTANT: if you use this C<-S> switch, be sure to delete the CONFIG
193environment variable before running the script:
194
195 set CONFIG=
196
197=item *
198
199Now you can compile Perl. Type:
200
201 make
202
203=back
204
205=head2 Testing Perl on DOS
206
207Type:
208
209 make test
210
211If you're lucky you should see "All tests successful". But there can be
212a few failed subtests (less than 5 hopefully) depending on some external
213conditions (e.g. some subtests fail under linux/dosemu or plain dos
214with short filenames only).
215
216=head2 Installation of Perl on DOS
217
218Type:
219
220 make install
221
222This will copy the newly compiled perl and libraries into your DJGPP
223directory structure. Perl.exe and the utilities go into C<($DJDIR)/bin>,
224and the library goes under C<($DJDIR)/lib/perl5>. The pod documentation
225goes under C<($DJDIR)/lib/perl5/pod>.
226
227=head1 BUILDING AND INSTALLING MODULES ON DOS
228
229=head2 Building Prerequisites for Perl on DOS
230
231For building and installing non-XS modules, all you need is a working
232perl under DJGPP. Non-XS modules do not require re-linking the perl
233binary, and so are simpler to build and install.
234
235XS-type modules do require re-linking the perl binary, because part of
236an XS module is written in "C", and has to be linked together with the
237perl binary to be executed. This is required because perl under DJGPP
238is built with the "static link" option, due to the lack of "dynamic
239linking" in the DJGPP environment.
240
241Because XS modules require re-linking of the perl binary, you need both
242the perl binary distribution and the perl source distribution to build
243an XS extension module. In addition, you will have to have built your
244perl binary from the source distribution so that all of the components
245of the perl binary are available for the required link step.
246
247=head2 Unpacking CPAN Modules on DOS
248
249First, download the module package from CPAN (e.g., the "Comma Separated
250Value" text package, Text-CSV-0.01.tar.gz). Then expand the contents of
251the package into some location on your disk. Most CPAN modules are
252built with an internal directory structure, so it is usually safe to
253expand it in the root of your DJGPP installation. Some people prefer to
254locate source trees under /usr/src (i.e., C<($DJDIR)/usr/src>), but you may
255put it wherever seems most logical to you, *EXCEPT* under the same
256directory as your perl source code. There are special rules that apply
257to modules which live in the perl source tree that do not apply to most
258of the modules in CPAN.
259
260Unlike other DJGPP packages, which are normal "zip" files, most CPAN
261module packages are "gzipped tarballs". Recent versions of WinZip will
262safely unpack and expand them, *UNLESS* they have zero-length files. It
263is a known WinZip bug (as of v7.0) that it will not extract zero-length
264files.
265
266From the command line, you can use the djtar utility provided with DJGPP
267to unpack and expand these files. For example:
268
269 C:\djgpp>djtarx -v Text-CSV-0.01.tar.gz
270
271This will create the new directory C<($DJDIR)/Text-CSV-0.01>, filling
272it with the source for this module.
273
274=head2 Building Non-XS Modules on DOS
275
276To build a non-XS module, you can use the standard module-building
277instructions distributed with perl modules.
278
279 perl Makefile.PL
280 make
281 make test
282 make install
283
284This is sufficient because non-XS modules install only ".pm" files and
285(sometimes) pod and/or man documentation. No re-linking of the perl
286binary is needed to build, install or use non-XS modules.
287
288=head2 Building XS Modules on DOS
289
290To build an XS module, you must use the standard module-building
291instructions distributed with perl modules *PLUS* three extra
292instructions specific to the DJGPP "static link" build environment.
293
294 set FNCASE=y
295 perl Makefile.PL
296 make
297 make perl
298 make test
299 make -f Makefile.aperl inst_perl MAP_TARGET=perl.exe
300 make install
301
302The first extra instruction sets DJGPP's FNCASE environment variable so
303that the new perl binary which you must build for an XS-type module will
304build correctly. The second extra instruction re-builds the perl binary
305in your module directory before you run "make test", so that you are
306testing with the new module code you built with "make". The third extra
307instruction installs the perl binary from your module directory into the
308standard DJGPP binary directory, C<($DJDIR)/bin>, replacing your
309previous perl binary.
310
311Note that the MAP_TARGET value *must* have the ".exe" extension or you
312will not create a "perl.exe" to replace the one in C<($DJDIR)/bin>.
313
314When you are done, the XS-module install process will have added information
315to your "perllocal" information telling that the perl binary has been replaced,
316and what module was installed. You can view this information at any time
317by using the command:
318
319 perl -S perldoc perllocal
320
321=head1 AUTHOR
322
323Laszlo Molnar, F<laszlo.molnar@eth.ericsson.se> [Installing/building perl]
324
325Peter J. Farley III F<pjfarley@banet.net> [Building/installing modules]
326
327=head1 SEE ALSO
328
329perl(1).
330
331=cut
332
333
README.epoc
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see pod/perlpod.pod) which is
3specially designed to be readable as is.
4
5=head1 NAME
6
7README.epoc - Perl for EPOC
8
9=head1 SYNOPSIS
10
11Perl 5 README file for the EPOC Release 5 operating system.
12
13=head1 INTRODUCTION
14
15EPOC is an OS for palmtops and mobile phones. For more informations look at:
16http://www.symbian.com/
17
18This is a port of perl to the epocemx SDK by Eberhard Mattes, which
19itself uses the SDK by symbian. Essentially epocemx it is a POSIX
20look alike environment for the EPOC OS. For more information look at:
21http://epocemx.sourceforge.net/
22
23perl and epocemx runs on Epoc Release 5 machines: Psion 5mx, 5mx Pro,
24Psion Revo, Psion Netbook and on the Ericsson M128. It may run on Epoc
25Release 3 Hardware (Series 5 classic), too. For more information about
26this hardware please refer to http://www.psion.com/
27
28Vendors which like to have support for their devices are free to send
29me a sample.
30
31=head1 INSTALLING PERL ON EPOC
32
33You can download a ready-to-install version from
34http://www.oflebbe.de/oflebbe/perl/
35
36You will need at least ~6MB free space in order to install and run perl.
37
38Please install the emxusr.sis package from
39http://epocemx.sourceforge.net/ first.
40
41Install perl.sis on the EPOC machine. If you do not know how to do
42that, consult your PsiWin documentation.
43
44Perl itself and its standard library is using 4 MB disk space.
45Unicode support and some other modules are left out. (For details,
46please look into epoc/createpkg.pl). If you like to use these modules,
47you are free to copy them from a current perl release.
48
49=head1 STARTING PERL ON EPOC
50
51Please use the epocemx shell to start perl. perl integrates with the
52conventions of epocemx.
53
54=head2 Editors on Epoc
55
56A suitable text editor can be downloaded from symbian
57http://www.symbian.com/developer/downloads/files/editor.zip
58
59=head2 Features of Perl on Epoc
60
61The built-in function EPOC::getcwd returns the current directory.
62
63=head2 Restrictions of Perl on Epoc
64
65Features are left out, because of restrictions of the POSIX support in
66EPOC:
67
68=over 4
69
70=item *
71
72socket IO is only implemented poorly. You can only use sysread and
73syswrite on them. The commands read, write, print, <> do not work for
74sockets. This may change iff epocemx supports sockets.
75
76=item *
77
78kill, alarm and signals. Do not try to use them. This may be
79impossible to implement on EPOC.
80
81=item *
82
83select is missing.
84
85=item *
86
87binmode does not exist. (No CR LF to LF translation for text files)
88
89=item *
90
91EPOC does not handle the notion of current drive and current
92directory very well (i.e. not at all, but it tries hard to emulate
93one). See PATH.
94
95=item *
96
97Heap is limited to 4MB.
98
99=item *
100
101Dynamic loading is not implemented.
102
103=back
104
105=head2 Compiling Perl 5 on the EPOC cross compiling environment
106
107Sorry, this is far too short.
108
109=over 4
110
111=item *
112
113You will need the epocemx SDK from Eberhard Mattes.
114
115=item *
116
117Get the Perl sources from your nearest CPAN site.
118
119=item *
120
121Unpack the sources.
122
123=item *
124
125Build a native perl from this sources... Make sure to save the
126miniperl executable as miniperl.native.
127
128Start again from scratch
129
130 cp epoc/* .
131 ./Configure -S
132 make
133 cp miniperl.native miniperl
134 touch miniperl.exe
135 make
136 perl createpkg.pl
137
138 emxsis perl.pkg perl.sis
139
140=back
141
142=head1 SUPPORT STATUS OF PERL ON EPOC
143
144I'm offering this port "as is". You can ask me questions, but I can't
145guarantee I'll be able to answer them. Since the port to epocemx is
146quite new, please check the web for updates first.
147
148Very special thanks to Eberhard Mattes for epocemx.
149
150=head1 AUTHOR
151
152Olaf Flebbe <olaf@oflebbe.de>
153http://www.oflebbe.de/oflebbe/perl/
154
155=head1 LAST UPDATE
156
1572003-01-18
158
159=cut
160
README.freebsd
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see pod/perlpod.pod) which is
3specifically designed to be readable as is.
4
5=head1 NAME
6
7README.freebsd - Perl version 5 on FreeBSD systems
8
9=head1 DESCRIPTION
10
11This document describes various features of FreeBSD that will affect how Perl
12version 5 (hereafter just Perl) is compiled and/or runs.
13
14=head2 FreeBSD core dumps from readdir_r with ithreads
15
16When perl is configured to use ithreads, it will use re-entrant library calls
17in preference to non-re-entrant versions. There is a bug in FreeBSD's
18C<readdir_r> function in versions 4.5 and earlier that can cause a SEGV when
19reading large directories. A patch for FreeBSD libc is available
20(see http://www.freebsd.org/cgi/query-pr.cgi?pr=misc/30631 )
21which has been integrated into FreeBSD 4.6.
22
23=head2 $^X doesn't always contain a full path in FreeBSD
24
25perl 5.8.0 sets C<$^X> where possible to a full path by asking the operating
26system. On FreeBSD the full path of the perl interpreter is found by reading
27the symlink F</proc/curproc/file>. There is a bug on FreeBSD, where the
28result of reading this symlink is can be wrong in certain circumstances
29(see http://www.freebsd.org/cgi/query-pr.cgi?pr=35703 ).
30In these cases perl will fall back to the old behaviour of using C's
31argv[0] value for C<$^X>.
32
33=head2 Perl will no longer be part of "base FreeBSD"
34
35Not as bad as it sounds--what this means is that Perl will no longer be
36part of the B<kernel build system> of FreeBSD. Perl will still very
37probably be part of the "default install", and in any case the latest
38version will be in the ports system. The first FreeBSD version this
39change will affect is 5.0, all 4.n versions will keep the status quo.
40
41=head1 AUTHOR
42
43Nicholas Clark <nick@ccl4.org>, collating wisdom supplied by Slaven Rezic
44and Tim Bunce.
45
46Please report any errors, updates, or suggestions to F<perlbug@perl.org>.
47
48
README.hpux
1If you read this file _as_is_, just ignore the funny characters you see.
2It is written in the POD format (see pod/perlpod.pod) which is specially
3designed to be readable as is.
4
5=head1 NAME
6
7README.hpux - Perl version 5 on Hewlett-Packard Unix (HP-UX) systems
8
9=head1 DESCRIPTION
10
11This document describes various features of HP's Unix operating system
12(HP-UX) that will affect how Perl version 5 (hereafter just Perl) is
13compiled and/or runs.
14
15=head2 Using perl as shipped with HP-UX
16
17Application release September 2001, HP-UX 11.00 is the first to ship
18with Perl. By the time it was perl-5.6.1 in /opt/perl. The first
19occurrence is on CD 5012-7954 and can be installed using
20
21 swinstall -s /cdrom perl
22
23assuming you have mounted that CD on /cdrom. In this version the
24following modules were installed:
25
26 ActivePerl::DocTools-0.04 HTML::Parser-3.19 XML::DOM-1.25
27 Archive::Tar-0.072 HTML::Tagset-3.03 XML::Parser-2.27
28 Compress::Zlib-1.08 MIME::Base64-2.11 XML::Simple-1.05
29 Convert::ASN1-0.10 Net-1.07 XML::XPath-1.09
30 Digest::MD5-2.11 PPM-2.1.5 XML::XSLT-0.32
31 File::CounterFile-0.12 SOAP::Lite-0.46 libwww-perl-5.51
32 Font::AFM-1.18 Storable-1.011 libxml-perl-0.07
33 HTML-Tree-3.11 URI-1.11 perl-ldap-0.23
34
35The build was a portable hppa-1.1 multithread build that supports large
36files compiled with gcc-2.9-hppa-991112
37
38If you perform a new installation, then Perl will be installed
39automatically.
40
41More recent (preinstalled) HP-UX systems have more recent versions of
42Perl and the updated modules.
43
44=head2 Using perl from HP's porting centre
45
46HP porting centre tries very hard to keep up with customer demand and
47release updates from the Open Source community. Having precompiled
48Perl binaries available is obvious.
49
50The HP porting centres are limited in what systems they are allowed
51to port to and they usually choose the two most recent OS versions
52available. This means that at the moment of writing, there are only
53HP-UX 11.11 (pa-risc 2.0) and HP-UX 11.23 (Itanium 2) ports available
54on the porting centres.
55
56HP has asked the porting centre to move Open Source binaries
57from /opt to /usr/local, so binaries produced since the start
58of July 2002 are located in /usr/local.
59
60One of HP porting centres URL's is http://hpux.connect.org.uk/
61The port currently available is built with GNU gcc.
62
63=head2 Compiling Perl 5 on HP-UX
64
65When compiling Perl, you must use an ANSI C compiler. The C compiler
66that ships with all HP-UX systems is a K&R compiler that should only be
67used to build new kernels.
68
69Perl can be compiled with either HP's ANSI C compiler or with gcc. The
70former is recommended, as not only can it compile Perl with no
71difficulty, but also can take advantage of features listed later that
72require the use of HP compiler-specific command-line flags.
73
74If you decide to use gcc, make sure your installation is recent and
75complete, and be sure to read the Perl INSTALL file for more gcc-specific
76details.
77
78=head2 PA-RISC
79
80HP's current Unix systems run on its own Precision Architecture
81(PA-RISC) chip. HP-UX used to run on the Motorola MC68000 family of
82chips, but any machine with this chip in it is quite obsolete and this
83document will not attempt to address issues for compiling Perl on the
84Motorola chipset.
85
86The most recent version of PA-RISC at the time of this document's last
87update is 2.0. HP PA-RISC systems are usually refered to with model
88description "HP 9000".
89
90A complete list of models at the time the OS was built is in the file
91/usr/sam/lib/mo/sched.models. The first column corresponds to the last
92part of the output of the "model" command. The second column is the
93PA-RISC version and the third column is the exact chip type used.
94(Start browsing at the bottom to prevent confusion ;-)
95
96 # model
97 9000/800/L1000-44
98 # grep L1000-44 /usr/sam/lib/mo/sched.models
99 L1000-44 2.0 PA8500
100
101=head2 Portability Between PA-RISC Versions
102
103An executable compiled on a PA-RISC 2.0 platform will not execute on a
104PA-RISC 1.1 platform, even if they are running the same version of
105HP-UX. If you are building Perl on a PA-RISC 2.0 platform and want that
106Perl to also run on a PA-RISC 1.1, the compiler flags +DAportable and
107+DS32 should be used.
108
109It is no longer possible to compile PA-RISC 1.0 executables on either
110the PA-RISC 1.1 or 2.0 platforms. The command-line flags are accepted,
111but the resulting executable will not run when transferred to a PA-RISC
1121.0 system.
113
114=head2 PA-RISC 1.0
115
116The original version of PA-RISC, HP no longer sells any system with this chip.
117
118The following systems contained PA-RISC 1.0 chips:
119
120 600, 635, 645, 808, 815, 822, 825, 832, 834, 835, 840, 842, 845, 850,
121 852, 855, 860, 865, 870, 890
122
123=head2 PA-RISC 1.1
124
125An upgrade to the PA-RISC design, it shipped for many years in many different
126system.
127
128The following systems contain with PA-RISC 1.1 chips:
129
130 705, 710, 712, 715, 720, 722, 725, 728, 730, 735, 742, 743, 744, 745,
131 747, 750, 755, 770, 777, 778, 779, 800, 801, 803, 806, 807, 809, 811,
132 813, 816, 817, 819, 821, 826, 827, 829, 831, 837, 839, 841, 847, 849,
133 851, 856, 857, 859, 867, 869, 877, 887, 891, 892, 897, A180, A180C,
134 B115, B120, B132L, B132L+, B160L, B180L, C100, C110, C115, C120,
135 C160L, D200, D210, D220, D230, D250, D260, D310, D320, D330, D350,
136 D360, D410, DX0, DX5, DXO, E25, E35, E45, E55, F10, F20, F30, G30,
137 G40, G50, G60, G70, H20, H30, H40, H50, H60, H70, I30, I40, I50, I60,
138 I70, J200, J210, J210XC, K100, K200, K210, K220, K230, K400, K410,
139 K420, S700i, S715, S744, S760, T500, T520
140
141=head2 PA-RISC 2.0
142
143The most recent upgrade to the PA-RISC design, it added support for
14464-bit integer data.
145
146As of the date of this document's last update, the following systems
147contain PA-RISC 2.0 chips:
148
149 700, 780, 781, 782, 783, 785, 802, 804, 810, 820, 861, 871, 879, 889,
150 893, 895, 896, 898, 899, A400, A500, B1000, B2000, C130, C140, C160,
151 C180, C180+, C180-XP, C200+, C400+, C3000, C360, C3600, CB260, D270,
152 D280, D370, D380, D390, D650, J220, J2240, J280, J282, J400, J410,
153 J5000, J5500XM, J5600, J7000, J7600, K250, K260, K260-EG, K270, K360,
154 K370, K380, K450, K460, K460-EG, K460-XP, K470, K570, K580, L1000,
155 L2000, L3000, N4000, R380, R390, SD16000, SD32000, SD64000, T540,
156 T600, V2000, V2200, V2250, V2500, V2600
157
158Just before HP took over Compaq, some systems were renamed. the link
159that contained the explanation is dead, so here's a short summary:
160
161 HP 9000 A-Class servers, now renamed HP Server rp2400 series.
162 HP 9000 L-Class servers, now renamed HP Server rp5400 series.
163 HP 9000 N-Class servers, now renamed HP Server rp7400.
164
165 rp2400, rp2405, rp2430, rp2450, rp2470, rp3410, rp3440, rp4410,
166 rp4440, rp5400, rp5405, rp5430, rp5450, rp5470, rp7400, rp7405,
167 rp7410, rp7420, rp8400, rp8420, Superdome
168
169The current naming convention is:
170
171 aadddd
172 ||||`+- 00 - 99 relative capacity & newness (upgrades, etc.)
173 |||`--- unique number for each architecture to ensure different
174 ||| systems do not have the same numbering across
175 ||| architectures
176 ||`---- 1 - 9 identifies family and/or relative positioning
177 ||
178 |`----- c = ia32 (cisc)
179 | p = pa-risc
180 | x = ia-64 (Itanium & Itanium 2)
181 | h = housing
182 `------ t = tower
183 r = rack optimized
184 s = super scalable
185 b = blade
186 sa = appliance
187
188=head2 Itanium Processor Family and HP-UX
189
190HP-UX also runs on the new Itanium processor. This requires the use
191of a different version of HP-UX (currently 11.23 or 11i v2), and with
192the exception of a few differences detailed below and in later sections,
193Perl should compile with no problems.
194
195Although PA-RISC binaries can run on Itanium systems, you should not
196attempt to use a PA-RISC version of Perl on an Itanium system. This is
197because shared libraries created on an Itanium system cannot be loaded
198while running a PA-RISC executable.
199
200HP Itanium 2 systems are usually refered to with model description
201"HP Integrity".
202
203=head2 Itanium & Itanium 2
204
205HP also ships servers with the 128-bit Itanium processor(s). As of the
206date of this document's last update, the following systems contain
207Itanium or Itanium 2 chips (this is very likely to be out of date):
208
209 BL60p, rx1600, rx1620, rx2600, rx2600hptc, rx2620, rx4610, rx4640,
210 rx5670, rx7620, rx8620, rx9610
211
212To see all about your machine, type
213
214 # model
215 ia64 hp server rx2600
216 # /usr/contrib/bin/machinfo
217
218=head2 Building Dynamic Extensions on HP-UX
219
220HP-UX supports dynamically loadable libraries (shared libraries).
221Shared libraries end with the suffix .sl. On Itanium systems,
222they end with the suffix .so.
223
224Shared libraries created on a platform using a particular PA-RISC
225version are not usable on platforms using an earlier PA-RISC version by
226default. However, this backwards compatibility may be enabled using the
227same +DAportable compiler flag (with the same PA-RISC 1.0 caveat
228mentioned above).
229
230Shared libraries created on an Itanium platform cannot be loaded on
231a PA-RISC platform. Shared libraries created on a PA-RISC platform
232can only be loaded on an Itanium platform if it is a PA-RISC executable
233that is attempting to load the PA-RISC library. A PA-RISC shared
234library cannot be loaded into an Itanium executable nor vice-versa.
235
236To create a shared library, the following steps must be performed:
237
238 1. Compile source modules with +z or +Z flag to create a .o module
239 which contains Position-Independent Code (PIC). The linker will
240 tell you in the next step if +Z was needed.
241 (For gcc, the appropriate flag is -fpic or -fPIC.)
242
243 2. Link the shared library using the -b flag. If the code calls
244 any functions in other system libraries (e.g., libm), it must
245 be included on this line.
246
247(Note that these steps are usually handled automatically by the extension's
248Makefile).
249
250If these dependent libraries are not listed at shared library creation
251time, you will get fatal "Unresolved symbol" errors at run time when the
252library is loaded.
253
254You may create a shared library that refers to another library, which
255may be either an archive library or a shared library. If this second
256library is a shared library, this is called a "dependent library". The
257dependent library's name is recorded in the main shared library, but it
258is not linked into the shared library. Instead, it is loaded when the
259main shared library is loaded. This can cause problems if you build an
260extension on one system and move it to another system where the
261libraries may not be located in the same place as on the first system.
262
263If the referred library is an archive library, then it is treated as a
264simple collection of .o modules (all of which must contain PIC). These
265modules are then linked into the shared library.
266
267Note that it is okay to create a library which contains a dependent
268library that is already linked into perl.
269
270Some extensions, like DB_File and Compress::Zlib use/require prebuilt
271libraries for the perl extensions/modules to work. If these libraries
272are built using the default configuration, it might happen that you
273run into an error like "invalid loader fixup" during load phase.
274HP is aware of this problem. Search the HP-UX cxx-dev forums for
275discussions about the subject. The short answer is that B<everything>
276(all libraries, everything) must be compiled with C<+z> or C<+Z> to be
277PIC (position independent code). (For gcc, that would be
278C<-fpic> or C<-fPIC>). In HP-UX 11.00 or newer the linker
279error message should tell the name of the offending object file.
280
281A more general approach is to intervene manually, as with an example for
282the DB_File module, which requires SleepyCat's libdb.sl:
283
284 # cd .../db-3.2.9/build_unix
285 # vi Makefile
286 ... add +Z to all cflags to create shared objects
287 CFLAGS= -c $(CPPFLAGS) +Z -Ae +O2 +Onolimit \
288 -I/usr/local/include -I/usr/include/X11R6
289 CXXFLAGS= -c $(CPPFLAGS) +Z -Ae +O2 +Onolimit \
290 -I/usr/local/include -I/usr/include/X11R6
291
292 # make clean
293 # make
294 # mkdir tmp
295 # cd tmp
296 # ar x ../libdb.a
297 # ld -b -o libdb-3.2.sl *.o
298 # mv libdb-3.2.sl /usr/local/lib
299 # rm *.o
300 # cd /usr/local/lib
301 # rm -f libdb.sl
302 # ln -s libdb-3.2.sl libdb.sl
303
304 # cd .../DB_File-1.76
305 # make distclean
306 # perl Makefile.PL
307 # make
308 # make test
309 # make install
310
311As of db-4.2.x it is no longer needed to do this by hand. Sleepycat
312has changed the configuration process to add +z on HP-UX automatically.
313
314 # cd .../db-4.2.25/build_unix
315 # env CFLAGS=+DA2.0w LDFLAGS=+DA2.0w ../dist/configure
316
317should work to generate 64bit shared libraries for HP-UX 11.00 and 11i.
318
319It is no longer possible to link PA-RISC 1.0 shared libraries (even
320though the command-line flags are still present).
321
322PA-RISC and Itanium object files are not interchangeable. Although
323you may be able to use ar to create an archive library of PA-RISC
324object files on an Itanium system, you cannot link against it using
325an Itanium link editor.
326
327=head2 The HP ANSI C Compiler
328
329When using this compiler to build Perl, you should make sure that the
330flag -Aa is added to the cpprun and cppstdin variables in the config.sh
331file (though see the section on 64-bit perl below). If you are using a
332recent version of the Perl distribution, these flags are set automatically.
333
334=head2 The GNU C Compiler
335
336When you are going to use the GNU C compiler (gcc), and you don't have
337gcc yet, you can either build it yourself from the sources (available
338from e.g. http://www.gnu.ai.mit.edu/software/gcc/releases.html) or fetch
339a prebuilt binary from the HP porting center. There are two places where
340gcc prebuilds can be fetched; the first and best (for HP-UX 11 only) is
341http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,547,00.html
342the second is http://hpux.cs.utah.edu/hppd/hpux/Gnu/ where you can also
343find the GNU binutils package. (Browse through the list, because there
344are often multiple versions of the same package available).
345
346Above mentioned distributions are depots. H.Merijn Brand has made prebuilt
347gcc binaries available on http://mirrors.develooper.com/hpux/ and/or
348http://www.cmve.net/~merijn/ for HP-UX 10.20, HP-UX 11.00, and HP-UX 11.11
349(HP-UX 11i) in both 32- and 64-bit versions. These are bzipped tar archives
350that also include recent GNU binutils and GNU gdb. Read the instructions
351on that page to rebuild gcc using itself.
352
353On PA-RISC you need a different compiler for 32-bit applications and for
35464-bit applications. On PA-RISC, 32-bit objects and 64-bit objects do
355not mix. Period. There is no different behaviour for HP C-ANSI-C or GNU
356gcc. So if you require your perl binary to use 64-bit libraries, like
357Oracle-64bit, you MUST build a 64-bit perl.
358
359Building a 64-bit capable gcc on PA-RISC from source is possible only when
360you have the HP C-ANSI C compiler or an already working 64-bit binary of
361gcc available. Best performance for perl is achieved with HP's native
362compiler.
363
364=head2 Using Large Files with Perl on HP-UX
365
366Beginning with HP-UX version 10.20, files larger than 2GB (2^31 bytes)
367may be created and manipulated. Three separate methods of doing this
368are available. Of these methods, the best method for Perl is to compile
369using the -Duselargefiles flag to Configure. This causes Perl to be
370compiled using structures and functions in which these are 64 bits wide,
371rather than 32 bits wide. (Note that this will only work with HP's ANSI
372C compiler. If you want to compile Perl using gcc, you will have to get
373a version of the compiler that supports 64-bit operations. See above for
374where to find it.)
375
376There are some drawbacks to this approach. One is that any extension
377which calls any file-manipulating C function will need to be recompiled
378(just follow the usual "perl Makefile.PL; make; make test; make install"
379procedure).
380
381The list of functions that will need to recompiled is:
382creat, fgetpos, fopen,
383freopen, fsetpos, fstat,
384fstatvfs, fstatvfsdev, ftruncate,
385ftw, lockf, lseek,
386lstat, mmap, nftw,
387open, prealloc, stat,
388statvfs, statvfsdev, tmpfile,
389truncate, getrlimit, setrlimit
390
391Another drawback is only valid for Perl versions before 5.6.0. This
392drawback is that the seek and tell functions (both the builtin version
393and POSIX module version) will not perform correctly.
394
395It is strongly recommended that you use this flag when you run
396Configure. If you do not do this, but later answer the question about
397large files when Configure asks you, you may get a configuration that
398cannot be compiled, or that does not function as expected.
399
400=head2 Threaded Perl on HP-UX
401
402It is possible to compile a version of threaded Perl on any version of
403HP-UX before 10.30, but it is strongly suggested that you be running on
404HP-UX 11.00 at least.
405
406To compile Perl with threads, add -Dusethreads to the arguments of
407Configure. Verify that the -D_POSIX_C_SOURCE=199506L compiler flag is
408automatically added to the list of flags. Also make sure that -lpthread
409is listed before -lc in the list of libraries to link Perl with. The
410hints provided for HP-UX during Configure will try very hard to get
411this right for you.
412
413HP-UX versions before 10.30 require a separate installation of a POSIX
414threads library package. Two examples are the HP DCE package, available
415on "HP-UX Hardware Extensions 3.0, Install and Core OS, Release 10.20,
416April 1999 (B3920-13941)" or the Freely available PTH package, available
417on H.Merijn's site (http://mirrors.develooper.com/hpux/).
418
419If you are going to use the HP DCE package, the library used for threading
420is /usr/lib/libcma.sl, but there have been multiple updates of that
421library over time. Perl will build with the first version, but it
422will not pass the test suite. Older Oracle versions might be a compelling
423reason not to update that library, otherwise please find a newer version
424in one of the following patches: PHSS_19739, PHSS_20608, or PHSS_23672
425
426reformatted output:
427
428 d3:/usr/lib 106 > what libcma-*.1
429 libcma-00000.1:
430 HP DCE/9000 1.5 Module: libcma.sl (Export)
431 Date: Apr 29 1996 22:11:24
432 libcma-19739.1:
433 HP DCE/9000 1.5 PHSS_19739-40 Module: libcma.sl (Export)
434 Date: Sep 4 1999 01:59:07
435 libcma-20608.1:
436 HP DCE/9000 1.5 PHSS_20608 Module: libcma.1 (Export)
437 Date: Dec 8 1999 18:41:23
438 libcma-23672.1:
439 HP DCE/9000 1.5 PHSS_23672 Module: libcma.1 (Export)
440 Date: Apr 9 2001 10:01:06
441 d3:/usr/lib 107 >
442
443If you choose for the PTH package, use swinstall to install pth in
444the default location (/opt/pth), and then make symbolic links to the
445libraries from /usr/lib
446
447 # cd /usr/lib
448 # ln -s /opt/pth/lib/libpth* .
449
450For building perl to support Oracle, it needs to be linked with libcl
451and libpthread. So even if your perl is an unthreaded build, these
452libraries might be required. See "Oracle on HP-UX" below.
453
454=head2 64-bit Perl on HP-UX
455
456Beginning with HP-UX 11.00, programs compiled under HP-UX can take
457advantage of the LP64 programming environment (LP64 means Longs and
458Pointers are 64 bits wide), in which scalar variables will be able
459to hold numbers larger than 2^32 with complete precision. Perl has
460proven to be consistent and reliable in 64bit mode since 5.8.1 on
461all HP-UX 11.xx.
462
463As of the date of this document, Perl is fully 64-bit compliant on
464HP-UX 11.00 and up for both cc- and gcc builds. If you are about to
465build a 64-bit perl with GNU gcc, please read the gcc section carefully.
466
467Should a user have the need for compiling Perl in the LP64 environment,
468use the -Duse64bitall flag to Configure. This will force Perl to be
469compiled in a pure LP64 environment (with the +DD64 flag for HP C-ANSI-C,
470with no additional options for GNU gcc 64-bit on PA-RISC, and with
471-mlp64 for GNU gcc on Itanium).
472If you want to compile Perl using gcc, you will have to get a version of
473the compiler that supports 64-bit operations.)
474
475You can also use the -Duse64bitint flag to Configure. Although there
476are some minor differences between compiling Perl with this flag versus
477the -Duse64bitall flag, they should not be noticeable from a Perl user's
478perspective. When configuring -Duse64bitint using a 64bit gcc on a
479pa-risc architecture, -Duse64bitint is silently promoted to -Duse64bitall.
480
481In both cases, it is strongly recommended that you use these flags when
482you run Configure. If you do not use do this, but later answer the
483questions about 64-bit numbers when Configure asks you, you may get a
484configuration that cannot be compiled, or that does not function as
485expected.
486
487=head2 Oracle on HP-UX
488
489Using perl to connect to Oracle databases through DBI and DBD::Oracle
490has caused a lot of people many headaches. Read README.hpux in the
491DBD::Oracle for much more information. The reason to mention it here
492is that Oracle requires a perl built with libcl and libpthread, the
493latter even when perl is build without threads. Building perl using
494all defaults, but still enabling to build DBD::Oracle later on can be
495achieved using
496
497 Configure -A prepend:libswanted='cl pthread ' ...
498
499Do not forget the space before the trailing quote.
500
501Also note that this does not (yet) work with all configurations,
502it is known to fail with 64-bit versions of GCC.
503
504=head2 GDBM and Threads on HP-UX
505
506If you attempt to compile Perl with threads on an 11.X system and also
507link in the GDBM library, then Perl will immediately core dump when it
508starts up. The only workaround at this point is to relink the GDBM
509library under 11.X, then relink it into Perl.
510
511=head2 NFS filesystems and utime(2) on HP-UX
512
513If you are compiling Perl on a remotely-mounted NFS filesystem, the test
514io/fs.t may fail on test #18. This appears to be a bug in HP-UX and no
515fix is currently available.
516
517=head2 perl -P and // and HP-UX
518
519If HP-UX Perl is compiled with flags that will cause problems if the
520-P flag of Perl (preprocess Perl code with the C preprocessor before
521perl sees it) is used. The problem is that C<//>, being a C++-style
522until-end-of-line comment, will disappear along with the remainder
523of the line. This means that common Perl constructs like
524
525 s/foo//;
526
527will turn into illegal code
528
529 s/foo
530
531The workaround is to use some other quoting separator than C<"/">,
532like for example C<"!">:
533
534 s!foo!!;
535
536=head2 HP-UX Kernel Parameters (maxdsiz) for Compiling Perl
537
538By default, HP-UX comes configured with a maximum data segment size of
53964MB. This is too small to correctly compile Perl with the maximum
540optimization levels. You can increase the size of the maxdsiz kernel
541parameter through the use of SAM.
542
543When using the GUI version of SAM, click on the Kernel Configuration
544icon, then the Configurable Parameters icon. Scroll down and select
545the maxdsiz line. From the Actions menu, select the Modify Configurable
546Parameter item. Insert the new formula into the Formula/Value box.
547Then follow the instructions to rebuild your kernel and reboot your
548system.
549
550In general, a value of 256MB (or "256*1024*1024") is sufficient for
551Perl to compile at maximum optimization.
552
553=head1 nss_delete core dump from op/pwent or op/grent
554
555You may get a bus error core dump from the op/pwent or op/grent
556tests. If compiled with -g you will see a stack trace much like
557the following:
558
559 #0 0xc004216c in () from /usr/lib/libc.2
560 #1 0xc00d7550 in __nss_src_state_destr () from /usr/lib/libc.2
561 #2 0xc00d7768 in __nss_src_state_destr () from /usr/lib/libc.2
562 #3 0xc00d78a8 in nss_delete () from /usr/lib/libc.2
563 #4 0xc01126d8 in endpwent () from /usr/lib/libc.2
564 #5 0xd1950 in Perl_pp_epwent () from ./perl
565 #6 0x94d3c in Perl_runops_standard () from ./perl
566 #7 0x23728 in S_run_body () from ./perl
567 #8 0x23428 in perl_run () from ./perl
568 #9 0x2005c in main () from ./perl
569
570The key here is the C<nss_delete> call. One workaround for this
571bug seems to be to create add to the file F</etc/nsswitch.conf>
572(at least) the following lines
573
574 group: files
575 passwd: files
576
577Whether you are using NIS does not matter. Amazingly enough,
578the same bug also affects Solaris.
579
580=head1 AUTHOR
581
582Jeff Okamoto <okamoto@corp.hp.com>
583H.Merijn Brand <h.m.brand@xs4all.nl>
584
585With much assistance regarding shared libraries from Marc Sabatella.
586
587=head1 DATE
588
589Version 0.7.6: 2005-12-20
590
591=cut
592
README.hurd
1If you read this file _as_is_, just ignore the funny characters you see.
2It is written in the POD format (see pod/perlpod.pod) which is specially
3designed to be readable as is.
4
5=head1 NAME
6
7README.hurd - Perl version 5 on Hurd
8
9=head1 DESCRIPTION
10
11If you want to use Perl on the Hurd, I recommend using the Debian
12GNU/Hurd distribution ( see http://www.debian.org/ ), even if an
13official, stable release has not yet been made. The old "gnu-0.2"
14binary distribution will most certainly have additional problems.
15
16=head2 Known Problems with Perl on Hurd
17
18The Perl test suite may still report some errors on the Hurd. The
19"lib/anydbm" and "pragma/warnings" tests will almost certainly fail.
20Both failures are not really specific to the Hurd, as indicated by the
21test suite output.
22
23The socket tests may fail if the network is not configured. You have
24to make "/hurd/pfinet" the translator for "/servers/socket/2", giving
25it the right arguments. Try "/hurd/pfinet --help" for more
26information.
27
28Here are the statistics for Perl 5.005_62 on my system:
29
30 Failed Test Status Wstat Total Fail Failed List of failed
31 -------------------------------------------------------------------------
32 lib/anydbm.t 12 1 8.33% 12
33 pragma/warnings 333 1 0.30% 215
34
35 8 tests and 24 subtests skipped.
36 Failed 2/229 test scripts, 99.13% okay. 2/10850 subtests failed, 99.98% okay.
37
38There are quite a few systems out there that do worse!
39
40However, since I am running a very recent Hurd snapshot, in which a lot of
41bugs that were exposed by the Perl test suite have been fixed, you may
42encounter more failures. Likely candidates are: "op/stat", "lib/io_pipe",
43"lib/io_sock", "lib/io_udp" and "lib/time".
44
45In any way, if you're seeing failures beyond those mentioned in this
46document, please consider upgrading to the latest Hurd before reporting
47the failure as a bug.
48
49=head1 AUTHOR
50
51Mark Kettenis <kettenis@gnu.org>
52
53Last Updated: Fri, 29 Oct 1999 22:50:30 +0200
54
55
README.irix
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see pod/perlpod.pod) which is
3specifically designed to be readable as is.
4
5=head1 NAME
6
7README.irix - Perl version 5 on Irix systems
8
9=head1 DESCRIPTION
10
11This document describes various features of Irix that will affect how Perl
12version 5 (hereafter just Perl) is compiled and/or runs.
13
14=head2 Building 32-bit Perl in Irix
15
16Use
17
18 sh Configure -Dcc='cc -n32'
19
20to compile Perl 32-bit. Don't bother with -n32 unless you have 7.1
21or later compilers (use cc -version to check).
22
23(Building 'cc -n32' is the default.)
24
25=head2 Building 64-bit Perl in Irix
26
27Use
28
29 sh Configure -Dcc='cc -64' -Duse64bitint
30
31This requires require a 64-bit MIPS CPU (R8000, R10000, ...)
32
33You can also use
34
35 sh Configure -Dcc='cc -64' -Duse64bitall
36
37but that makes no difference compared with the -Duse64bitint because
38of the C<cc -64>.
39
40You can also do
41
42 sh Configure -Dcc='cc -n32' -Duse64bitint
43
44to use long longs for the 64-bit integer type, in case you don't
45have a 64-bit CPU.
46
47If you are using gcc, just
48
49 sh Configure -Dcc=gcc -Duse64bitint
50
51should be enough, the Configure should automatically probe for the
52correct 64-bit settings.
53
54=head2 About Compiler Versions of Irix
55
56Some Irix cc versions, e.g. 7.3.1.1m (try cc -version) have been known
57to have issues (coredumps) when compiling perl.c. If you've used
58-OPT:fast_io=ON and this happens, try removing it. If that fails, or
59you didn't use that, then try adjusting other optimization options
60(-LNO, -INLINE, -O3 to -O2, etcetera). The compiler bug has been
61reported to SGI. (Allen Smith <easmith@beatrice.rutgers.edu>)
62
63=head2 Linker Problems in Irix
64
65If you get complaints about so_locations then search in the file
66hints/irix_6.sh for "lddflags" and do the suggested adjustments.
67(David Billinghurst <David.Billinghurst@riotinto.com.au>)
68
69=head2 Malloc in Irix
70
71Do not try to use Perl's malloc, this will lead into very mysterious
72errors (especially with -Duse64bitall).
73
74=head2 Building with threads in Irix
75
76Run Configure with -Duseithreads which will configure Perl with
77the new Perl 5.8.0 "interpreter threads", see L<threads>.
78
79The old Perl 5.005 threads is obsolete, unmaintained, and its use is
80discouraged. If you really want it, run Configure with the
81-Dusethreads -Duse5005threads options as described in INSTALL.
82
83For either thread model and for Irix 6.2, you have to have the
84following patches installed:
85
86 1404 Irix 6.2 Posix 1003.1b man pages
87 1645 Irix 6.2 & 6.3 POSIX header file updates
88 2000 Irix 6.2 Posix 1003.1b support modules
89 2254 Pthread library fixes
90 2401 6.2 all platform kernel rollup
91
92B<IMPORTANT>: Without patch 2401, a kernel bug in Irix 6.2 will cause
93your machine to panic and crash when running threaded perl. Irix 6.3
94and later are okay.
95
96 Thanks to Hannu Napari <Hannu.Napari@hut.fi> for the IRIX
97 pthreads patches information.
98
99=head2 Irix 5.3
100
101While running Configure and when building, you are likely to get
102quite a few of these warnings:
103
104 ld:
105 The shared object /usr/lib/libm.so did not resolve any symbols.
106 You may want to remove it from your link line.
107
108Ignore them: in IRIX 5.3 there is no way to quieten ld about this.
109
110During compilation you will see this warning from toke.c:
111
112 uopt: Warning: Perl_yylex: this procedure not optimized because it
113 exceeds size threshold; to optimize this procedure, use -Olimit option
114 with value >= 4252.
115
116Ignore the warning.
117
118In IRIX 5.3 and with Perl 5.8.1 (Perl 5.8.0 didn't compile in IRIX 5.3)
119the following failures are known.
120
121 Failed Test Stat Wstat Total Fail Failed List of Failed
122 --------------------------------------------------------------------------
123 ../ext/List/Util/t/shuffle.t 0 139 ?? ?? % ??
124 ../lib/Math/Trig.t 255 65280 29 12 41.38% 24-29
125 ../lib/sort.t 0 138 119 72 60.50% 48-119
126 56 tests and 474 subtests skipped.
127 Failed 3/811 test scripts, 99.63% okay. 78/75813 subtests failed, 99.90% okay.
128
129They are suspected to be compiler errors (at least the shuffle.t
130failure is known from some IRIX 6 setups) and math library errors
131(the Trig.t failure), but since IRIX 5 is long since end-of-lifed,
132further fixes for the IRIX are unlikely. If you can get gcc for 5.3,
133you could try that, too, since gcc in IRIX 6 is a known workaround for
134at least the shuffle.t and sort.t failures.
135
136=head1 AUTHOR
137
138Jarkko Hietaniemi <jhi@iki.fi>
139
140Please report any errors, updates, or suggestions to F<perlbug@perl.org>.
141
142
README.jp
README.ko
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see perlpod manpage) which is
3specially designed to be readable as is.
4
5This file is in Korean encoded in EUC-KR.
6
7�� ������ perldoc�� �Ἥ ���� �ʰ� ���� ���� ��쿡�� �� �κ���
8������ ǥ���ϱ� ���� ���� =head, =item, 'L' ���� �����Ͻʽÿ�.
9�� ������ ���� perldoc�� ���� �ʰ� ������ �дµ� �� ������
10���� POD �������� ¥�� �ֽ��ϴ�. �� �ڼ��� ���� perlpod
11�Ŵ����� �����Ͻʽÿ�.
12
13
14=head1 NAME
15
16perlko - Perl�� �ѱ��� ���ڵ�
17
18=head1 DESCRIPTION
19
20Perl�� ���迡 ���� ���� ȯ���մϴ� !
21
22
23Perl�� 5.8.0�Ǻ��� �����ڵ�/ISO 10646�� ���� �������� ������ �մϴ�.
24�����ڵ� ������ ��ȯ���� �������� ����� ���� ��������
25�����ڵ� ������ ���� �־��� ���ݵ� �θ� ���̰� �ִ� ������ ���ڵ���
26�����մϴ�. �����ڵ�� �� ���迡�� ���̴� ��� �� ���� ǥ�� ü�� -
27������ ��ƾ ���ĺ�, Ű�� ���ĺ�, ���� ���ĺ�, �ε��� ���� �ƽþ���
28���� �迭 ��ũ��Ʈ, �ƶ� ����, ���긮 ����, �������� ����, �ѱ����� �ѱ�,
29�Ϻ����� ����, �Ϲ� �ε���� ǥ�� ü�� ��-�� �����ϴ� ���� ��ǥ�� �ϰ�
30�ֱ� ������ ������ ���̴� �� ��� �� ���� ���� � ü�迡 ������
31���� ���հ� ���ڵ��� �� �� �ִ� ��� ���ڴ� �����̰� ���� ���� ���տ���
32�����ϰ� ���� �ʴ� ���� ���� ���ڸ� �����ϰ� �ֽ��ϴ�.
33
34
35Perl�� ���������� �����ڵ带 ���� ǥ���� ���� ����մϴ�. ���� ��ü������
36���ϸ� Perl ��ũ��Ʈ �ȿ��� UTF-8 ���ڿ��� �� �� �ְ�,
37���� �Լ��� ������(���� ���, ���Խ�, index, substr)�� ����Ʈ ����
38��� �����ڵ� ���� ������ �����մϴ�. (�� �ڼ��� ����
39perlunicode �Ŵ����� �����Ͻʽÿ�.) �����ڵ尡 �θ� ���DZ� ����
40�θ� ���̰� �־���, ������ �θ� ���̰� �ִ� ����/�� �� ���ڵ�����
41������� �ϰ� �̵� ���ڵ����� �� �����Ϳ� ������ �ٷ�� ���� ���� ����
42'Encode'�� �������ϴ�. �������� 'Encode'�� �Ἥ ������ ���ڵ� ������
43��ȯ�� ���� �� �� �ֽ��ϴ�.
44
45'Encode'�� ������ ���� �ѱ��� ���ڵ��� �����մϴ�.
46
47=over 4
48
49=item euc-kr
50
51 US-ASCII�� KS X 1001�� ���� ���� ��Ƽ����Ʈ ���ڵ� (���� �ϼ����̶��
52 �Ҹ�.) KS X 2901�� RFC 1557 ����.
53
54=item cp949
55
56 MS-Windows 9x/ME���� ���̴� Ȯ�� �ϼ���. euc-kr�� 8,822����
57 �ѱ� ������ ���� ����. alias�� uhc, windows-949, x-windows-949,
58 ks_c_5601-1987. �� ������ �̸��� �������� ���� �̸�������, Microsoft
59 ��ǰ���� CP949�� �ǹ̷� ���̰� ����.
60
61=item johab
62
63 KS X 1001:1998 �η� 3���� ������ ������. ���� �����丮�� cp949��
64 ���������� US-ASCII�� KS X 1001�� 8,822���� �ѱ� ������ ���� ����.
65 ���ڵ� ����� ���� �ٸ�.
66
67=item iso-2022-kr
68
69 RFC 1557���� ������ �ѱ��� ���ͳ� ���� ��ȯ�� ���ڵ����� US-ASCII��
70 KS X 1001�� �����丮�� �ϴ� ������ euc-kr�� ������ ���ڵ� ����� �ٸ�.
71 1997-8�� ����� �������� �� �̻� ���� ��ȯ�� ������ ����.
72
73=item ksc5601-raw
74
75 KS X 1001(KS C 5601)�� GL(��, MSB�� 0���� �� ���) �� ������ ����
76 ���ڵ�. US-ASCII�� �������� �ʰ� �ܵ����� ���̴� ���� X11 ��� �۲�
77 ���ڵ� (ksc5601.1987-0. '0'�� GL�� �ǹ���.)���� ���̴� ���� �����ϰ��
78 ���� ����. KS C 5601�� 1997�� KS X 1001�� �̸��� �ٲپ���. 1998��� ��
79 ���� (����ȭ ��ȣ�� ��� ��ǥ ��ȣ)�� ��������.
80
81=back
82
83 �� ���� ��� ������ �Ʒ��� ���Դϴ�.
84
85���� ���, euc-kr ���ڵ����� �� ������ UTF-8�� ��ȯ�Ϸ��� ������
86���� �ϸ� �˴ϴ�.
87
88
89 perl -Mencoding=euc-kr,STDOUT,utf8 -pe1 < file.euckr > file.utf8
90
91����ȯ�� ������ ���� �� �� �ֽ��ϴ�.
92
93 perl -Mencoding=utf8,STDOUT,euc-kr -pe1 < file.utf8 > file.euckr
94
95 �̷� ��ȯ�� ���� ���ϰ� �� �� �ֵ��� Encode ����� �Ἥ
96�����ϰ� Perl�θ� ���� piconv�� Perl�� ��� �ֽ��ϴ�.
97�� �̸����� �� �� �ֵ��� piconv�� Unix�� �ִ� iconv��
98�� �� ���Դϴ�. �� ������ �Ʒ��� �����ϴ�.
99
100 piconv -f euc-kr -t utf8 < file.euckr > file.utf8
101 piconv -f utf8 -t euc-kr < file.utf8 > file.euckr
102
103 ��, 'PerlIO::encoding' ����� �Ἥ �ѱ��� ���ڵ��� ���鼭 ���� ����
104(����Ʈ ������ �ƴ϶�) ó���� ���� �� �� �ֽ��ϴ�.
105
106 #!/path/to/perl
107
108 use encoding 'euc-kr', STDIN => 'euc-kr',
109 STDOUT-> 'euc-kr', STDERR=>'euc-kr';
110
111 print length("����"); # 2 (ū ����ǥ�� ���� ���� ó���� ����)
112 print length('����'); # 4 (���� ����ǥ�� ����Ʈ ���� ó���� ����)
113 print index("�Ѱ�, �뵿��", "��"); # -1 ('��'�� ����)
114 print index('�Ѱ�, �뵿��', '��'); # 7 (8��°�� 9��° ����Ʈ�� '��'��
115 �ڵ尪�� ��ġ��.)
116
117
118=head2 �� �ڼ��� �˰� ������...
119
120 Perl�� ��ġ�ϸ� ����� �ڼ��� ������ ���� ���� ����, �� ������ ����
121Perl ���� �� �ƴ϶� �����ڵ� ����, Encode�� ���� � ���� ����
122��� �� �ֽ��ϴ�. ���� �� ������ ���� ��� ����� ���� �ֽ��ϴ�.
123
124
125=head2 Perl ���� �ڷ�
126
127������ ����� ���� �ܿ��� ������ ���� �ڷᰡ �ֽ��ϴ�. �� ����� ����
128������ ���� �ƴϰ� �Ϻ� ��ǥ���� �� ���� ���Դϴ�.
129
130=over 4
131
132=item L<http://www.perl.com/>
133
134 O'Reilly�� Perl �� ������
135
136=item L<http://www.cpan.org/>
137
138 Comprehensive Perl Archive Network
139
140=item L<http://lists.perl.org/>
141
142 Perl ���ϸ� ����Ʈ. ���� ����Ʈ ���
143 perl-unicode���� 'Encode'�� ���� ������.
144
145=back
146
147=head2 Perl�� �� ��� �����ϴµ� ������ �� �� �ִ� �ѱ��� ���� ����Ʈ
148
149=over 4
150
151=item L<http://www.perl.or.kr/>
152
153 Perl �ѱ� ����� ����
154
155=item L<news:han.comp.lang.perl/>
156
157 �ѱ��� Perl ���� ��
158
159=item L<http://seoul.pm.org/>
160
161 Perl ���� (����)
162
163=item L<http://www.perlmania.or.kr/>
164
165 Home for Korean Perlmanias
166
167=item L<http://www.oreilly.co.kr/perl/>
168
169 O'Reilly���� ���� �ѱ��� Perl ���� ���
170
171=item L<http://www.perlschool.net/>
172
173 Perl ���� ���� �� �ҽ�, �ֱ� ����, ���� �ؿ� ����Ʈ ��ũ
174
175=item L<http://www.perl.co.kr>
176
177 Perl�� ���õ� CGI, DB, ���� � ���� ���� �� ���� ����
178
179=back
180
181=head2 �����ڵ� �� �ѱ��� ���ڵ� ���� �ڷ�
182
183=over 4
184
185=item L<http://www.unicode.org/>
186
187 �����ڵ� ���ҽþ�.
188
189=item L<http://std.dkuug.dk/JTC1/SC2/WG2>
190
191�⺻������ Unicode�� ���� ISO ǥ���� ISO/IEC 10646 UCS(Universal
192Character Set)�� ����� ISO/IEC JTC1/SC2/WG2�� �� ������.
193
194=item L<http://jshin.net/faq/qa8.html>
195
196 �ѱ��� ���� ���� �� ���ڵ��� ���� �ȳ�.
197
198=item L<http://www.cl.cam.ac.uk/~mgk25/unicode.html>
199
200 ���н�/���������� �����ڵ�� UTF-8 ��뿡 ���� ������(FAQ)
201
202=item L<http://kldp.org/Translations/html/UTF8-Unicode-KLDP/UTF8-Unicode-KLDP.html>
203
204 ���н�/���������� �����ڵ�� UTF-8 ��뿡 ���� ������(FAQ)�� �ѱ��� ����
205
206=back
207
208=head1 SEE ALSO
209
210L<Encode>, L<Encode::KR>, L<encoding>, L<perluniintro>, L<perlunicode>
211
212
213=head1 AUTHORS
214
215Jarkko Hietaniemi E<lt>jhi@iki.fiE<gt>
216������ E<lt>jshin@mailaps.orgE<gt>
217
218=cut
219
README.linux
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see pod/perlpod.pod) which is
3specifically designed to be readable as is.
4
5=head1 NAME
6
7README.linux - Perl version 5 on Linux systems
8
9=head1 DESCRIPTION
10
11This document describes various features of Linux that will affect how Perl
12version 5 (hereafter just Perl) is compiled and/or runs.
13
14=head2 Experimental Support for Sun Studio Compilers for Linux OS
15
16Sun Microsystems has released a port of their Sun Studio compiliers for
17Linux. As of November 2005, only an alpha version has been released.
18Until a release of these compilers is made, support for compiling Perl with
19these compiler experimental.
20
21Also, some special instructions for building Perl with Sun Studio on Linux.
22Following the normal C<Configure>, you have to run make as follows:
23
24 LDLOADLIBS=-lc make
25
26C<LDLOADLIBS> is an environment variable used by the linker to link modules
27C</ext> modules to glibc. Currently, that environment variable is not getting
28populated by a combination of C<Config> entries and C<ExtUtil::MakeMaker>.
29While there may be a bug somewhere in Perl's configuration or
30C<ExtUtil::MakeMaker> causing the problem, the most likely cause is an
31incomplete understanding of Sun Studio by this author. Further investigation
32is needed to get this working better.
33
34=head1 AUTHOR
35
36Steve Peters <steve@fisharerojo.org>
37
38Please report any errors, updates, or suggestions to F<perlbug@perl.org>.
39
40
README.machten
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see pod/perlpod.pod) which is
3specially designed to be readable as is.
4
5=head1 NAME
6
7README.machten - Perl version 5 on Power MachTen systems
8
9=head1 DESCRIPTION
10
11This document describes how to build Perl 5 on Power MachTen systems,
12and discusses a few wrinkles in the implementation.
13
14=head2 Perl version 5.8.x and greater not supported
15
16B<Power MachTen is not supported by versions of Perl later than
175.6.x.>
18If you wish to build a version from the 5.6 track, please
19obtain a source distribution from the archive at
20L<http://cpan.org/src/5.0/> and follow the instructions in its
21README.machten file.
22
23MachTen is no longer supported by its developers, Tenon Intersystems.
24A UNIX environment hosted on Mac OS Classic, MachTen has been
25superseded by Mac OS X and by BSD and Linux implementations for Macintosh
26hardware.
27The final version of Power MachTen, 4.1.4, lacks many features found in
28modern implementations of UNIX, and has a number of bugs.
29These shortcomings prevent recent versions of Perl from being able to use
30extensions on MachTen, and cause numerous test suite failures in the
31perl core.
32
33In September 2003, a discussion on the MachTen mailing list determined
34that there was no interest in making a later version of Perl build
35successfully on MachTen.
36Consequently, support for building Perl under MachTen has been suppressed
37in Perl distributions published after February 2004.
38The hints file, F<hints/machten.sh>, remains a part of the
39distributions for reference purposes.
40
41=head2 Compiling Perl 5.6.x on MachTen
42
43To compile perl 5.6.x under MachTen 4.1.4 (and probably earlier versions):
44
45 ./Configure -de
46 make
47 make test
48 make install
49
50This builds and installs a statically-linked perl; MachTen's dynamic
51linking facilities are not adequate to support Perl's use of
52dynamically linked libraries. (See F<hints/machten.sh> for more
53information.)
54
55You should have at least 32 megabytes of free memory on your
56system before running the C<make> command.
57
58For much more information on building perl -- for example, on how to
59change the default installation directory -- see F<INSTALL>.
60
61=head2 Failures during C<make test> on MachTen
62
63=over 4
64
65=item op/lexassign.t
66
67This test may fail when first run after building perl. It does not
68fail subsequently. The cause is unknown.
69
70=item pragma/warnings.t
71
72Test 257 fails due to a failure to warn about attempts to read from a
73filehandle which is a duplicate of stdout when stdout is attached to a
74pipe. The output of the test contains a block comment which discusses
75a different failure, not applicable to MachTen.
76
77The root of the problem is that Machten does not assign a file type to
78either end of a pipe (see L<stat>), resulting, among other things
79in Perl's C<-p> test failing on file descriptors belonging to pipes.
80As a result, perl becomes confused, and the test for reading from a
81write-only file fails. I am reluctant to patch perl to get around
82this, as it's clearly an OS bug (about which Tenon has been informed),
83and limited in its effect on practical Perl programs.
84
85=back
86
87=head2 Building external modules on MachTen
88
89To add an external module to perl, build in the normal way, which
90is documented in L<ExtUtils::MakeMaker>, or which can be driven
91automatically by the CPAN module (see L<CPAN>), which is part of the
92standard distribution. If you want to install a module which
93contains XS code (C or C++ source which compiles to object code
94for linking with perl), you will have to replace your perl binary with
95a new version containing the new statically-linked object module. The
96build process tells you how to do this.
97
98There is a gotcha, however, which users usually encounter immediately
99they respond to CPAN's invitation to C<install Bundle::CPAN>. When
100installing a I<bundle> -- a group of modules which together achieve
101some particular purpose, the installation process for later modules in
102the bundle tends to assume that earlier modules have been fully
103installed and are available for use. This is not true on a
104statically-linked system for earlier modules which contain XS code.
105As a result the installation of the bundle fails. The work-around is
106not to install the bundle as a one-shot operation, but instead to see
107what modules it contains, and install these one-at-a-time by hand in
108the order given.
109
110=head1 AUTHOR
111
112Dominic Dunlop <domo@computer.org>
113
114=head1 DATE
115
116Version 1.1.0 2004-02-13
117
README.macos
1If you read this file _as_is_, just ignore the funny characters you see.
2It is written in the POD format (see pod/perlpod.pod) which is specially
3designed to be readable as is.
4
5=head1 NAME
6
7README.macos - Perl under Mac OS (Classic)
8
9=head1 SYNOPSIS
10
11This document briefly describes perl under Mac OS (Classic).
12If you are running perl under Mac OS X, you don't want to be
13here (unless you are in the Classic environment under Mac OS X).
14
15When we say "Mac OS" below, we mean Mac OS 7, 8, and 9, and I<not>
16Mac OS X.
17
18
19=head1 DESCRIPTION
20
21The latest perl source itself builds on Mac OS, with some additional
22pieces. Support for Mac OS is now in the perl core, and MacPerl is kept
23in close sync with regular perl releases.
24
25To build perl for Mac OS (as an MPW tool), you will need the addition
26of the F<macos> subdirectory, distributed separately. It includes extra
27source files, config files, and make files. It also includes extra
28Mac-specific modules.
29
30To build the MacPerl application, you will also need the F<macperl>
31directory, which includes the source files for creating the
32application itself.
33
34All of this is available from the development site, via
35HTTP (in the MacPerl Installer, which includes all the source
36and binaries) and anonymous CVS.
37
38 http://dev.macperl.org/
39
40The source is also in the main perl repository in the macperl
41branch (the 5.6 source is in the maint-5.6/macperl branch).
42
43You will also need compilers and libraries, all of them freely
44available. These are linked to from the SourceForge site. Go that site
45for all things having to do with MacPerl development.
46
47MacPerl 5.6.1 and later are supported on Mac OS 8.1 and later, for 68040
48and PowerPC architectures. The MPW tool may be used on Mac OS 7.5.5
49and 68030 computers.
50
51MacPerl 5.2.0r4 is also available, on the CPAN and on SourceForge. It
52is based on perl 5.004, and works with Mac OS 7.5.5 and 68030 computers.
53
54
55=head1 AUTHOR
56
57perl was ported to Mac OS by Matthias Neeracher
58E<lt>neeracher@mac.comE<gt>. It is currently maintained by Chris
59Nandor E<lt>pudge@pobox.comE<gt>.
60
61
62=head1 DATE
63
64Last modified 2002.05.02.
65
README.macosx
1If you read this file _as_is_, just ignore the funny characters you see.
2It is written in the POD format (see pod/perlpod.pod) which is specially
3designed to be readable as is.
4
5=head1 NAME
6
7README.macosx - Perl under Mac OS X
8
9=head1 SYNOPSIS
10
11This document briefly describes perl under Mac OS X.
12
13
14=head1 DESCRIPTION
15
16The latest Perl release (5.8.8 as of this writing) builds without changes
17under Mac OS X. Under 10.3 "Panther" and newer OS versions, all self-tests
18pass, and all standard features are supported.
19
20Earlier Mac OS X releases (10.2 "Jaguar" and older) did not include a
21completely thread-safe libc, so threading is not fully supported. Also,
22earlier releases included a buggy libdb, so some of the DB_File tests
23are known to fail on those releases.
24
25
26=head2 Installation Prefix
27
28The default installation location for this release uses the traditional
29UNIX directory layout under /usr/local. This is the recommended location
30for most users, and will leave the Apple-supplied Perl and its modules
31undisturbed.
32
33Using an installation prefix of '/usr' will result in a directory layout
34that mirrors that of Apple's default Perl, with core modules stored in
35'/System/Library/Perl/${version}', CPAN modules stored in
36'/Library/Perl/${version}', and the addition of
37'/Network/Library/Perl/${version}' to @INC for modules that are stored
38on a file server and used by many Macs.
39
40
41=head2 SDK support
42
43First, export the path to the SDK into the build environment:
44
45 export SDK=/Developer/SDKs/MacOSX10.3.9.sdk
46
47Use an SDK by exporting some additions to Perl's 'ccflags' and '..flags'
48config variables:
49
50 ./Configure -Accflags="-nostdinc -B$SDK/usr/include/gcc \
51 -B$SDK/usr/lib/gcc -isystem$SDK/usr/include \
52 -F$SDK/System/Library/Frameworks" \
53 -Aldflags="-Wl,-syslibroot,$SDK" \
54 -de
55
56=head2 Universal Binary support
57
58To compile perl as a universal binary (built for both ppc and intel), export
59the SDK variable as above, selecting the 10.4u SDK:
60
61 export SDK=/Developer/SDKs/MacOSX10.4u.sdk
62
63In addition to the compiler flags used to select the SDK, also add the flags
64for creating a universal binary:
65
66 ./Configure -Accflags="-arch i686 -arch ppc -nostdinc -B$SDK/usr/include/gcc \
67 -B$SDK/usr/lib/gcc -isystem$SDK/usr/include \
68 -F$SDK/System/Library/Frameworks" \
69 -Aldflags="-arch i686 -arch ppc -Wl,-syslibroot,$SDK" \
70 -de
71
72Keep in mind that these compiler and linker settings will also be used when
73building CPAN modules. For XS modules to be compiled as a universal binary, any
74libraries it links to must also be universal binaries. The system libraries that
75Apple includes with the 10.4u SDK are all universal, but user-installed libraries
76may need to be re-installed as universal binaries.
77
78=head2 libperl and Prebinding
79
80Mac OS X ships with a dynamically-loaded libperl, but the default for
81this release is to compile a static libperl. The reason for this is
82pre-binding. Dynamic libraries can be pre-bound to a specific address in
83memory in order to decrease load time. To do this, one needs to be aware
84of the location and size of all previously-loaded libraries. Apple
85collects this information as part of their overall OS build process, and
86thus has easy access to it when building Perl, but ordinary users would
87need to go to a great deal of effort to obtain the information needed
88for pre-binding.
89
90You can override the default and build a shared libperl if you wish
91(S<Configure ... -Duseshrlib>), but the load time on pre-10.4 OS
92releases will be greater than either the static library, or Apple's
93pre-bound dynamic library.
94
95With 10.4 "Tiger" and newer, Apple has all but eliminated the performance
96penalty for non-prebound libraries.
97
98
99=head2 Updating Apple's Perl
100
101In a word - don't, at least without a *very* good reason. Your scripts
102can just as easily begin with "#!/usr/local/bin/perl" as with
103"#!/usr/bin/perl". Scripts supplied by Apple and other third parties as
104part of installation packages and such have generally only been tested
105with the /usr/bin/perl that's installed by Apple.
106
107If you find that you do need to update the system Perl, one issue worth
108keeping in mind is the question of static vs. dynamic libraries. If you
109upgrade using the default static libperl, you will find that the dynamic
110libperl supplied by Apple will not be deleted. If both libraries are
111present when an application that links against libperl is built, ld will
112link against the dynamic library by default. So, if you need to replace
113Apple's dynamic libperl with a static libperl, you need to be sure to
114delete the older dynamic library after you've installed the update.
115
116
117=head2 Known problems
118
119If you have installed extra libraries such as GDBM through Fink
120(in other words, you have libraries under F</sw/lib>), or libdlcompat
121to F</usr/local/lib>, you may need to be extra careful when running
122Configure to not to confuse Configure and Perl about which libraries
123to use. Being confused will show up for example as "dyld" errors about
124symbol problems, for example during "make test". The safest bet is to run
125Configure as
126
127 Configure ... -Uloclibpth -Dlibpth=/usr/lib
128
129to make Configure look only into the system libraries. If you have some
130extra library directories that you really want to use (such as newer
131Berkeley DB libraries in pre-Panther systems), add those to the libpth:
132
133 Configure ... -Uloclibpth -Dlibpth='/usr/lib /opt/lib'
134
135The default of building Perl statically may cause problems with complex
136applications like Tk: in that case consider building shared Perl
137
138 Configure ... -Duseshrplib
139
140but remember that there's a startup cost to pay in that case (see above
141"libperl and Prebinding").
142
143Starting with Tiger (Mac OS X 10.4), Apple shipped broken locale files for
144the eu_ES locale (Basque-Spain). In previous releases of Perl, this resulted in
145failures in the C<lib/locale> test. These failures have been supressed
146in the current release of Perl by making the test ignore the broken locale.
147If you need to use the eu_ES locale, you should contact Apple support.
148
149=head2 MacPerl
150
151Quite a bit has been written about MacPerl, the Perl distribution for
152"Classic MacOS" - that is, versions 9 and earlier of MacOS. Because it
153runs in environment that's very different from that of UNIX, many things
154are done differently in MacPerl. Modules are installed using a different
155procedure, Perl itself is built differently, path names are different,
156etc.
157
158From the perspective of a Perl programmer, Mac OS X is more like a
159traditional UNIX than Classic MacOS. If you find documentation that
160refers to a special procedure that's needed for MacOS that's drastically
161different from the instructions provided for UNIX, the MacOS
162instructions are quite often intended for MacPerl on Classic MacOS. In
163that case, the correct procedure on Mac OS X is usually to follow the
164UNIX instructions, rather than the MacPerl instructions.
165
166
167=head2 Carbon
168
169MacPerl ships with a number of modules that are used to access the
170classic MacOS toolbox. Many of these modules have been updated to use
171Mac OS X's newer "Carbon" toolbox, and are available from CPAN in the
172"Mac::Carbon" module.
173
174
175=head2 Cocoa
176
177There are two ways to use Cocoa from Perl. Apple's PerlObjCBridge
178module, included with Mac OS X, can be used by standalone scripts to
179access Foundation (i.e. non-GUI) classes and objects.
180
181An alternative is CamelBones, a framework that allows access to both
182Foundation and AppKit classes and objects, so that full GUI applications
183can be built in Perl. CamelBones can be found on SourceForge, at
184L<http://www.sourceforge.net/projects/camelbones/>.
185
186
187=head1 Starting From Scratch
188
189Unfortunately it is not that difficult somehow manage to break one's
190Mac OS X Perl rather severely. If all else fails and you want to
191really, B<REALLY>, start from scratch and remove even your Apple Perl
192installation (which has become corrupted somehow), the following
193instructions should do it. B<Please think twice before following
194these instructions: they are much like conducting brain surgery to
195yourself. Without anesthesia.> We will B<not> come to fix your system
196if you do this.
197
198First, get rid of the libperl.dylib:
199
200 # cd /System/Library/Perl/darwin/CORE
201 # rm libperl.dylib
202
203Then delete every .bundle file found anywhere in the folders:
204
205 /System/Library/Perl
206 /Library/Perl
207
208You can find them for example by
209
210 # find /System/Library/Perl /Library/Perl -name '*.bundle' -print
211
212After this you can either copy Perl from your operating system media
213(you will need at least the /System/Library/Perl and /usr/bin/perl),
214or rebuild Perl from the source code with C<Configure -Dprefix=/usr
215-Dusershrplib> NOTE: the C<-Dprefix=/usr> to replace the system Perl
216works much better with Perl 5.8.1 and later, in Perl 5.8.0 the
217settings were not quite right.
218
219"Pacifist" from CharlesSoft (L<http://www.charlessoft.com/>) is a nice
220way to extract the Perl binaries from the OS media, without having to
221reinstall the entire OS.
222
223
224=head1 AUTHOR
225
226This README was written by Sherm Pendley E<lt>sherm@dot-app.orgE<gt>,
227and subsequently updated by Dominic Dunlop E<lt>domo@computer.orgE<gt>.
228The "Starting From Scratch" recipe was contributed by John Montbriand
229E<lt>montbriand@apple.comE<gt>.
230
231=head1 DATE
232
233Last modified 2005-11-07.
234
README.micro
1microperl is supposed to be a really minimal perl, even more
2minimal than miniperl. No Configure is needed to build microperl,
3on the other hand this means that interfaces between Perl and your
4operating system are left very -- minimal.
5
6All this is experimental. If you don't know what to do with microperl
7you probably shouldn't. Do not report bugs in microperl; fix the bugs.
8
9We assume ANSI C89 plus the following:
10- <stdlib.h>
11- rename()
12- opendir(), readdir(), closedir() (via dirent.h)
13- memchr (via string.h)
14- (a safe) putenv() (via stdlib.h)
15- strtoul() (via stdlib.h)
16(grep for 'define' in uconfig.sh.)
17Also, Perl times() is defined to always return zeroes.
18
19If you are still reading this and you are itching to try out microperl:
20
21 make -f Makefile.micro
22
23If you make changes to uconfig.sh, run
24
25 make -f Makefile.micro regen_uconfig
26
27to regenerate uconfig.h.
28
README.mint
1If you read this file _as_is_, just ignore the funny characters you see.
2It is written in the POD format (see pod/perlpod.pod) which is specially
3designed to be readable as is.
4
5=head1 NAME
6
7README.mint - Perl version 5 on Atari MiNT
8
9=head1 DESCRIPTION
10
11There is a binary version of perl available from the FreeMiNT project
12http://freemint.de/ You may wish to use this instead of trying to
13compile yourself.
14
15B<The following advice is from perl 5.004_02 and is probably rather
16out of date.>
17
18If you want to build perl yourself on MiNT (or maybe on an Atari without
19MiNT) you may want to accept some advice from somebody who already did it...
20
21There was a perl port for Atari ST done by ++jrb bammi@cadence.com.
22This port tried very hard to build on non-MiNT-systems. For the
23sake of efficiency I've left this way. Yet, I haven't removed bammi's
24patches but left them intact. Unfortunately some of the files that
25bammi contributed to the perl distribution seem to have vanished?
26
27So, how can you distinguish my patches from bammi's patches? All of
28bammi's stuff is embedded in "#ifdef atarist" preprocessor macros.
29My MiNT port uses "#ifdef __MINT__" instead (and unconditionally
30undefines "atarist". If you want to continue on bammi's port, all
31you have to do is to swap the "-D" and "-U" switches for "__MINT__"
32and "atarist" in the variable ccflags.
33
34However, I think that my version will still run on non-MiNT-systems
35provided that the user has a Eunuchs-like environment (i.e. the
36standard envariables like $PATH, $HOME, ... are set, there is a
37POSIX compliant shell in /bin/sh, and...)
38
39=head1 Known problems with Perl on MiNT
40
41The problems you may encounter when building perl on your machine
42are most probably due to deficiencies in MiNT resp. the Atari
43platform in general.
44
45First of all, if you have less than 8 MB of RAM you shouldn't
46even try to build Perl yourself. Better grab a binary pre-compiled
47version somewhere. Even if you have more memory you should take
48some care. Try to run in a fresh environment (without memory
49fragmented too much) with as few daemons, accessories, xcontrol
50modules etc. as possible. If you run some AES you should
51consider to start a console based environment instead.
52
53A problem has been reported with sed. Sed is used to create
54some configuration files based on the answers you have given
55to the Configure script. Unfortunately the Perl Configure script
56shows sed on MiNT its limits. I have sed 2.05 with a stacksize
57of 64k and I have encountered no problems. If sed crashes
58during your configuration process you should first try to
59augment sed's stacksize:
60
61 fixstk 64k /usr/bin/sed
62
63(or similar). If it still doesn't help you may have a look
64which other versions of sed are installed on your system.
65If you have a KGMD 1.0 installation you will find three
66in /usr/bin. Have a look there.
67
68Perl has some "mammut" C files. If gcc reports "internal
69compiler error: program cc1 got fatal signal 10" this is very
70likely due to a stack overflow in program cc1. Find cc1
71and fix its stack. I have made good experiences with
72
73 fixstk 2 cc1
74
75This doesn't establish a stack of 2 Bytes only as you might
76think. It really reserves one half of the available memory
77for cc1's stack. A setting of 1 would reserve the entire
78memory for cc1, 3 would reserve three fourths. You will have
79to find out the value that suits to your system yourself.
80
81To find out the location of the program "cc1" simply type
82`gcc --print-prog-name cc1' at your shell prompt.
83
84Now run make (maybe "make -k"). If you get a fatal signal 10
85increase cc1's stacksize, if you run out of memory you should
86either decrease the stacksize or follow some more hints:
87
88Perl's building process is very handy on machines with a lot
89of virtual memory but may result in a disaster if you are short
90of memory. If gcc fails to compile many source files you should
91reduce the optimization. Grep for "optimize" in the file
92config.sh and change the flags.
93
94If only several huge files cause problems (actually it is not a
95matter of the file size resp. the amount of code but depends on
96the size of the individual functions) it is useful to bypass
97the make program and compile these files directly from the
98command line. For example if you got something like the
99following from make:
100
101 CCCMD = gcc -DPERL_CORE ....
102 ...
103 ...: virtual memory exhausted
104
105you should hack into the shell:
106
107 gcc -DPERL_CORE ... toke.c
108
109Please note that you have to add the name of the source file
110(here toke.c) at the end.
111
112If none of this helps, you're helpless. Wait for a binary
113release. If you have succeeded you may encounter another problem
114at the linking process. If gcc complains that it can't find
115some libraries within the perl distribution you probably have
116an old linker. If it complains for example about "file not
117found for xxx.olb" you should cd into the directory in
118question and
119
120 ln -s libxxx.a xxx.olb
121
122This will fix the problem.
123
124This version (5.00402) of perl has passed most of the tests on my system:
125
126 Failed Test Status Wstat Total Fail Failed List of failed
127 ------------------------------------------------------------------------------
128 io/pipe.t 10 2 20.00% 7, 9
129 io/tell.t 13 1 7.69% 12
130 lib/complex.t 762 13 1.71% 84-85, 248-251, 257, 272-273,
131 371, 380, 419-420
132 lib/io_pipe.t 10 1 10.00% 9
133 lib/io_tell.t 13 1 7.69% 12
134 op/magic.t 30 2 6.67% 29-30
135 Failed 6/152 test scripts, 96.05% okay. 20/4359 subtests failed, 99.54% okay.
136
137Pipes always cause problems with MiNT, it's actually a surprise that
138most of the tests did work. I've got no idea why the "tell" test failed,
139this shouldn't mean too big a problem however.
140
141Most of the failures of lib/complex seem to be harmless, actually errors
142far right to the decimal point... Two failures seem to be serious:
143The sign of the results is reversed. I would say that this is due
144to minor bugs in the portable math lib that I compiled perl with.
145
146I haven't bothered very much to find the reason for the failures
147with op/magic.t and op/stat.t. Maybe you'll find it out.
148
149##########################################################################
150
151Another possible problem may arise from the implementation of the "pwd"
152command. It happened to add a carriage return and newline to its output
153no matter what the setting of $UNIXMODE is. This is quite annoying since many
154library modules for perl take the output of pwd, chop off the
155trailing newline character and then expect to see a valid path in
156that. But the carriage return (last but second character!) isn't
157chopped off. You can either try to patch all library modules (at
158the price of performance for the extra transformation) or you can
159use my version of pwd that doesn't suffer from this deficiency.
160
161The fixed implementation is in the mint subdirectory. Running
162"Configure" will attempt to build and install it if necessary
163(hints/mint.sh will do this work) but you can build and install it
164explicitly by:
165
166 cd mint
167 make install
168
169This is the fastest solution.
170
171Just in case you want to go the hard way: perl won't even build with a
172broken pwd! You will have to fix the library modules
173(ext/POSIX/POSIX.pm, lib/Cwd.pm, lib/pwd.pl) at last after building
174miniperl.
175
176A major nuisance of current MiNTLib versions is the implementation
177of system() which is far from being POSIX compliant. A real system()
178should fork and then exec /bin/sh with its argument as a command
179line to the shell. The MiNTLib system() however doesn't expect
180that every user has a POSIX shell in /bin/sh. It tries to work
181around the problem by forking and exec'ing the first token in its argument
182string. To get a little bit of compliance to POSIX system() it
183tries to handle at least redirection ("<" or ">") on its own
184behalf.
185
186This isn't a good idea since many programs expect that they can
187pass a command line to system() that exploits all features of a
188POSIX shell. If you use the MiNTLib version of system() with
189perl the Perl function system() will suffer from the same deficiencies.
190
191You will find a fixed version of system() in the mint subdirectory.
192You can easily insert this version into your system libc:
193
194 cd mint
195 make system.o
196 ar r /usr/lib/libc.a
197 ranlib /usr/lib/libc.a
198
199If you are suspicious you should either back up your libc before
200or extract the original system.o from your libc with
201"ar x /usr/lib/libc.a system.o". You can then backup the system.o
202module somewhere before you succeed.
203
204Anything missing? Yep, I've almost forgotten...
205No file in this distribution without a fine saying. Take this one:
206
207 "From a thief you should learn: (1) to work at night;
208 (2) if one cannot gain what one wants in one night to
209 try again the next night; (3) to love one's coworkers
210 just as thieves love each other; (4) to be willing to
211 risk one's life even for a little thing; (5) not to
212 attach too much value to things even though one has
213 risked one's life for them - just as a thief will resell
214 a stolen article for a fraction of its real value;
215 (6) to withstand all kinds of beatings and tortures
216 but to remain what you are; and (7) to believe your
217 work is worthwhile and not be willing to change it."
218
219 -- Rabbi Dov Baer, Maggid of Mezeritch
220
221OK, this was my motto while working on Perl for MiNT, especially rule (1)...
222
223Have fun with Perl!
224
225=head1 AUTHOR
226
227Guido Flohr
228
229 mailto:guido@FreeMiNT.de
230
README.mpeix
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see perlpod manpage) which is
3specially designed to be readable as is.
4
5=head1 NAME
6
7README.mpeix - Perl/iX for HP e3000 MPE
8
9=head1 SYNOPSIS
10
11 http://www.bixby.org/mark/perlix.html
12 http://jazz.external.hp.com/src/hp_freeware/perl/
13 Perl language for MPE
14 Last updated January 12, 2006 @ 2100 UTC
15
16
17=head1 NOTE
18
19This is a podified version of the above-mentioned web page,
20podified by Jarkko Hietaniemi 2001-Jan-01.
21
22=head1 Binary distribution from HP
23
24The simplest way to obtain Perl for the MPE/iX is to go either of
25these URLs and follow the instructions within.
26
27http://jazz.external.hp.com/src/hp_freeware/perl/
28http://www.bixby.org/mark/perlix.html
29
30Use which ever one is more recent.
31
32
33=head1 What's New in Perl for MPE/iX
34
35January 12, 2006
36
37=over 4
38
39=item *
40
41Updated for perl-5.8.8 and perl-5.9.3 by Ken Hirsch.
42
43Simplified the build process by using the MPEAUTOCONF
44functionality in Mark Klein's ld.
45
46If you build this from scratch, make sure you have a version
47of ld which supports it. In the shell, type
48
49 ld --help
50 and look for AUTOCONF or MPEAUTOCONF near the bottom
51
52 or do this:
53 ld --help 2>&1 | grep AUTOCONF
54
55If you see don't see AUTOCONF or MPEAUTOCONF, make sure you get a new
56version.
57
58You also do not have to use mpeix/relink after building, so the
59recommend sequence is:
60
61 ./Configure -de
62
63 # or ./Configure -de -Dusedevel
64 # if you're building a development version
65
66 make
67 make test
68 # if you run this in a job, do "make test_notty"
69
70 make install
71
72Be prepared for a wait. These take much longer on MPE/iX than on a Unix
73system, because of a slow forking, mostly. On a lightly-loaded HP3000
74Series 979 running MPE/iX 7.5:
75
76 Configure: 1 hour
77 make: 1 hour 15 minutes
78 make test 1 hour 45 minutes
79
80Various socket problems were fixed in mpeix.c.
81
82Mark Klein provided a fixed sigsetjmp (that works with dynamic
83libraries) in mpeix_setjmp.c
84
85=item *
86
87June 1, 2000
88
89=over 4
90
91=item *
92
93Rebuilt to be compatible with mod_perl. If you plan on using
94mod_perl, you MUST download and install this version of Perl/iX!
95
96=item *
97
98uselargefiles="undef": not available in MPE for POSIX files yet.
99
100=item *
101
102Now bundled with various add-on packages:
103
104=over 8
105
106=item *
107
108libnet (as seen on CPAN)
109
110=item *
111
112libwww-perl (LWP) which lets Perl programs behave like web browsers:
113
114 1. #!/PERL/PUB/perl
115 2. use LWP::Simple;
116 3. $doc = get('http://www.bixby.org/mark/perlix.html'); # reads the
117 web page into variable $doc
118
119(http://www.bixby.org/mark/perlix.html)
120
121=item *
122
123mod_perl (just the perl portion; the actual DSO will be released
124soon with Apache/iX 1.3.12 from bixby.org). This module allows you to
125write high performance persistent Perl CGI scripts and all sorts of
126cool things. (http://perl.apache.org/)
127
128and much much more hiding under /PERL/PUB/.cpan/
129
130=item *
131
132The CPAN module now works for automatic downloading and
133installing of add-on packages:
134
135 1. export FTP_PASSIVE=1
136 2. perl -MCPAN -e shell
137 3. Ignore any terminal I/O related complaints!
138
139(http://theoryx5.uwinnipeg.ca/CPAN/data/perl/CPAN.html)
140
141=back
142
143=back
144
145May 20, 2000
146
147=over 4
148
149=item *
150
151Updated to version 5.6.0. Builds straight out of the box on MPE/iX.
152
153=item *
154
155Perl's getpwnam() function which had regressed to being
156unimplemented on MPE is now implemented once again.
157
158=back
159
160September 17, 1999
161
162=over 4
163
164=item *
165
166Migrated from cccd.edu to bixby.org.
167
168=back
169
170=head1 Welcome to Perl/iX
171
172This is the official home page for the HP e3000 MPE/iX
173( http://www.hp.com/go/e3000 ) port of the Perl scripting
174language ( http://www.perl.com/ ) which gives you all of the power of C,
175awk, sed, and sh in a single language. Check here for the latest news,
176implemented functionality, known bugs, to-do list, etc. Status reports
177about major milestones will also be posted to the HP3000-L mailing list
178( http://www.lsoft.com/scripts/wl.exe?SL1=HP3000-L&H=RAVEN.UTC.EDU ) and
179its associated gatewayed newsgroup comp.sys.hp.mpe.
180
181I'm doing this port because I can't live without Perl on the Unix
182machines that I administer, and I want to have the same power
183available to me on MPE.
184
185Please send your comments, questions, and bug reports directly to me,
186Mark Bixby ( http://www.bixby.org/mark/ ). Or just post them to HP3000-L.
187
188The platform I'm using to do this port is an HP 3000 957RX running
189MPE/iX 6.0 and using the GNU gcc C compiler
190( http://jazz.external.hp.com/src/gnu/gnuframe.html ).
191
192The combined porting wisdom from all of my ports can be found in my
193MPE/iX Porting Guide (http://www.bixby.org/mark/porting.html).
194
195IMPORTANT NOTICE: Yes, I do work for the HP CSY R&D lab, but ALL of
196the software you download from bixby.org is my personal freeware that
197is NOT supported by HP.
198
199=head1 System Requirements for Perl/iX
200
201=over 4
202
203=item *
204
205MPE/iX 5.5 or later. This version of Perl/iX does NOT run on
206MPE/iX 5.0 or earlier, nor does it run on "classic" MPE/V machines.
207
208=item *
209
210If you wish to recompile Perl, you must install both GNUCORE and
211GNUGCC from jazz (http://jazz.external.hp.com/src/gnu/gnuframe.html).
212
213=item *
214
215Perl/iX will be happier on MPE/iX 5.5 if you install the MPEKX40B
216extended POSIX filename characters patch, but this is optional.
217
218=item *
219
220Patch LBCJXT6A is required on MPE/iX 5.5 machines in order to
221prevent Perl/iX from dying with an unresolved external reference
222to _getenv_libc.
223
224=item *
225
226If you will be compiling Perl/iX yourself, you will also need
227Syslog/iX ( http://www.bixby.org/mark/syslogix.html ) and the
228/BIND/PUB/include and /BIND/PUB/lib portions of BIND/iX
229( http://www.bixby.org/mark/bindix.html ).
230
231=back
232
233=head1 How to Obtain Perl/iX
234
235=over 4
236
237=item 1.
238
239Download Perl using either FTP.ARPA.SYS or some other client
240
241=item 2.
242
243Extract the installation script
244
245=item 3.
246
247Edit the installation script
248
249=item 4.
250
251Run the installation script
252
253=item 5.
254
255Convert your *.a system archive libraries to *.sl shared libraries
256
257=back
258
259Download Perl using FTP.ARPA.SYS from your HP 3000 (the preferred
260method).....
261
262 :HELLO MANAGER.SYS
263 :XEQ FTP.ARPA.SYS
264 open ftp.bixby.org
265 anonymous
266 your@email.address
267 bytestream
268 cd /pub/mpe
269 get perl-5.6.0-mpe.tar.Z /tmp/perl.tar.Z;disc=2147483647
270 exit
271
272.....Or download using some other generic web or ftp client (the alternate
273method)
274
275Download the following files (make sure that you use "binary mode" or
276whatever client feature that is 8-bit clean):
277
278=over 4
279
280=item *
281
282Perl from
283
284 http://www.bixby.org/ftp/pub/mpe/perl-5.6.0-mpe.tar.Z
285
286or
287
288 ftp://ftp.bixby.org/pub/mpe/perl-5.6.0-mpe.tar.Z
289
290=item *
291
292Upload those files to your HP 3000 in an 8-bit clean bytestream manner to:
293
294 /tmp/perl.tar.Z
295
296=item *
297
298Then extract the installation script (after both download methods)
299
300 :CHDIR /tmp
301 :XEQ TAR.HPBIN.SYS 'xvfopz /tmp/perl.tar.Z INSTALL'
302
303=item *
304
305Edit the installation script
306
307Examine the accounting structure creation commands and modify if
308necessary (adding additional capabilities, choosing a non-system
309volume set, etc).
310
311 :XEQ VI.HPBIN.SYS /tmp/INSTALL
312
313=item *
314
315Run the installation script.
316
317The accounting structure will be created and then all files will be
318extracted from the archive.
319
320 :XEQ SH.HPBIN.SYS /tmp/INSTALL
321
322=item *
323
324Convert your *.a system archive libraries to *.sl shared libraries
325
326You only have to do this ONCE on your MPE/iX 5.5 machine in order to
327convert /lib/lib*.a and /usr/lib/lib*.a libraries to their *.sl
328equivalents. This step should not be necessary on MPE/iX 6.0 or later
329machines because the 6.0 or later update process does it for you.
330
331 :XEQ SH.HPBIN.SYS /PERL/PUB/LIBSHP3K
332
333=back
334
335=head1 Perl/iX Distribution Contents Highlights
336
337=over 4
338
339=item README
340
341The file you're reading now.
342
343=item INSTALL
344
345Perl/iX Installation script.
346
347=item LIBSHP3K
348
349Script to convert *.a system archive libraries to *.sl shared libraries.
350
351=item PERL
352
353Perl NMPRG executable. A version-numbered backup copy also
354exists. You might wish to "ln -s /PERL/PUB/PERL /usr/local/bin/perl".
355
356=item .cpan/
357
358Much add-on source code downloaded with the CPAN module.
359
360=item lib/
361
362Perl libraries, both core and add-on.
363
364=item man/
365
366Perl man page documentation.
367
368=item public_html/feedback.cgi
369
370Sample feedback CGI form written in Perl.
371
372=item src/perl-5.6.0-mpe
373
374Source code.
375
376=back
377
378=head1 How to Compile Perl/iX
379
380=over 4
381
382=item 1.
383
384cd src/perl-5.6.0-mpe
385
386=item 2.
387
388Read the INSTALL file for the official instructions
389
390=item 3.
391
392./Configure -d
393
394=item 4.
395
396make
397
398=item 5.
399
400./mpeix/relink
401
402=item 6.
403
404make test (expect approximately 15 out of 11306 subtests to fail,
405mostly due to MPE not supporting hard links, UDP socket problems,
406and handling exit() return codes improperly)
407
408=item 7.
409
410make install
411
412=item 8.
413
414Optionally create symbolic links that point to the Perl
415executable, i.e. ln -s /PERL/PUB/PERL /usr/local/bin/perl
416
417=back
418
419The summary test results from "cd t; ./perl -I../lib harness":
420
421 Failed Test Status Wstat Total Fail Failed List of failed
422 ---------------------------------------------------------------------------
423 io/fs.t 29 8 27.59% 2-5, 7-9, 11
424 io/openpid.t 10 1 10.00% 7
425 lib/io_sock.t 14 1 7.14% 13
426 lib/io_udp.t 7 2 28.57% 3, 5
427 lib/posix.t 27 1 3.70% 12
428 op/lex_assign.t 187 1 0.53% 13
429 op/stat.t 58 1 1.72% 3
430 15 tests and 94 subtests skipped.
431 Failed 7/236 test scripts, 97.03% okay. 15/11306 subtests failed, 99.87% okay.
432
433=head1 Getting Started with Perl/iX
434
435Create your Perl script files with "#!/PERL/PUB/perl" (or an
436equivalent symbolic link) as the first line. Use the chmod command to
437make sure that your script has execute permission. Run your script!
438
439Be sure to take a look at the CPAN module list
440( http://www.cpan.org/CPAN.html ). A wide variety of free Perl software
441is available. You can automatically download these packages by using
442the CPAN module ( http://theoryx5.uwinnipeg.ca/CPAN/data/perl/CPAN.html ).
443
444=head1 MPE/iX Implementation Considerations
445
446There some minor functionality issues to be aware of when comparing
447Perl for Unix (Perl/UX) to Perl/iX:
448
449=over 4
450
451=item *
452
453MPE gcc/ld doesn't properly support linking NMPRG executables against
454NMXL dynamic libraries, so you must manually run mpeix/relink after
455each re-build of Perl.
456
457=item *
458
459Perl/iX File::Copy will use MPE's /bin/cp command to copy files by
460name in order to preserve file attributes like file code.
461
462=item *
463
464MPE (and thus Perl/iX) lacks support for setgrent(), endgrent(),
465setpwent(), endpwent().
466
467=item *
468
469MPE (and thus Perl/iX) lacks support for hard links.
470
471=item *
472
473MPE requires GETPRIVMODE() in order to bind() to ports less than 1024.
474Perl/iX will call GETPRIVMODE() automatically on your behalf if you
475attempt to bind() to these low-numbered ports. Note that the Perl/iX
476executable and the PERL account do not normally have CAP=PM, so if you
477will be bind()-ing to these privileged ports, you will manually need
478to add PM capability as appropriate.
479
480=item *
481
482MPE requires that you bind() to an IP address of zero. Perl/iX
483automatically replaces the IP address that you pass to bind() with
484a zero.
485
486=item *
487
488MPE requires GETPRIVMODE() in order to setuid(). There are too many
489calls to setuid() within Perl/iX, so I have not attempted an automatic
490GETPRIVMODE() solution similar to bind().
491
492=back
493
494=head1 Known Perl/iX Bugs Under Investigation
495
496None.
497
498=head1 Perl/iX To-Do List
499
500=over 4
501
502=item *
503
504Make setuid()/setgid() support work.
505
506=item *
507
508Make sure that fcntl() against a socket descriptor is redirected to sfcntl().
509
510=item *
511
512Add support for Berkeley DB once I've finished porting Berkeley DB.
513
514=item *
515
516Write an MPE XS extension library containing miscellaneous important
517MPE functions like GETPRIVMODE(), GETUSERMODE(), and sfcntl().
518
519=back
520
521=head1 Perl/iX Change History
522
523May 6, 1999
524
525=over 4
526
527=item *
528
529Patch LBCJXT6A is required on MPE/iX 5.5 machines in order to prevent
530Perl/iX from dying with an unresolved external reference to _getenv_libc.
531
532=back
533
534April 7, 1999
535
536=over 4
537
538=item *
539
540Updated to version 5.005_03.
541
542=item *
543
544The official source distribution once again compiles "straight out
545of the box" for MPE.
546
547=item *
548
549The current incarnation of the 5.5 POSIX filename extended
550characters patch is now MPEKX40B.
551
552=item *
553
554The LIBSHP3K *.a -> *.sl library conversion script is now included
555as /PERL/PUB/LIBSHP3K.
556
557=back
558
559November 20, 1998
560
561=over 4
562
563=item *
564
565Updated to version 5.005_02.
566
567=item *
568
569Fixed a DynaLoader bug that was unable to load symbols from relative
570path name libraries.
571
572=item *
573
574Fixed a .xs compilation bug where the mpeixish.sh include file wasn't
575being installed into the proper directory.
576
577=item *
578
579All bugfixes will be submitted back to the official Perl developers.
580
581=item *
582
583The current incarnation of the POSIX filename extended characters
584patch is now MPEKXJ3A.
585
586=back
587
588August 14, 1998
589
590=over 4
591
592=item *
593
594The previous POSIX filename extended characters patch MPEKX44C has
595been superseded by MPEKXB5A.
596
597=back
598
599August 7, 1998
600
601=over 4
602
603=item *
604
605The previous POSIX filename extended characters patch MPEKX76A has
606been superseded by MPEKX44C.
607
608=back
609
610July 28, 1998
611
612=over 4
613
614=item *
615
616Updated to version 5.005_01.
617
618=back
619
620July 23, 1998
621
622=over 4
623
624=item *
625
626Updated to version 5.005 (production release). The public
627freeware sources are now 100% MPE-ready "straight out of the box".
628
629=back
630
631July 17, 1998
632
633=over 4
634
635=item *
636
637Updated to version 5.005b1 (public beta release). The public
638freeware sources are now 99.9% MPE-ready. By installing and
639testing this beta on your own HP3000, you will be helping to
640insure that the final release of 5.005 will be 100% MPE-ready and
641100% bug free.
642
643=item *
644
645My MPE binary release is now extracted using my standard INSTALL script.
646
647=back
648
649July 15, 1998
650
651=over 4
652
653=item *
654
655Changed startperl to #!/PERL/PUB/perl so that Perl will recognize
656scripts more easily and efficiently.
657
658=back
659
660July 8, 1998
661
662=over 4
663
664=item *
665
666Updated to version 5.004_70 (internal developer release) which is now
667MPE-ready. The next public freeware release of Perl should compile
668"straight out of the box" on MPE. Note that this version of Perl/iX
669was strictly internal to me and never publicly released. Note that
670[21]BIND/iX is now required (well, the include files and libbind.a) if
671you wish to compile Perl/iX.
672
673=back
674
675November 6, 1997
676
677=over 4
678
679=item *
680
681Updated to version 5.004_04. No changes in MPE-specific functionality.
682
683=back
684
685October 16, 1997
686
687=over 4
688
689=item *
690
691Added Demos section to the Perl/iX home page so you can see some
692sample Perl applications running on my 3000.
693
694=back
695
696October 3, 1997
697
698=over 4
699
700=item *
701
702Added System Requirements section to the Perl/iX home page just so the
703prerequisites stand out more. Various other home page tweaks.
704
705=back
706
707October 2, 1997
708
709=over 4
710
711=item *
712
713Initial public release.
714
715=back
716
717September 1997
718
719=over 4
720
721=item *
722
723Porting begins.
724
725=back
726
727=head1 AUTHOR
728
729Mark Bixby, http://www.bixby.org/mark/
730
731
README.netware
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see pod/perlpod.pod) which is
3specifically designed to be readable as is.
4
5=head1 NAME
6
7perlnetware - Perl for NetWare
8
9=head1 DESCRIPTION
10
11This file gives instructions for building Perl 5.7 and above, and also
12Perl modules for NetWare. Before you start, you may want to read the
13README file found in the top level directory into which the Perl source
14code distribution was extracted. Make sure you read and understand
15the terms under which the software is being distributed.
16
17=head1 BUILD
18
19This section describes the steps to be performed to build a Perl NLM
20and other associated NLMs.
21
22=head2 Tools & SDK
23
24The build requires CodeWarrior compiler and linker. In addition,
25the "NetWare SDK", "NLM & NetWare Libraries for C" and
26"NetWare Server Protocol Libraries for C", all available at
27L<http://developer.novell.com/ndk/>, are also required.
28Microsoft Visual C++ version 4.2 or later is also required.
29
30=head2 Setup
31
32The build process is dependent on the location of the NetWare SDK.
33Once the Tools & SDK are installed, the build environment has to
34be setup. The following batch files setup the environment.
35
36=over 4
37
38=item SetNWBld.bat
39
40The Execution of this file takes 2 parameters as input. The first
41being the NetWare SDK path, second being the path for CodeWarrior
42Compiler & tools. Execution of this file sets these paths and also
43sets the build type to Release by default.
44
45=item Buildtype.bat
46
47This is used to set the build type to debug or release. Change the
48build type only after executing SetNWBld.bat
49
50=item *
51
52Example:
53 1. Typing "buildtype d on" at the command prompt causes the buildtype
54 to be set to Debug type with D2 flag set.
55 2. Typing "buildtype d off" or "buildtype d" at the command prompt causes
56 the buildtype to be set to Debug type with D1 flag set.
57 2. Typing "buildtype r" at the command prompt sets it to Release Build type.
58
59=back
60
61=head2 Make
62
63The make process runs only under WinNT shell. The NetWare makefile is
64located under the NetWare folder. This makes use of miniperl.exe to
65run some of the Perl scripts. To create miniperl.exe, first set the
66required paths for Visual c++ compilier (specify vcvars32 location) at
67the command prompt. Then run nmake from win32 folder through WinNT
68command prompt. The build process can be stopped after miniperl.exe
69is created. Then run nmake from NetWare folder through WinNT command
70prompt.
71
72Currently the following two build types are tested on NetWare:
73
74=over 4
75
76=item *
77
78USE_MULTI, USE_ITHREADS & USE_IMP_SYS defined
79
80=item *
81
82USE_MULTI & USE_IMP_SYS defined and USE_ITHREADS not defined
83
84=back
85
86=head2 Interpreter
87
88Once miniperl.exe creation is over, run nmake from the NetWare folder.
89This will build the Perl interpreter for NetWare as I<perl.nlm>.
90This is copied under the I<Release> folder if you are doing
91a release build, else will be copied under I<Debug> folder for debug builds.
92
93=head2 Extensions
94
95The make process also creates the Perl extensions as I<<Extension>.nlm>
96
97=head1 INSTALL
98
99To install NetWare Perl onto a NetWare server, first map the Sys
100volume of a NetWare server to I<i:>. This is because the makefile by
101default sets the drive letter to I<i:>. Type I<nmake nwinstall> from
102NetWare folder on a WinNT command prompt. This will copy the binaries
103and module files onto the NetWare server under I<sys:\Perl>
104folder. The Perl interpreter, I<perl.nlm>, is copied under
105I<sys:\perl\system> folder. Copy this to I<sys:\system> folder.
106
107Example: At the command prompt Type "nmake nwinstall".
108 This will install NetWare Perl on the NetWare Server.
109 Similiarly if you type "nmake install",
110 This will cause the binaries to be installed on the local machine.
111 (Typically under the c:\perl folder)
112
113=head1 BUILD NEW EXTENSIONS
114
115To build extensions other than standard extensions, NetWare Perl has
116to be installed on Windows along with Windows Perl. The Perl for
117Windows can be either downloaded from the CPAN site and built using
118the sources, or the binaries can be directly downloaded from the
119ActiveState site. Installation can be done by invoking I<nmake
120install> from the NetWare folder on a WinNT command prompt after
121building NetWare Perl by following steps given above. This will copy
122all the *.pm files and other required files. Documentation files are
123not copied. Thus one must first install Windows Perl, Then install
124NetWare Perl.
125
126Once this is done, do the following to build any extension:
127
128=over 4
129
130=item *
131
132Change to the extension directory where its source files are present.
133
134=item *
135
136Run the following command at the command prompt:
137
138 perl -II<path to NetWare lib dir> -II<path to lib> Makefile.pl
139
140Example:
141
142 perl -Ic:/perl/5.6.1/lib/NetWare-x86-multi-thread -Ic:\perl\5.6.1\lib MakeFile.pl
143
144or
145
146 perl -Ic:/perl/5.8.0/lib/NetWare-x86-multi-thread -Ic:\perl\5.8.0\lib MakeFile.pl
147
148=item *
149
150nmake
151
152=item *
153
154nmake install
155
156Install will copy the files into the Windows machine where NetWare
157Perl is installed and these files may have to be copied to the NetWare
158server manually. Alternatively, pass I<INSTALLSITELIB=i:\perl\lib> as
159an input to makefile.pl above. Here I<i:> is the mapped drive to the
160sys: volume of the server where Perl on NetWare is installed. Now
161typing I<nmake install>, will copy the files onto the NetWare server.
162
163Example: You can execute the following on the command prompt.
164
165 perl -Ic:/perl/5.6.1/lib/NetWare-x86-multi-thread -Ic:\perl\5.6.1\lib MakeFile.pl
166 INSTALLSITELIB=i:\perl\lib
167
168or
169
170 perl -Ic:/perl/5.8.0/lib/NetWare-x86-multi-thread -Ic:\perl\5.8.0\lib MakeFile.pl
171 INSTALLSITELIB=i:\perl\lib
172
173=item *
174
175Note: Some modules downloaded from CPAN may require NetWare related
176API in order to build on NetWare. Other modules may however build
177smoothly with or without minor changes depending on the type of
178module.
179
180=back
181
182=head1 ACKNOWLEDGEMENTS
183
184The makefile for Win32 is used as a reference to create the makefile
185for NetWare. Also, the make process for NetWare port uses
186miniperl.exe to run scripts during the make and installation process.
187
188=head1 AUTHORS
189
190Anantha Kesari H Y (hyanantha@novell.com)
191Aditya C (caditya@novell.com)
192
193=head1 DATE
194
195=over 4
196
197=item *
198
199Created - 18 Jan 2001
200
201=item *
202
203Modified - 25 June 2001
204
205=item *
206
207Modified - 13 July 2001
208
209=item *
210
211Modified - 28 May 2002
212
213=back
214
README.openbsd
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see pod/perlpod.pod) which is
3specifically designed to be readable as is.
4
5=head1 NAME
6
7README.openbsd - Perl version 5 on OpenBSD systems
8
9=head1 DESCRIPTION
10
11This document describes various features of OpenBSD that will affect how Perl
12version 5 (hereafter just Perl) is compiled and/or runs.
13
14=head2 OpenBSD core dumps from getprotobyname_r and getservbyname_r with ithreads
15
16When Perl is configured to use ithreads, it will use re-entrant library calls
17in preference to non-re-entrant versions. There is an incompatability in
18OpenBSD's C<getprotobyname_r> and C<getservbyname_r> function in versions 3.7
19and later that will cause a SEGV when called without doing a C<bzero> on
20their return structs prior to calling these functions. Current Perl's
21should handle this problem correctly. Older threaded Perls (5.8.6 or earlier)
22will run into this problem. If you want to run a threaded Perl on OpenBSD
233.7 or higher, you will need to upgrade to at least Perl 5.8.7.
24
25=head1 AUTHOR
26
27Steve Peters <steve@fisharerojo.org>
28
29Please report any errors, updates, or suggestions to F<perlbug@perl.org>.
30
31
README.os2
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see perlpod manpage) which is
3specially designed to be readable as is.
4
5=head1 NAME
6
7perlos2 - Perl under OS/2, DOS, Win0.3*, Win0.95 and WinNT.
8
9=head1 SYNOPSIS
10
11One can read this document in the following formats:
12
13 man perlos2
14 view perl perlos2
15 explorer perlos2.html
16 info perlos2
17
18to list some (not all may be available simultaneously), or it may
19be read I<as is>: either as F<README.os2>, or F<pod/perlos2.pod>.
20
21To read the F<.INF> version of documentation (B<very> recommended)
22outside of OS/2, one needs an IBM's reader (may be available on IBM
23ftp sites (?) (URL anyone?)) or shipped with PC DOS 7.0 and IBM's
24Visual Age C++ 3.5.
25
26A copy of a Win* viewer is contained in the "Just add OS/2 Warp" package
27
28 ftp://ftp.software.ibm.com/ps/products/os2/tools/jaow/jaow.zip
29
30in F<?:\JUST_ADD\view.exe>. This gives one an access to EMX's
31F<.INF> docs as well (text form is available in F</emx/doc> in
32EMX's distribution). There is also a different viewer named xview.
33
34Note that if you have F<lynx.exe> or F<netscape.exe> installed, you can follow WWW links
35from this document in F<.INF> format. If you have EMX docs installed
36correctly, you can follow library links (you need to have C<view emxbook>
37working by setting C<EMXBOOK> environment variable as it is described
38in EMX docs).
39
40=cut
41
42Contents (This may be a little bit obsolete)
43
44 perlos2 - Perl under OS/2, DOS, Win0.3*, Win0.95 and WinNT.
45
46 NAME
47 SYNOPSIS
48 DESCRIPTION
49 - Target
50 - Other OSes
51 - Prerequisites
52 - Starting Perl programs under OS/2 (and DOS and...)
53 - Starting OS/2 (and DOS) programs under Perl
54 Frequently asked questions
55 - "It does not work"
56 - I cannot run external programs
57 - I cannot embed perl into my program, or use perl.dll from my
58 - `` and pipe-open do not work under DOS.
59 - Cannot start find.exe "pattern" file
60 INSTALLATION
61 - Automatic binary installation
62 - Manual binary installation
63 - Warning
64 Accessing documentation
65 - OS/2 .INF file
66 - Plain text
67 - Manpages
68 - HTML
69 - GNU info files
70 - PDF files
71 - LaTeX docs
72 BUILD
73 - The short story
74 - Prerequisites
75 - Getting perl source
76 - Application of the patches
77 - Hand-editing
78 - Making
79 - Testing
80 - Installing the built perl
81 - a.out-style build
82 Build FAQ
83 - Some / became \ in pdksh.
84 - 'errno' - unresolved external
85 - Problems with tr or sed
86 - Some problem (forget which ;-)
87 - Library ... not found
88 - Segfault in make
89 - op/sprintf test failure
90 Specific (mis)features of OS/2 port
91 - setpriority, getpriority
92 - system()
93 - extproc on the first line
94 - Additional modules:
95 - Prebuilt methods:
96 - Prebuilt variables:
97 - Misfeatures
98 - Modifications
99 - Identifying DLLs
100 - Centralized management of resources
101 Perl flavors
102 - perl.exe
103 - perl_.exe
104 - perl__.exe
105 - perl___.exe
106 - Why strange names?
107 - Why dynamic linking?
108 - Why chimera build?
109 ENVIRONMENT
110 - PERLLIB_PREFIX
111 - PERL_BADLANG
112 - PERL_BADFREE
113 - PERL_SH_DIR
114 - USE_PERL_FLOCK
115 - TMP or TEMP
116 Evolution
117 - Text-mode filehandles
118 - Priorities
119 - DLL name mangling: pre 5.6.2
120 - DLL name mangling: 5.6.2 and beyond
121 - DLL forwarder generation
122 - Threading
123 - Calls to external programs
124 - Memory allocation
125 - Threads
126 BUGS
127 AUTHOR
128 SEE ALSO
129
130=head1 DESCRIPTION
131
132=head2 Target
133
134The target is to make OS/2 one of the best supported platform for
135using/building/developing Perl and I<Perl applications>, as well as
136make Perl the best language to use under OS/2. The secondary target is
137to try to make this work under DOS and Win* as well (but not B<too> hard).
138
139The current state is quite close to this target. Known limitations:
140
141=over 5
142
143=item *
144
145Some *nix programs use fork() a lot; with the mostly useful flavors of
146perl for OS/2 (there are several built simultaneously) this is
147supported; but some flavors do not support this (e.g., when Perl is
148called from inside REXX). Using fork() after
149I<use>ing dynamically loading extensions would not work with I<very> old
150versions of EMX.
151
152=item *
153
154You need a separate perl executable F<perl__.exe> (see L<perl__.exe>)
155if you want to use PM code in your application (as Perl/Tk or OpenGL
156Perl modules do) without having a text-mode window present.
157
158While using the standard F<perl.exe> from a text-mode window is possible
159too, I have seen cases when this causes degradation of the system stability.
160Using F<perl__.exe> avoids such a degradation.
161
162=item *
163
164There is no simple way to access WPS objects. The only way I know
165is via C<OS2::REXX> and C<SOM> extensions (see L<OS2::REXX>, L<Som>).
166However, we do not have access to
167convenience methods of Object-REXX. (Is it possible at all? I know
168of no Object-REXX API.) The C<SOM> extension (currently in alpha-text)
169may eventually remove this shortcoming; however, due to the fact that
170DII is not supported by the C<SOM> module, using C<SOM> is not as
171convenient as one would like it.
172
173=back
174
175Please keep this list up-to-date by informing me about other items.
176
177=head2 Other OSes
178
179Since OS/2 port of perl uses a remarkable EMX environment, it can
180run (and build extensions, and - possibly - be built itself) under any
181environment which can run EMX. The current list is DOS,
182DOS-inside-OS/2, Win0.3*, Win0.95 and WinNT. Out of many perl flavors,
183only one works, see L<"perl_.exe">.
184
185Note that not all features of Perl are available under these
186environments. This depends on the features the I<extender> - most
187probably RSX - decided to implement.
188
189Cf. L<Prerequisites>.
190
191=head2 Prerequisites
192
193=over 6
194
195=item EMX
196
197EMX runtime is required (may be substituted by RSX). Note that
198it is possible to make F<perl_.exe> to run under DOS without any
199external support by binding F<emx.exe>/F<rsx.exe> to it, see L<emxbind>. Note
200that under DOS for best results one should use RSX runtime, which
201has much more functions working (like C<fork>, C<popen> and so on). In
202fact RSX is required if there is no VCPI present. Note the
203RSX requires DPMI. Many implementations of DPMI are known to be very
204buggy, beware!
205
206Only the latest runtime is supported, currently C<0.9d fix 03>. Perl may run
207under earlier versions of EMX, but this is not tested.
208
209One can get different parts of EMX from, say
210
211 http://www.leo.org/pub/comp/os/os2/leo/gnu/emx+gcc/
212 http://powerusersbbs.com/pub/os2/dev/ [EMX+GCC Development]
213 http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/
214
215The runtime component should have the name F<emxrt.zip>.
216
217B<NOTE>. When using F<emx.exe>/F<rsx.exe>, it is enough to have them on your path. One
218does not need to specify them explicitly (though this
219
220 emx perl_.exe -de 0
221
222will work as well.)
223
224=item RSX
225
226To run Perl on DPMI platforms one needs RSX runtime. This is
227needed under DOS-inside-OS/2, Win0.3*, Win0.95 and WinNT (see
228L<"Other OSes">). RSX would not work with VCPI
229only, as EMX would, it requires DMPI.
230
231Having RSX and the latest F<sh.exe> one gets a fully functional
232B<*nix>-ish environment under DOS, say, C<fork>, C<``> and
233pipe-C<open> work. In fact, MakeMaker works (for static build), so one
234can have Perl development environment under DOS.
235
236One can get RSX from, say
237
238 ftp://ftp.cdrom.com/pub/os2/emx09c/contrib
239 ftp://ftp.uni-bielefeld.de/pub/systems/msdos/misc
240 ftp://ftp.leo.org/pub/comp/os/os2/leo/devtools/emx+gcc/contrib
241
242Contact the author on C<rainer@mathematik.uni-bielefeld.de>.
243
244The latest F<sh.exe> with DOS hooks is available in
245
246 http://www.ilyaz.org/software/os2/
247
248as F<sh_dos.zip> or under similar names starting with C<sh>, C<pdksh> etc.
249
250=item HPFS
251
252Perl does not care about file systems, but the perl library contains
253many files with long names, so to install it intact one needs a file
254system which supports long file names.
255
256Note that if you do not plan to build the perl itself, it may be
257possible to fool EMX to truncate file names. This is not supported,
258read EMX docs to see how to do it.
259
260=item pdksh
261
262To start external programs with complicated command lines (like with
263pipes in between, and/or quoting of arguments), Perl uses an external
264shell. With EMX port such shell should be named F<sh.exe>, and located
265either in the wired-in-during-compile locations (usually F<F:/bin>),
266or in configurable location (see L<"PERL_SH_DIR">).
267
268For best results use EMX pdksh. The standard binary (5.2.14 or later) runs
269under DOS (with L<RSX>) as well, see
270
271 http://www.ilyaz.org/software/os2/
272
273=back
274
275=head2 Starting Perl programs under OS/2 (and DOS and...)
276
277Start your Perl program F<foo.pl> with arguments C<arg1 arg2 arg3> the
278same way as on any other platform, by
279
280 perl foo.pl arg1 arg2 arg3
281
282If you want to specify perl options C<-my_opts> to the perl itself (as
283opposed to your program), use
284
285 perl -my_opts foo.pl arg1 arg2 arg3
286
287Alternately, if you use OS/2-ish shell, like CMD or 4os2, put
288the following at the start of your perl script:
289
290 extproc perl -S -my_opts
291
292rename your program to F<foo.cmd>, and start it by typing
293
294 foo arg1 arg2 arg3
295
296Note that because of stupid OS/2 limitations the full path of the perl
297script is not available when you use C<extproc>, thus you are forced to
298use C<-S> perl switch, and your script should be on the C<PATH>. As a plus
299side, if you know a full path to your script, you may still start it
300with
301
302 perl ../../blah/foo.cmd arg1 arg2 arg3
303
304(note that the argument C<-my_opts> is taken care of by the C<extproc> line
305in your script, see L<C<extproc> on the first line>).
306
307To understand what the above I<magic> does, read perl docs about C<-S>
308switch - see L<perlrun>, and cmdref about C<extproc>:
309
310 view perl perlrun
311 man perlrun
312 view cmdref extproc
313 help extproc
314
315or whatever method you prefer.
316
317There are also endless possibilities to use I<executable extensions> of
3184os2, I<associations> of WPS and so on... However, if you use
319*nixish shell (like F<sh.exe> supplied in the binary distribution),
320you need to follow the syntax specified in L<perlrun/"Switches">.
321
322Note that B<-S> switch supports scripts with additional extensions
323F<.cmd>, F<.btm>, F<.bat>, F<.pl> as well.
324
325=head2 Starting OS/2 (and DOS) programs under Perl
326
327This is what system() (see L<perlfunc/system>), C<``> (see
328L<perlop/"I/O Operators">), and I<open pipe> (see L<perlfunc/open>)
329are for. (Avoid exec() (see L<perlfunc/exec>) unless you know what you
330do).
331
332Note however that to use some of these operators you need to have a
333sh-syntax shell installed (see L<"Pdksh">,
334L<"Frequently asked questions">), and perl should be able to find it
335(see L<"PERL_SH_DIR">).
336
337The cases when the shell is used are:
338
339=over
340
341=item 1
342
343One-argument system() (see L<perlfunc/system>), exec() (see L<perlfunc/exec>)
344with redirection or shell meta-characters;
345
346=item 2
347
348Pipe-open (see L<perlfunc/open>) with the command which contains redirection
349or shell meta-characters;
350
351=item 3
352
353Backticks C<``> (see L<perlop/"I/O Operators">) with the command which contains
354redirection or shell meta-characters;
355
356=item 4
357
358If the executable called by system()/exec()/pipe-open()/C<``> is a script
359with the "magic" C<#!> line or C<extproc> line which specifies shell;
360
361=item 5
362
363If the executable called by system()/exec()/pipe-open()/C<``> is a script
364without "magic" line, and C<$ENV{EXECSHELL}> is set to shell;
365
366=item 6
367
368If the executable called by system()/exec()/pipe-open()/C<``> is not
369found (is not this remark obsolete?);
370
371=item 7
372
373For globbing (see L<perlfunc/glob>, L<perlop/"I/O Operators">)
374(obsolete? Perl uses builtin globbing nowadays...).
375
376=back
377
378For the sake of speed for a common case, in the above algorithms
379backslashes in the command name are not considered as shell metacharacters.
380
381Perl starts scripts which begin with cookies
382C<extproc> or C<#!> directly, without an intervention of shell. Perl uses the
383same algorithm to find the executable as F<pdksh>: if the path
384on C<#!> line does not work, and contains C</>, then the directory
385part of the executable is ignored, and the executable
386is searched in F<.> and on C<PATH>. To find arguments for these scripts
387Perl uses a different algorithm than F<pdksh>: up to 3 arguments are
388recognized, and trailing whitespace is stripped.
389
390If a script
391does not contain such a cooky, then to avoid calling F<sh.exe>, Perl uses
392the same algorithm as F<pdksh>: if C<$ENV{EXECSHELL}> is set, the
393script is given as the first argument to this command, if not set, then
394C<$ENV{COMSPEC} /c> is used (or a hardwired guess if C<$ENV{COMSPEC}> is
395not set).
396
397When starting scripts directly, Perl uses exactly the same algorithm as for
398the search of script given by B<-S> command-line option: it will look in
399the current directory, then on components of C<$ENV{PATH}> using the
400following order of appended extensions: no extension, F<.cmd>, F<.btm>,
401F<.bat>, F<.pl>.
402
403Note that Perl will start to look for scripts only if OS/2 cannot start the
404specified application, thus C<system 'blah'> will not look for a script if
405there is an executable file F<blah.exe> I<anywhere> on C<PATH>. In
406other words, C<PATH> is essentially searched twice: once by the OS for
407an executable, then by Perl for scripts.
408
409Note also that executable files on OS/2 can have an arbitrary extension,
410but F<.exe> will be automatically appended if no dot is present in the name.
411The workaround is as simple as that: since F<blah.> and F<blah> denote the
412same file (at list on FAT and HPFS file systems), to start an executable residing in file F<n:/bin/blah> (no
413extension) give an argument C<n:/bin/blah.> (dot appended) to system().
414
415Perl will start PM programs from VIO (=text-mode) Perl process in a
416separate PM session;
417the opposite is not true: when you start a non-PM program from a PM
418Perl process, Perl would not run it in a separate session. If a separate
419session is desired, either ensure
420that shell will be used, as in C<system 'cmd /c myprog'>, or start it using
421optional arguments to system() documented in C<OS2::Process> module. This
422is considered to be a feature.
423
424=head1 Frequently asked questions
425
426=head2 "It does not work"
427
428Perl binary distributions come with a F<testperl.cmd> script which tries
429to detect common problems with misconfigured installations. There is a
430pretty large chance it will discover which step of the installation you
431managed to goof. C<;-)>
432
433=head2 I cannot run external programs
434
435=over 4
436
437=item *
438
439Did you run your programs with C<-w> switch? See
440L<Starting OS/2 (and DOS) programs under Perl>.
441
442=item *
443
444Do you try to run I<internal> shell commands, like C<`copy a b`>
445(internal for F<cmd.exe>), or C<`glob a*b`> (internal for ksh)? You
446need to specify your shell explicitly, like C<`cmd /c copy a b`>,
447since Perl cannot deduce which commands are internal to your shell.
448
449=back
450
451=head2 I cannot embed perl into my program, or use F<perl.dll> from my
452program.
453
454=over 4
455
456=item Is your program EMX-compiled with C<-Zmt -Zcrtdll>?
457
458Well, nowadays Perl DLL should be usable from a differently compiled
459program too... If you can run Perl code from REXX scripts (see
460L<OS2::REXX>), then there are some other aspect of interaction which
461are overlooked by the current hackish code to support
462differently-compiled principal programs.
463
464If everything else fails, you need to build a stand-alone DLL for
465perl. Contact me, I did it once. Sockets would not work, as a lot of
466other stuff.
467
468=item Did you use L<ExtUtils::Embed>?
469
470Some time ago I had reports it does not work. Nowadays it is checked
471in the Perl test suite, so grep F<./t> subdirectory of the build tree
472(as well as F<*.t> files in the F<./lib> subdirectory) to find how it
473should be done "correctly".
474
475=back
476
477=head2 C<``> and pipe-C<open> do not work under DOS.
478
479This may a variant of just L<"I cannot run external programs">, or a
480deeper problem. Basically: you I<need> RSX (see L<"Prerequisites">)
481for these commands to work, and you may need a port of F<sh.exe> which
482understands command arguments. One of such ports is listed in
483L<"Prerequisites"> under RSX. Do not forget to set variable
484C<L<"PERL_SH_DIR">> as well.
485
486DPMI is required for RSX.
487
488=head2 Cannot start C<find.exe "pattern" file>
489
490The whole idea of the "standard C API to start applications" is that
491the forms C<foo> and C<"foo"> of program arguments are completely
492interchangable. F<find> breaks this paradigm;
493
494 find "pattern" file
495 find pattern file
496
497are not equivalent; F<find> cannot be started directly using the above
498API. One needs a way to surround the doublequotes in some other
499quoting construction, necessarily having an extra non-Unixish shell in
500between.
501
502Use one of
503
504 system 'cmd', '/c', 'find "pattern" file';
505 `cmd /c 'find "pattern" file'`
506
507This would start F<find.exe> via F<cmd.exe> via C<sh.exe> via
508C<perl.exe>, but this is a price to pay if you want to use
509non-conforming program.
510
511=head1 INSTALLATION
512
513=head2 Automatic binary installation
514
515The most convenient way of installing a binary distribution of perl is via perl installer
516F<install.exe>. Just follow the instructions, and 99% of the
517installation blues would go away.
518
519Note however, that you need to have F<unzip.exe> on your path, and
520EMX environment I<running>. The latter means that if you just
521installed EMX, and made all the needed changes to F<Config.sys>,
522you may need to reboot in between. Check EMX runtime by running
523
524 emxrev
525
526Binary installer also creates a folder on your desktop with some useful
527objects. If you need to change some aspects of the work of the binary
528installer, feel free to edit the file F<Perl.pkg>. This may be useful
529e.g., if you need to run the installer many times and do not want to
530make many interactive changes in the GUI.
531
532B<Things not taken care of by automatic binary installation:>
533
534=over 15
535
536=item C<PERL_BADLANG>
537
538may be needed if you change your codepage I<after> perl installation,
539and the new value is not supported by EMX. See L<"PERL_BADLANG">.
540
541=item C<PERL_BADFREE>
542
543see L<"PERL_BADFREE">.
544
545=item F<Config.pm>
546
547This file resides somewhere deep in the location you installed your
548perl library, find it out by
549
550 perl -MConfig -le "print $INC{'Config.pm'}"
551
552While most important values in this file I<are> updated by the binary
553installer, some of them may need to be hand-edited. I know no such
554data, please keep me informed if you find one. Moreover, manual
555changes to the installed version may need to be accompanied by an edit
556of this file.
557
558=back
559
560B<NOTE>. Because of a typo the binary installer of 5.00305
561would install a variable C<PERL_SHPATH> into F<Config.sys>. Please
562remove this variable and put C<L<PERL_SH_DIR>> instead.
563
564=head2 Manual binary installation
565
566As of version 5.00305, OS/2 perl binary distribution comes split
567into 11 components. Unfortunately, to enable configurable binary
568installation, the file paths in the zip files are not absolute, but
569relative to some directory.
570
571Note that the extraction with the stored paths is still necessary
572(default with unzip, specify C<-d> to pkunzip). However, you
573need to know where to extract the files. You need also to manually
574change entries in F<Config.sys> to reflect where did you put the
575files. Note that if you have some primitive unzipper (like
576C<pkunzip>), you may get a lot of warnings/errors during
577unzipping. Upgrade to C<(w)unzip>.
578
579Below is the sample of what to do to reproduce the configuration on my
580machine. In F<VIEW.EXE> you can press C<Ctrl-Insert> now, and
581cut-and-paste from the resulting file - created in the directory you
582started F<VIEW.EXE> from.
583
584For each component, we mention environment variables related to each
585installation directory. Either choose directories to match your
586values of the variables, or create/append-to variables to take into
587account the directories.
588
589=over 3
590
591=item Perl VIO and PM executables (dynamically linked)
592
593 unzip perl_exc.zip *.exe *.ico -d f:/emx.add/bin
594 unzip perl_exc.zip *.dll -d f:/emx.add/dll
595
596(have the directories with C<*.exe> on PATH, and C<*.dll> on
597LIBPATH);
598
599=item Perl_ VIO executable (statically linked)
600
601 unzip perl_aou.zip -d f:/emx.add/bin
602
603(have the directory on PATH);
604
605=item Executables for Perl utilities
606
607 unzip perl_utl.zip -d f:/emx.add/bin
608
609(have the directory on PATH);
610
611=item Main Perl library
612
613 unzip perl_mlb.zip -d f:/perllib/lib
614
615If this directory is exactly the same as the prefix which was compiled
616into F<perl.exe>, you do not need to change
617anything. However, for perl to find the library if you use a different
618path, you need to
619C<set PERLLIB_PREFIX> in F<Config.sys>, see L<"PERLLIB_PREFIX">.
620
621=item Additional Perl modules
622
623 unzip perl_ste.zip -d f:/perllib/lib/site_perl/5.8.8/
624
625Same remark as above applies. Additionally, if this directory is not
626one of directories on @INC (and @INC is influenced by C<PERLLIB_PREFIX>), you
627need to put this
628directory and subdirectory F<./os2> in C<PERLLIB> or C<PERL5LIB>
629variable. Do not use C<PERL5LIB> unless you have it set already. See
630L<perl/"ENVIRONMENT">.
631
632B<[Check whether this extraction directory is still applicable with
633the new directory structure layout!]>
634
635=item Tools to compile Perl modules
636
637 unzip perl_blb.zip -d f:/perllib/lib
638
639Same remark as for F<perl_ste.zip>.
640
641=item Manpages for Perl and utilities
642
643 unzip perl_man.zip -d f:/perllib/man
644
645This directory should better be on C<MANPATH>. You need to have a
646working F<man> to access these files.
647
648=item Manpages for Perl modules
649
650 unzip perl_mam.zip -d f:/perllib/man
651
652This directory should better be on C<MANPATH>. You need to have a
653working man to access these files.
654
655=item Source for Perl documentation
656
657 unzip perl_pod.zip -d f:/perllib/lib
658
659This is used by the C<perldoc> program (see L<perldoc>), and may be used to
660generate HTML documentation usable by WWW browsers, and
661documentation in zillions of other formats: C<info>, C<LaTeX>,
662C<Acrobat>, C<FrameMaker> and so on. [Use programs such as
663F<pod2latex> etc.]
664
665=item Perl manual in F<.INF> format
666
667 unzip perl_inf.zip -d d:/os2/book
668
669This directory should better be on C<BOOKSHELF>.
670
671=item Pdksh
672
673 unzip perl_sh.zip -d f:/bin
674
675This is used by perl to run external commands which explicitly
676require shell, like the commands using I<redirection> and I<shell
677metacharacters>. It is also used instead of explicit F</bin/sh>.
678
679Set C<PERL_SH_DIR> (see L<"PERL_SH_DIR">) if you move F<sh.exe> from
680the above location.
681
682B<Note.> It may be possible to use some other sh-compatible shell (untested).
683
684=back
685
686After you installed the components you needed and updated the
687F<Config.sys> correspondingly, you need to hand-edit
688F<Config.pm>. This file resides somewhere deep in the location you
689installed your perl library, find it out by
690
691 perl -MConfig -le "print $INC{'Config.pm'}"
692
693You need to correct all the entries which look like file paths (they
694currently start with C<f:/>).
695
696=head2 B<Warning>
697
698The automatic and manual perl installation leave precompiled paths
699inside perl executables. While these paths are overwriteable (see
700L<"PERLLIB_PREFIX">, L<"PERL_SH_DIR">), some people may prefer
701binary editing of paths inside the executables/DLLs.
702
703=head1 Accessing documentation
704
705Depending on how you built/installed perl you may have (otherwise
706identical) Perl documentation in the following formats:
707
708=head2 OS/2 F<.INF> file
709
710Most probably the most convenient form. Under OS/2 view it as
711
712 view perl
713 view perl perlfunc
714 view perl less
715 view perl ExtUtils::MakeMaker
716
717(currently the last two may hit a wrong location, but this may improve
718soon). Under Win* see L<"SYNOPSIS">.
719
720If you want to build the docs yourself, and have I<OS/2 toolkit>, run
721
722 pod2ipf > perl.ipf
723
724in F</perllib/lib/pod> directory, then
725
726 ipfc /inf perl.ipf
727
728(Expect a lot of errors during the both steps.) Now move it on your
729BOOKSHELF path.
730
731=head2 Plain text
732
733If you have perl documentation in the source form, perl utilities
734installed, and GNU groff installed, you may use
735
736 perldoc perlfunc
737 perldoc less
738 perldoc ExtUtils::MakeMaker
739
740to access the perl documentation in the text form (note that you may get
741better results using perl manpages).
742
743Alternately, try running pod2text on F<.pod> files.
744
745=head2 Manpages
746
747If you have F<man> installed on your system, and you installed perl
748manpages, use something like this:
749
750 man perlfunc
751 man 3 less
752 man ExtUtils.MakeMaker
753
754to access documentation for different components of Perl. Start with
755
756 man perl
757
758Note that dot (F<.>) is used as a package separator for documentation
759for packages, and as usual, sometimes you need to give the section - C<3>
760above - to avoid shadowing by the I<less(1) manpage>.
761
762Make sure that the directory B<above> the directory with manpages is
763on our C<MANPATH>, like this
764
765 set MANPATH=c:/man;f:/perllib/man
766
767for Perl manpages in C<f:/perllib/man/man1/> etc.
768
769=head2 HTML
770
771If you have some WWW browser available, installed the Perl
772documentation in the source form, and Perl utilities, you can build
773HTML docs. Cd to directory with F<.pod> files, and do like this
774
775 cd f:/perllib/lib/pod
776 pod2html
777
778After this you can direct your browser the file F<perl.html> in this
779directory, and go ahead with reading docs, like this:
780
781 explore file:///f:/perllib/lib/pod/perl.html
782
783Alternatively you may be able to get these docs prebuilt from CPAN.
784
785=head2 GNU C<info> files
786
787Users of Emacs would appreciate it very much, especially with
788C<CPerl> mode loaded. You need to get latest C<pod2texi> from C<CPAN>,
789or, alternately, the prebuilt info pages.
790
791=head2 F<PDF> files
792
793for C<Acrobat> are available on CPAN (may be for slightly older version of
794perl).
795
796=head2 C<LaTeX> docs
797
798can be constructed using C<pod2latex>.
799
800=head1 BUILD
801
802Here we discuss how to build Perl under OS/2. There is an alternative
803(but maybe older) view on L<http://www.shadow.net/~troc/os2perl.html>.
804
805=head2 The short story
806
807Assume that you are a seasoned porter, so are sure that all the necessary
808tools are already present on your system, and you know how to get the Perl
809source distribution. Untar it, change to the extract directory, and
810
811 gnupatch -p0 < os2\diff.configure
812 sh Configure -des -D prefix=f:/perllib
813 make
814 make test
815 make install
816 make aout_test
817 make aout_install
818
819This puts the executables in f:/perllib/bin. Manually move them to the
820C<PATH>, manually move the built F<perl*.dll> to C<LIBPATH> (here for
821Perl DLL F<*> is a not-very-meaningful hex checksum), and run
822
823 make installcmd INSTALLCMDDIR=d:/ir/on/path
824
825Assuming that the C<man>-files were put on an appropriate location,
826this completes the installation of minimal Perl system. (The binary
827distribution contains also a lot of additional modules, and the
828documentation in INF format.)
829
830What follows is a detailed guide through these steps.
831
832=head2 Prerequisites
833
834You need to have the latest EMX development environment, the full
835GNU tool suite (gawk renamed to awk, and GNU F<find.exe>
836earlier on path than the OS/2 F<find.exe>, same with F<sort.exe>, to
837check use
838
839 find --version
840 sort --version
841
842). You need the latest version of F<pdksh> installed as F<sh.exe>.
843
844Check that you have B<BSD> libraries and headers installed, and -
845optionally - Berkeley DB headers and libraries, and crypt.
846
847Possible locations to get the files:
848
849 ftp://hobbes.nmsu.edu/os2/unix/
850 ftp://ftp.cdrom.com/pub/os2/unix/
851 ftp://ftp.cdrom.com/pub/os2/dev32/
852 ftp://ftp.cdrom.com/pub/os2/emx09c/
853
854It is reported that the following archives contain enough utils to
855build perl: F<gnufutil.zip>, F<gnusutil.zip>, F<gnututil.zip>, F<gnused.zip>,
856F<gnupatch.zip>, F<gnuawk.zip>, F<gnumake.zip>, F<gnugrep.zip>, F<bsddev.zip> and
857F<ksh527rt.zip> (or a later version). Note that all these utilities are
858known to be available from LEO:
859
860 ftp://ftp.leo.org/pub/comp/os/os2/leo/gnu
861
862Note also that the F<db.lib> and F<db.a> from the EMX distribution
863are not suitable for multi-threaded compile (even single-threaded
864flavor of Perl uses multi-threaded C RTL, for
865compatibility with XFree86-OS/2). Get a corrected one from
866
867 http://www.ilyaz.org/software/os2/db_mt.zip
868
869If you have I<exactly the same version of Perl> installed already,
870make sure that no copies or perl are currently running. Later steps
871of the build may fail since an older version of F<perl.dll> loaded into
872memory may be found. Running C<make test> becomes meaningless, since
873the test are checking a previous build of perl (this situation is detected
874and reported by F<lib/os2_base.t> test). Do not forget to unset
875C<PERL_EMXLOAD_SEC> in environment.
876
877Also make sure that you have F</tmp> directory on the current drive,
878and F<.> directory in your C<LIBPATH>. One may try to correct the
879latter condition by
880
881 set BEGINLIBPATH .\.
882
883if you use something like F<CMD.EXE> or latest versions of
884F<4os2.exe>. (Setting BEGINLIBPATH to just C<.> is ignored by the
885OS/2 kernel.)
886
887Make sure your gcc is good for C<-Zomf> linking: run C<omflibs>
888script in F</emx/lib> directory.
889
890Check that you have link386 installed. It comes standard with OS/2,
891but may be not installed due to customization. If typing
892
893 link386
894
895shows you do not have it, do I<Selective install>, and choose C<Link
896object modules> in I<Optional system utilities/More>. If you get into
897link386 prompts, press C<Ctrl-C> to exit.
898
899=head2 Getting perl source
900
901You need to fetch the latest perl source (including developers
902releases). With some probability it is located in
903
904 http://www.cpan.org/src/5.0
905 http://www.cpan.org/src/5.0/unsupported
906
907If not, you may need to dig in the indices to find it in the directory
908of the current maintainer.
909
910Quick cycle of developers release may break the OS/2 build time to
911time, looking into
912
913 http://www.cpan.org/ports/os2/
914
915may indicate the latest release which was publicly released by the
916maintainer. Note that the release may include some additional patches
917to apply to the current source of perl.
918
919Extract it like this
920
921 tar vzxf perl5.00409.tar.gz
922
923You may see a message about errors while extracting F<Configure>. This is
924because there is a conflict with a similarly-named file F<configure>.
925
926Change to the directory of extraction.
927
928=head2 Application of the patches
929
930You need to apply the patches in F<./os2/diff.*> like this:
931
932 gnupatch -p0 < os2\diff.configure
933
934You may also need to apply the patches supplied with the binary
935distribution of perl. It also makes sense to look on the
936perl5-porters mailing list for the latest OS/2-related patches (see
937L<http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/>). Such
938patches usually contain strings C</os2/> and C<patch>, so it makes
939sense looking for these strings.
940
941=head2 Hand-editing
942
943You may look into the file F<./hints/os2.sh> and correct anything
944wrong you find there. I do not expect it is needed anywhere.
945
946=head2 Making
947
948 sh Configure -des -D prefix=f:/perllib
949
950C<prefix> means: where to install the resulting perl library. Giving
951correct prefix you may avoid the need to specify C<PERLLIB_PREFIX>,
952see L<"PERLLIB_PREFIX">.
953
954I<Ignore the message about missing C<ln>, and about C<-c> option to
955tr>. The latter is most probably already fixed, if you see it and can trace
956where the latter spurious warning comes from, please inform me.
957
958Now
959
960 make
961
962At some moment the built may die, reporting a I<version mismatch> or
963I<unable to run F<perl>>. This means that you do not have F<.> in
964your LIBPATH, so F<perl.exe> cannot find the needed F<perl67B2.dll> (treat
965these hex digits as line noise). After this is fixed the build
966should finish without a lot of fuss.
967
968=head2 Testing
969
970Now run
971
972 make test
973
974All tests should succeed (with some of them skipped). If you have the
975same version of Perl installed, it is crucial that you have C<.> early
976in your LIBPATH (or in BEGINLIBPATH), otherwise your tests will most
977probably test the wrong version of Perl.
978
979Some tests may generate extra messages similar to
980
981=over 4
982
983=item A lot of C<bad free>
984
985in database tests related to Berkeley DB. I<This should be fixed already.>
986If it persists, you may disable this warnings, see L<"PERL_BADFREE">.
987
988=item Process terminated by SIGTERM/SIGINT
989
990This is a standard message issued by OS/2 applications. *nix
991applications die in silence. It is considered to be a feature. One can
992easily disable this by appropriate sighandlers.
993
994However the test engine bleeds these message to screen in unexpected
995moments. Two messages of this kind I<should> be present during
996testing.
997
998=back
999
1000To get finer test reports, call
1001
1002 perl t/harness
1003
1004The report with F<io/pipe.t> failing may look like this:
1005
1006 Failed Test Status Wstat Total Fail Failed List of failed
1007 ------------------------------------------------------------
1008 io/pipe.t 12 1 8.33% 9
1009 7 tests skipped, plus 56 subtests skipped.
1010 Failed 1/195 test scripts, 99.49% okay. 1/6542 subtests failed, 99.98% okay.
1011
1012The reasons for most important skipped tests are:
1013
1014=over 8
1015
1016=item F<op/fs.t>
1017
1018=over 4
1019
1020=item 18
1021
1022Checks C<atime> and C<mtime> of C<stat()> - unfortunately, HPFS
1023provides only 2sec time granularity (for compatibility with FAT?).
1024
1025=item 25
1026
1027Checks C<truncate()> on a filehandle just opened for write - I do not
1028know why this should or should not work.
1029
1030=back
1031
1032=item F<op/stat.t>
1033
1034Checks C<stat()>. Tests:
1035
1036=over 4
1037
1038=item 4
1039
1040Checks C<atime> and C<mtime> of C<stat()> - unfortunately, HPFS
1041provides only 2sec time granularity (for compatibility with FAT?).
1042
1043=back
1044
1045=back
1046
1047=head2 Installing the built perl
1048
1049If you haven't yet moved C<perl*.dll> onto LIBPATH, do it now.
1050
1051Run
1052
1053 make install
1054
1055It would put the generated files into needed locations. Manually put
1056F<perl.exe>, F<perl__.exe> and F<perl___.exe> to a location on your
1057PATH, F<perl.dll> to a location on your LIBPATH.
1058
1059Run
1060
1061 make installcmd INSTALLCMDDIR=d:/ir/on/path
1062
1063to convert perl utilities to F<.cmd> files and put them on
1064PATH. You need to put F<.EXE>-utilities on path manually. They are
1065installed in C<$prefix/bin>, here C<$prefix> is what you gave to
1066F<Configure>, see L<Making>.
1067
1068If you use C<man>, either move the installed F<*/man/> directories to
1069your C<MANPATH>, or modify C<MANPATH> to match the location. (One
1070could have avoided this by providing a correct C<manpath> option to
1071F<./Configure>, or editing F<./config.sh> between configuring and
1072making steps.)
1073
1074=head2 C<a.out>-style build
1075
1076Proceed as above, but make F<perl_.exe> (see L<"perl_.exe">) by
1077
1078 make perl_
1079
1080test and install by
1081
1082 make aout_test
1083 make aout_install
1084
1085Manually put F<perl_.exe> to a location on your PATH.
1086
1087B<Note.> The build process for C<perl_> I<does not know> about all the
1088dependencies, so you should make sure that anything is up-to-date,
1089say, by doing
1090
1091 make perl_dll
1092
1093first.
1094
1095=head1 Building a binary distribution
1096
1097[This section provides a short overview only...]
1098
1099Building should proceed differently depending on whether the version of perl
1100you install is already present and used on your system, or is a new version
1101not yet used. The description below assumes that the version is new, so
1102installing its DLLs and F<.pm> files will not disrupt the operation of your
1103system even if some intermediate steps are not yet fully working.
1104
1105The other cases require a little bit more convoluted procedures. Below I
1106suppose that the current version of Perl is C<5.8.2>, so the executables are
1107named accordingly.
1108
1109=over
1110
1111=item 1.
1112
1113Fully build and test the Perl distribution. Make sure that no tests are
1114failing with C<test> and C<aout_test> targets; fix the bugs in Perl and
1115the Perl test suite detected by these tests. Make sure that C<all_test>
1116make target runs as clean as possible. Check that C<os2/perlrexx.cmd>
1117runs fine.
1118
1119=item 2.
1120
1121Fully install Perl, including C<installcmd> target. Copy the generated DLLs
1122to C<LIBPATH>; copy the numbered Perl executables (as in F<perl5.8.2.exe>)
1123to C<PATH>; copy C<perl_.exe> to C<PATH> as C<perl_5.8.2.exe>. Think whether
1124you need backward-compatibility DLLs. In most cases you do not need to install
1125them yet; but sometime this may simplify the following steps.
1126
1127=item 3.
1128
1129Make sure that C<CPAN.pm> can download files from CPAN. If not, you may need
1130to manually install C<Net::FTP>.
1131
1132=item 4.
1133
1134Install the bundle C<Bundle::OS2_default>
1135
1136 perl5.8.2 -MCPAN -e "install Bundle::OS2_default" < nul |& tee 00cpan_i_1
1137
1138This may take a couple of hours on 1GHz processor (when run the first time).
1139And this should not be necessarily a smooth procedure. Some modules may not
1140specify required dependencies, so one may need to repeat this procedure several
1141times until the results stabilize.
1142
1143 perl5.8.2 -MCPAN -e "install Bundle::OS2_default" < nul |& tee 00cpan_i_2
1144 perl5.8.2 -MCPAN -e "install Bundle::OS2_default" < nul |& tee 00cpan_i_3
1145
1146Even after they stabilize, some tests may fail.
1147
1148Fix as many discovered bugs as possible. Document all the bugs which are not
1149fixed, and all the failures with unknown reasons. Inspect the produced logs
1150F<00cpan_i_1> to find suspiciously skipped tests, and other fishy events.
1151
1152Keep in mind that I<installation> of some modules may fail too: for example,
1153the DLLs to update may be already loaded by F<CPAN.pm>. Inspect the C<install>
1154logs (in the example above F<00cpan_i_1> etc) for errors, and install things
1155manually, as in
1156
1157 cd $CPANHOME/.cpan/build/Digest-MD5-2.31
1158 make install
1159
1160Some distributions may fail some tests, but you may want to install them
1161anyway (as above, or via C<force install> command of C<CPAN.pm> shell-mode).
1162
1163Since this procedure may take quite a long time to complete, it makes sense
1164to "freeze" your CPAN configuration by disabling periodic updates of the
1165local copy of CPAN index: set C<index_expire> to some big value (I use 365),
1166then save the settings
1167
1168 CPAN> o conf index_expire 365
1169 CPAN> o conf commit
1170
1171Reset back to the default value C<1> when you are finished.
1172
1173=item 5.
1174
1175When satisfied with the results, rerun the C<installcmd> target. Now you
1176can copy C<perl5.8.2.exe> to C<perl.exe>, and install the other OMF-build
1177executables: C<perl__.exe> etc. They are ready to be used.
1178
1179=item 6.
1180
1181Change to the C<./pod> directory of the build tree, download the Perl logo
1182F<CamelGrayBig.BMP>, and run
1183
1184 ( perl2ipf > perl.ipf ) |& tee 00ipf
1185 ipfc /INF perl.ipf |& tee 00inf
1186
1187This produces the Perl docs online book C<perl.INF>. Install in on
1188C<BOOKSHELF> path.
1189
1190=item 7.
1191
1192Now is the time to build statically linked executable F<perl_.exe> which
1193includes newly-installed via C<Bundle::OS2_default> modules. Doing testing
1194via C<CPAN.pm> is going to be painfully slow, since it statically links
1195a new executable per XS extension.
1196
1197Here is a possible workaround: create a toplevel F<Makefile.PL> in
1198F<$CPANHOME/.cpan/build/> with contents being (compare with L<Making
1199executables with a custom collection of statically loaded extensions>)
1200
1201 use ExtUtils::MakeMaker;
1202 WriteMakefile NAME => 'dummy';
1203
1204execute this as
1205
1206 perl_5.8.2.exe Makefile.PL <nul |& tee 00aout_c1
1207 make -k all test <nul |& 00aout_t1
1208
1209Again, this procedure should not be absolutely smooth. Some C<Makefile.PL>'s
1210in subdirectories may be buggy, and would not run as "child" scripts. The
1211interdependency of modules can strike you; however, since non-XS modules
1212are already installed, the prerequisites of most modules have a very good
1213chance to be present.
1214
1215If you discover some glitches, move directories of problematic modules to a
1216different location; if these modules are non-XS modules, you may just ignore
1217them - they are already installed; the remaining, XS, modules you need to
1218install manually one by one.
1219
1220After each such removal you need to rerun the C<Makefile.PL>/C<make> process;
1221usually this procedure converges soon. (But be sure to convert all the
1222necessary external C libraries from F<.lib> format to F<.a> format: run one of
1223
1224 emxaout foo.lib
1225 emximp -o foo.a foo.lib
1226
1227whichever is appropriate.) Also, make sure that the DLLs for external
1228libraries are usable with with executables compiled without C<-Zmtd> options.
1229
1230When you are sure that only a few subdirectories
1231lead to failures, you may want to add C<-j4> option to C<make> to speed up
1232skipping subdirectories with already finished build.
1233
1234When you are satisfied with the results of tests, install the build C libraries
1235for extensions:
1236
1237 make install |& tee 00aout_i
1238
1239Now you can rename the file F<./perl.exe> generated during the last phase
1240to F<perl_5.8.2.exe>; place it on C<PATH>; if there is an inter-dependency
1241between some XS modules, you may need to repeat the C<test>/C<install> loop
1242with this new executable and some excluded modules - until the procedure
1243converges.
1244
1245Now you have all the necessary F<.a> libraries for these Perl modules in the
1246places where Perl builder can find it. Use the perl builder: change to an
1247empty directory, create a "dummy" F<Makefile.PL> again, and run
1248
1249 perl_5.8.2.exe Makefile.PL |& tee 00c
1250 make perl |& tee 00p
1251
1252This should create an executable F<./perl.exe> with all the statically loaded
1253extensions built in. Compare the generated F<perlmain.c> files to make sure
1254that during the iterations the number of loaded extensions only increases.
1255Rename F<./perl.exe> to F<perl_5.8.2.exe> on C<PATH>.
1256
1257When it converges, you got a functional variant of F<perl_5.8.2.exe>; copy it
1258to C<perl_.exe>. You are done with generation of the local Perl installation.
1259
1260=item 8.
1261
1262Make sure that the installed modules are actually installed in the location
1263of the new Perl, and are not inherited from entries of @INC given for
1264inheritance from the older versions of Perl: set C<PERLLIB_582_PREFIX> to
1265redirect the new version of Perl to a new location, and copy the installed
1266files to this new location. Redo the tests to make sure that the versions of
1267modules inherited from older versions of Perl are not needed.
1268
1269Actually, the log output of L<pod2ipf> during the step 6 gives a very detailed
1270info about which modules are loaded from which place; so you may use it as
1271an additional verification tool.
1272
1273Check that some temporary files did not make into the perl install tree.
1274Run something like this
1275
1276 pfind . -f "!(/\.(pm|pl|ix|al|h|a|lib|txt|pod|imp|bs|dll|ld|bs|inc|xbm|yml|cgi|uu|e2x|skip|packlist|eg|cfg|html|pub|enc|all|ini|po|pot)$/i or /^\w+$/") | less
1277
1278in the install tree (both top one and F<sitelib> one).
1279
1280Compress all the DLLs with F<lxlite>. The tiny F<.exe> can be compressed with
1281C</c:max> (the bug only appears when there is a fixup in the last 6 bytes of a
1282page (?); since the tiny executables are much smaller than a page, the bug
1283will not hit). Do not compress C<perl_.exe> - it would not work under DOS.
1284
1285=item 9.
1286
1287Now you can generate the binary distribution. This is done by running the
1288test of the CPAN distribution C<OS2::SoftInstaller>. Tune up the file
1289F<test.pl> to suit the layout of current version of Perl first. Do not
1290forget to pack the necessary external DLLs accordingly. Include the
1291description of the bugs and test suite failures you could not fix. Include
1292the small-stack versions of Perl executables from Perl build directory.
1293
1294Include F<perl5.def> so that people can relink the perl DLL preserving
1295the binary compatibility, or can create compatibility DLLs. Include the diff
1296files (C<diff -pu old new>) of fixes you did so that people can rebuild your
1297version. Include F<perl5.map> so that one can use remote debugging.
1298
1299=item 10.
1300
1301Share what you did with the other people. Relax. Enjoy fruits of your work.
1302
1303=item 11.
1304
1305Brace yourself for thanks, bug reports, hate mail and spam coming as result
1306of the previous step. No good deed should remain unpunished!
1307
1308=back
1309
1310=head1 Building custom F<.EXE> files
1311
1312The Perl executables can be easily rebuilt at any moment. Moreover, one can
1313use the I<embedding> interface (see L<perlembed>) to make very customized
1314executables.
1315
1316=head2 Making executables with a custom collection of statically loaded extensions
1317
1318It is a little bit easier to do so while I<decreasing> the list of statically
1319loaded extensions. We discuss this case only here.
1320
1321=over
1322
1323=item 1.
1324
1325Change to an empty directory, and create a placeholder <Makefile.PL>:
1326
1327 use ExtUtils::MakeMaker;
1328 WriteMakefile NAME => 'dummy';
1329
1330=item 2.
1331
1332Run it with the flavor of Perl (F<perl.exe> or F<perl_.exe>) you want to
1333rebuild.
1334
1335 perl_ Makefile.PL
1336
1337=item 3.
1338
1339Ask it to create new Perl executable:
1340
1341 make perl
1342
1343(you may need to manually add C<PERLTYPE=-DPERL_CORE> to this commandline on
1344some versions of Perl; the symptom is that the command-line globbing does not
1345work from OS/2 shells with the newly-compiled executable; check with
1346
1347 .\perl.exe -wle "print for @ARGV" *
1348
1349).
1350
1351=item 4.
1352
1353The previous step created F<perlmain.c> which contains a list of newXS() calls
1354near the end. Removing unnecessary calls, and rerunning
1355
1356 make perl
1357
1358will produce a customized executable.
1359
1360=back
1361
1362=head2 Making executables with a custom search-paths
1363
1364The default perl executable is flexible enough to support most usages.
1365However, one may want something yet more flexible; for example, one may want
1366to find Perl DLL relatively to the location of the EXE file; or one may want
1367to ignore the environment when setting the Perl-library search patch, etc.
1368
1369If you fill comfortable with I<embedding> interface (see L<perlembed>), such
1370things are easy to do repeating the steps outlined in L<Making
1371executables with a custom collection of statically loaded extensions>, and
1372doing more comprehensive edits to main() of F<perlmain.c>. The people with
1373little desire to understand Perl can just rename main(), and do necessary
1374modification in a custom main() which calls the renamed function in appropriate
1375time.
1376
1377However, there is a third way: perl DLL exports the main() function and several
1378callbacks to customize the search path. Below is a complete example of a
1379"Perl loader" which
1380
1381=over
1382
1383=item 1.
1384
1385Looks for Perl DLL in the directory C<$exedir/../dll>;
1386
1387=item 2.
1388
1389Prepends the above directory to C<BEGINLIBPATH>;
1390
1391=item 3.
1392
1393Fails if the Perl DLL found via C<BEGINLIBPATH> is different from what was
1394loaded on step 1; e.g., another process could have loaded it from C<LIBPATH>
1395or from a different value of C<BEGINLIBPATH>. In these cases one needs to
1396modify the setting of the system so that this other process either does not
1397run, or loads the DLL from C<BEGINLIBPATH> with C<LIBPATHSTRICT=T> (available
1398with kernels after September 2000).
1399
1400=item 4.
1401
1402Loads Perl library from C<$exedir/../dll/lib/>.
1403
1404=item 5.
1405
1406Uses Bourne shell from C<$exedir/../dll/sh/ksh.exe>.
1407
1408=back
1409
1410For best results compile the C file below with the same options as the Perl
1411DLL. However, a lot of functionality will work even if the executable is not
1412an EMX applications, e.g., if compiled with
1413
1414 gcc -Wall -DDOSISH -DOS2=1 -O2 -s -Zomf -Zsys perl-starter.c -DPERL_DLL_BASENAME=\"perl312F\" -Zstack 8192 -Zlinker /PM:VIO
1415
1416Here is the sample C file:
1417
1418 #define INCL_DOS
1419 #define INCL_NOPM
1420 /* These are needed for compile if os2.h includes os2tk.h, not os2emx.h */
1421 #define INCL_DOSPROCESS
1422 #include <os2.h>
1423
1424 #include "EXTERN.h"
1425 #define PERL_IN_MINIPERLMAIN_C
1426 #include "perl.h"
1427
1428 static char *me;
1429 HMODULE handle;
1430
1431 static void
1432 die_with(char *msg1, char *msg2, char *msg3, char *msg4)
1433 {
1434 ULONG c;
1435 char *s = " error: ";
1436
1437 DosWrite(2, me, strlen(me), &c);
1438 DosWrite(2, s, strlen(s), &c);
1439 DosWrite(2, msg1, strlen(msg1), &c);
1440 DosWrite(2, msg2, strlen(msg2), &c);
1441 DosWrite(2, msg3, strlen(msg3), &c);
1442 DosWrite(2, msg4, strlen(msg4), &c);
1443 DosWrite(2, "\r\n", 2, &c);
1444 exit(255);
1445 }
1446
1447 typedef ULONG (*fill_extLibpath_t)(int type, char *pre, char *post, int replace, char *msg);
1448 typedef int (*main_t)(int type, char *argv[], char *env[]);
1449 typedef int (*handler_t)(void* data, int which);
1450
1451 #ifndef PERL_DLL_BASENAME
1452 # define PERL_DLL_BASENAME "perl"
1453 #endif
1454
1455 static HMODULE
1456 load_perl_dll(char *basename)
1457 {
1458 char buf[300], fail[260];
1459 STRLEN l, dirl;
1460 fill_extLibpath_t f;
1461 ULONG rc_fullname;
1462 HMODULE handle, handle1;
1463
1464 if (_execname(buf, sizeof(buf) - 13) != 0)
1465 die_with("Can't find full path: ", strerror(errno), "", "");
1466 /* XXXX Fill `me' with new value */
1467 l = strlen(buf);
1468 while (l && buf[l-1] != '/' && buf[l-1] != '\\')
1469 l--;
1470 dirl = l - 1;
1471 strcpy(buf + l, basename);
1472 l += strlen(basename);
1473 strcpy(buf + l, ".dll");
1474 if ( (rc_fullname = DosLoadModule(fail, sizeof fail, buf, &handle)) != 0
1475 && DosLoadModule(fail, sizeof fail, basename, &handle) != 0 )
1476 die_with("Can't load DLL ", buf, "", "");
1477 if (rc_fullname)
1478 return handle; /* was loaded with short name; all is fine */
1479 if (DosQueryProcAddr(handle, 0, "fill_extLibpath", (PFN*)&f))
1480 die_with(buf, ": DLL exports no symbol ", "fill_extLibpath", "");
1481 buf[dirl] = 0;
1482 if (f(0 /*BEGINLIBPATH*/, buf /* prepend */, NULL /* append */,
1483 0 /* keep old value */, me))
1484 die_with(me, ": prepending BEGINLIBPATH", "", "");
1485 if (DosLoadModule(fail, sizeof fail, basename, &handle1) != 0)
1486 die_with(me, ": finding perl DLL again via BEGINLIBPATH", "", "");
1487 buf[dirl] = '\\';
1488 if (handle1 != handle) {
1489 if (DosQueryModuleName(handle1, sizeof(fail), fail))
1490 strcpy(fail, "???");
1491 die_with(buf, ":\n\tperl DLL via BEGINLIBPATH is different: \n\t",
1492 fail,
1493 "\n\tYou may need to manipulate global BEGINLIBPATH and LIBPATHSTRICT"
1494 "\n\tso that the other copy is loaded via BEGINLIBPATH.");
1495 }
1496 return handle;
1497 }
1498
1499 int
1500 main(int argc, char **argv, char **env)
1501 {
1502 main_t f;
1503 handler_t h;
1504
1505 me = argv[0];
1506 /**/
1507 handle = load_perl_dll(PERL_DLL_BASENAME);
1508
1509 if (DosQueryProcAddr(handle, 0, "Perl_OS2_handler_install", (PFN*)&h))
1510 die_with(PERL_DLL_BASENAME, ": DLL exports no symbol ", "Perl_OS2_handler_install", "");
1511 if ( !h((void *)"~installprefix", Perlos2_handler_perllib_from)
1512 || !h((void *)"~dll", Perlos2_handler_perllib_to)
1513 || !h((void *)"~dll/sh/ksh.exe", Perlos2_handler_perl_sh) )
1514 die_with(PERL_DLL_BASENAME, ": Can't install @INC manglers", "", "");
1515
1516 if (DosQueryProcAddr(handle, 0, "dll_perlmain", (PFN*)&f))
1517 die_with(PERL_DLL_BASENAME, ": DLL exports no symbol ", "dll_perlmain", "");
1518 return f(argc, argv, env);
1519 }
1520
1521
1522=head1 Build FAQ
1523
1524=head2 Some C</> became C<\> in pdksh.
1525
1526You have a very old pdksh. See L<Prerequisites>.
1527
1528=head2 C<'errno'> - unresolved external
1529
1530You do not have MT-safe F<db.lib>. See L<Prerequisites>.
1531
1532=head2 Problems with tr or sed
1533
1534reported with very old version of tr and sed.
1535
1536=head2 Some problem (forget which ;-)
1537
1538You have an older version of F<perl.dll> on your LIBPATH, which
1539broke the build of extensions.
1540
1541=head2 Library ... not found
1542
1543You did not run C<omflibs>. See L<Prerequisites>.
1544
1545=head2 Segfault in make
1546
1547You use an old version of GNU make. See L<Prerequisites>.
1548
1549=head2 op/sprintf test failure
1550
1551This can result from a bug in emx sprintf which was fixed in 0.9d fix 03.
1552
1553=head1 Specific (mis)features of OS/2 port
1554
1555=head2 C<setpriority>, C<getpriority>
1556
1557Note that these functions are compatible with *nix, not with the older
1558ports of '94 - 95. The priorities are absolute, go from 32 to -95,
1559lower is quicker. 0 is the default priority.
1560
1561B<WARNING>. Calling C<getpriority> on a non-existing process could lock
1562the system before Warp3 fixpak22. Starting with Warp3, Perl will use
1563a workaround: it aborts getpriority() if the process is not present.
1564This is not possible on older versions C<2.*>, and has a race
1565condition anyway.
1566
1567=head2 C<system()>
1568
1569Multi-argument form of C<system()> allows an additional numeric
1570argument. The meaning of this argument is described in
1571L<OS2::Process>.
1572
1573When finding a program to run, Perl first asks the OS to look for executables
1574on C<PATH> (OS/2 adds extension F<.exe> if no extension is present).
1575If not found, it looks for a script with possible extensions
1576added in this order: no extension, F<.cmd>, F<.btm>,
1577F<.bat>, F<.pl>. If found, Perl checks the start of the file for magic
1578strings C<"#!"> and C<"extproc ">. If found, Perl uses the rest of the
1579first line as the beginning of the command line to run this script. The
1580only mangling done to the first line is extraction of arguments (currently
1581up to 3), and ignoring of the path-part of the "interpreter" name if it can't
1582be found using the full path.
1583
1584E.g., C<system 'foo', 'bar', 'baz'> may lead Perl to finding
1585F<C:/emx/bin/foo.cmd> with the first line being
1586
1587 extproc /bin/bash -x -c
1588
1589If F</bin/bash.exe> is not found, then Perl looks for an executable F<bash.exe> on
1590C<PATH>. If found in F<C:/emx.add/bin/bash.exe>, then the above system() is
1591translated to
1592
1593 system qw(C:/emx.add/bin/bash.exe -x -c C:/emx/bin/foo.cmd bar baz)
1594
1595One additional translation is performed: instead of F</bin/sh> Perl uses
1596the hardwired-or-customized shell (see C<L<"PERL_SH_DIR">>).
1597
1598The above search for "interpreter" is recursive: if F<bash> executable is not
1599found, but F<bash.btm> is found, Perl will investigate its first line etc.
1600The only hardwired limit on the recursion depth is implicit: there is a limit
16014 on the number of additional arguments inserted before the actual arguments
1602given to system(). In particular, if no additional arguments are specified
1603on the "magic" first lines, then the limit on the depth is 4.
1604
1605If Perl finds that the found executable is of PM type when the
1606current session is not, it will start the new process in a separate session of
1607necessary type. Call via C<OS2::Process> to disable this magic.
1608
1609B<WARNING>. Due to the described logic, you need to explicitly
1610specify F<.com> extension if needed. Moreover, if the executable
1611F<perl5.6.1> is requested, Perl will not look for F<perl5.6.1.exe>.
1612[This may change in the future.]
1613
1614=head2 C<extproc> on the first line
1615
1616If the first chars of a Perl script are C<"extproc ">, this line is treated
1617as C<#!>-line, thus all the switches on this line are processed (twice
1618if script was started via cmd.exe). See L<perlrun/DESCRIPTION>.
1619
1620=head2 Additional modules:
1621
1622L<OS2::Process>, L<OS2::DLL>, L<OS2::REXX>, L<OS2::PrfDB>, L<OS2::ExtAttr>. These
1623modules provide access to additional numeric argument for C<system>
1624and to the information about the running process,
1625to DLLs having functions with REXX signature and to the REXX runtime, to
1626OS/2 databases in the F<.INI> format, and to Extended Attributes.
1627
1628Two additional extensions by Andreas Kaiser, C<OS2::UPM>, and
1629C<OS2::FTP>, are included into C<ILYAZ> directory, mirrored on CPAN.
1630Other OS/2-related extensions are available too.
1631
1632=head2 Prebuilt methods:
1633
1634=over 4
1635
1636=item C<File::Copy::syscopy>
1637
1638used by C<File::Copy::copy>, see L<File::Copy>.
1639
1640=item C<DynaLoader::mod2fname>
1641
1642used by C<DynaLoader> for DLL name mangling.
1643
1644=item C<Cwd::current_drive()>
1645
1646Self explanatory.
1647
1648=item C<Cwd::sys_chdir(name)>
1649
1650leaves drive as it is.
1651
1652=item C<Cwd::change_drive(name)>
1653
1654chanes the "current" drive.
1655
1656=item C<Cwd::sys_is_absolute(name)>
1657
1658means has drive letter and is_rooted.
1659
1660=item C<Cwd::sys_is_rooted(name)>
1661
1662means has leading C<[/\\]> (maybe after a drive-letter:).
1663
1664=item C<Cwd::sys_is_relative(name)>
1665
1666means changes with current dir.
1667
1668=item C<Cwd::sys_cwd(name)>
1669
1670Interface to cwd from EMX. Used by C<Cwd::cwd>.
1671
1672=item C<Cwd::sys_abspath(name, dir)>
1673
1674Really really odious function to implement. Returns absolute name of
1675file which would have C<name> if CWD were C<dir>. C<Dir> defaults to the
1676current dir.
1677
1678=item C<Cwd::extLibpath([type])>
1679
1680Get current value of extended library search path. If C<type> is
1681present and positive, works with C<END_LIBPATH>, if negative, works
1682with C<LIBPATHSTRICT>, otherwise with C<BEGIN_LIBPATH>.
1683
1684=item C<Cwd::extLibpath_set( path [, type ] )>
1685
1686Set current value of extended library search path. If C<type> is
1687present and positive, works with <END_LIBPATH>, if negative, works
1688with C<LIBPATHSTRICT>, otherwise with C<BEGIN_LIBPATH>.
1689
1690=item C<OS2::Error(do_harderror,do_exception)>
1691
1692Returns C<undef> if it was not called yet, otherwise bit 1 is
1693set if on the previous call do_harderror was enabled, bit
16942 is set if on previous call do_exception was enabled.
1695
1696This function enables/disables error popups associated with
1697hardware errors (Disk not ready etc.) and software exceptions.
1698
1699I know of no way to find out the state of popups I<before> the first call
1700to this function.
1701
1702=item C<OS2::Errors2Drive(drive)>
1703
1704Returns C<undef> if it was not called yet, otherwise return false if errors
1705were not requested to be written to a hard drive, or the drive letter if
1706this was requested.
1707
1708This function may redirect error popups associated with hardware errors
1709(Disk not ready etc.) and software exceptions to the file POPUPLOG.OS2 at
1710the root directory of the specified drive. Overrides OS2::Error() specified
1711by individual programs. Given argument undef will disable redirection.
1712
1713Has global effect, persists after the application exits.
1714
1715I know of no way to find out the state of redirection of popups to the disk
1716I<before> the first call to this function.
1717
1718=item OS2::SysInfo()
1719
1720Returns a hash with system information. The keys of the hash are
1721
1722 MAX_PATH_LENGTH, MAX_TEXT_SESSIONS, MAX_PM_SESSIONS,
1723 MAX_VDM_SESSIONS, BOOT_DRIVE, DYN_PRI_VARIATION,
1724 MAX_WAIT, MIN_SLICE, MAX_SLICE, PAGE_SIZE,
1725 VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION,
1726 MS_COUNT, TIME_LOW, TIME_HIGH, TOTPHYSMEM, TOTRESMEM,
1727 TOTAVAILMEM, MAXPRMEM, MAXSHMEM, TIMER_INTERVAL,
1728 MAX_COMP_LENGTH, FOREGROUND_FS_SESSION,
1729 FOREGROUND_PROCESS
1730
1731=item OS2::BootDrive()
1732
1733Returns a letter without colon.
1734
1735=item C<OS2::MorphPM(serve)>, C<OS2::UnMorphPM(serve)>
1736
1737Transforms the current application into a PM application and back.
1738The argument true means that a real message loop is going to be served.
1739OS2::MorphPM() returns the PM message queue handle as an integer.
1740
1741See L<"Centralized management of resources"> for additional details.
1742
1743=item C<OS2::Serve_Messages(force)>
1744
1745Fake on-demand retrieval of outstanding PM messages. If C<force> is false,
1746will not dispatch messages if a real message loop is known to
1747be present. Returns number of messages retrieved.
1748
1749Dies with "QUITing..." if WM_QUIT message is obtained.
1750
1751=item C<OS2::Process_Messages(force [, cnt])>
1752
1753Retrieval of PM messages until window creation/destruction.
1754If C<force> is false, will not dispatch messages if a real message loop
1755is known to be present.
1756
1757Returns change in number of windows. If C<cnt> is given,
1758it is incremented by the number of messages retrieved.
1759
1760Dies with "QUITing..." if WM_QUIT message is obtained.
1761
1762=item C<OS2::_control87(new,mask)>
1763
1764the same as L<_control87(3)> of EMX. Takes integers as arguments, returns
1765the previous coprocessor control word as an integer. Only bits in C<new> which
1766are present in C<mask> are changed in the control word.
1767
1768=item OS2::get_control87()
1769
1770gets the coprocessor control word as an integer.
1771
1772=item C<OS2::set_control87_em(new=MCW_EM,mask=MCW_EM)>
1773
1774The variant of OS2::_control87() with default values good for
1775handling exception mask: if no C<mask>, uses exception mask part of C<new>
1776only. If no C<new>, disables all the floating point exceptions.
1777
1778See L<"Misfeatures"> for details.
1779
1780=item C<OS2::DLLname([how [, \&xsub]])>
1781
1782Gives the information about the Perl DLL or the DLL containing the C
1783function bound to by C<&xsub>. The meaning of C<how> is: default (2):
1784full name; 0: handle; 1: module name.
1785
1786=back
1787
1788(Note that some of these may be moved to different libraries -
1789eventually).
1790
1791
1792=head2 Prebuilt variables:
1793
1794=over 4
1795
1796=item $OS2::emx_rev
1797
1798numeric value is the same as _emx_rev of EMX, a string value the same
1799as _emx_vprt (similar to C<0.9c>).
1800
1801=item $OS2::emx_env
1802
1803same as _emx_env of EMX, a number similar to 0x8001.
1804
1805=item $OS2::os_ver
1806
1807a number C<OS_MAJOR + 0.001 * OS_MINOR>.
1808
1809=item $OS2::is_aout
1810
1811true if the Perl library was compiled in AOUT format.
1812
1813=item $OS2::can_fork
1814
1815true if the current executable is an AOUT EMX executable, so Perl can
1816fork. Do not use this, use the portable check for
1817$Config::Config{dfork}.
1818
1819=item $OS2::nsyserror
1820
1821This variable (default is 1) controls whether to enforce the contents
1822of $^E to start with C<SYS0003>-like id. If set to 0, then the string
1823value of $^E is what is available from the OS/2 message file. (Some
1824messages in this file have an C<SYS0003>-like id prepended, some not.)
1825
1826=back
1827
1828=head2 Misfeatures
1829
1830=over 4
1831
1832=item *
1833
1834Since L<flock(3)> is present in EMX, but is not functional, it is
1835emulated by perl. To disable the emulations, set environment variable
1836C<USE_PERL_FLOCK=0>.
1837
1838=item *
1839
1840Here is the list of things which may be "broken" on
1841EMX (from EMX docs):
1842
1843=over 4
1844
1845=item *
1846
1847The functions L<recvmsg(3)>, L<sendmsg(3)>, and L<socketpair(3)> are not
1848implemented.
1849
1850=item *
1851
1852L<sock_init(3)> is not required and not implemented.
1853
1854=item *
1855
1856L<flock(3)> is not yet implemented (dummy function). (Perl has a workaround.)
1857
1858=item *
1859
1860L<kill(3)>: Special treatment of PID=0, PID=1 and PID=-1 is not implemented.
1861
1862=item *
1863
1864L<waitpid(3)>:
1865
1866 WUNTRACED
1867 Not implemented.
1868 waitpid() is not implemented for negative values of PID.
1869
1870=back
1871
1872Note that C<kill -9> does not work with the current version of EMX.
1873
1874=item *
1875
1876See L<"Text-mode filehandles">.
1877
1878=item *
1879
1880Unix-domain sockets on OS/2 live in a pseudo-file-system C</sockets/...>.
1881To avoid a failure to create a socket with a name of a different form,
1882C<"/socket/"> is prepended to the socket name (unless it starts with this
1883already).
1884
1885This may lead to problems later in case the socket is accessed via the
1886"usual" file-system calls using the "initial" name.
1887
1888=item *
1889
1890Apparently, IBM used a compiler (for some period of time around '95?) which
1891changes FP mask right and left. This is not I<that> bad for IBM's
1892programs, but the same compiler was used for DLLs which are used with
1893general-purpose applications. When these DLLs are used, the state of
1894floating-point flags in the application is not predictable.
1895
1896What is much worse, some DLLs change the floating point flags when in
1897_DLLInitTerm() (e.g., F<TCP32IP>). This means that even if you do not I<call>
1898any function in the DLL, just the act of loading this DLL will reset your
1899flags. What is worse, the same compiler was used to compile some HOOK DLLs.
1900Given that HOOK dlls are executed in the context of I<all> the applications
1901in the system, this means a complete unpredictablity of floating point
1902flags on systems using such HOOK DLLs. E.g., F<GAMESRVR.DLL> of B<DIVE>
1903origin changes the floating point flags on each write to the TTY of a VIO
1904(windowed text-mode) applications.
1905
1906Some other (not completely debugged) situations when FP flags change include
1907some video drivers (?), and some operations related to creation of the windows.
1908People who code B<OpenGL> may have more experience on this.
1909
1910Perl is generally used in the situation when all the floating-point
1911exceptions are ignored, as is the default under EMX. If they are not ignored,
1912some benign Perl programs would get a C<SIGFPE> and would die a horrible death.
1913
1914To circumvent this, Perl uses two hacks. They help against I<one> type of
1915damage only: FP flags changed when loading a DLL.
1916
1917One of the hacks is to disable floating point exceptions on Perl startup (as
1918is the default with EMX). This helps only with compile-time-linked DLLs
1919changing the flags before main() had a chance to be called.
1920
1921The other hack is to restore FP flags after a call to dlopen(). This helps
1922against similar damage done by DLLs _DLLInitTerm() at runtime. Currently
1923no way to switch these hacks off is provided.
1924
1925=back
1926
1927=head2 Modifications
1928
1929Perl modifies some standard C library calls in the following ways:
1930
1931=over 9
1932
1933=item C<popen>
1934
1935C<my_popen> uses F<sh.exe> if shell is required, cf. L<"PERL_SH_DIR">.
1936
1937=item C<tmpnam>
1938
1939is created using C<TMP> or C<TEMP> environment variable, via
1940C<tempnam>.
1941
1942=item C<tmpfile>
1943
1944If the current directory is not writable, file is created using modified
1945C<tmpnam>, so there may be a race condition.
1946
1947=item C<ctermid>
1948
1949a dummy implementation.
1950
1951=item C<stat>
1952
1953C<os2_stat> special-cases F</dev/tty> and F</dev/con>.
1954
1955=item C<mkdir>, C<rmdir>
1956
1957these EMX functions do not work if the path contains a trailing C</>.
1958Perl contains a workaround for this.
1959
1960=item C<flock>
1961
1962Since L<flock(3)> is present in EMX, but is not functional, it is
1963emulated by perl. To disable the emulations, set environment variable
1964C<USE_PERL_FLOCK=0>.
1965
1966=back
1967
1968=head2 Identifying DLLs
1969
1970All the DLLs built with the current versions of Perl have ID strings
1971identifying the name of the extension, its version, and the version
1972of Perl required for this DLL. Run C<bldlevel DLL-name> to find this
1973info.
1974
1975=head2 Centralized management of resources
1976
1977Since to call certain OS/2 API one needs to have a correctly initialized
1978C<Win> subsystem, OS/2-specific extensions may require getting C<HAB>s and
1979C<HMQ>s. If an extension would do it on its own, another extension could
1980fail to initialize.
1981
1982Perl provides a centralized management of these resources:
1983
1984=over
1985
1986=item C<HAB>
1987
1988To get the HAB, the extension should call C<hab = perl_hab_GET()> in C. After
1989this call is performed, C<hab> may be accessed as C<Perl_hab>. There is
1990no need to release the HAB after it is used.
1991
1992If by some reasons F<perl.h> cannot be included, use
1993
1994 extern int Perl_hab_GET(void);
1995
1996instead.
1997
1998=item C<HMQ>
1999
2000There are two cases:
2001
2002=over
2003
2004=item *
2005
2006the extension needs an C<HMQ> only because some API will not work otherwise.
2007Use C<serve = 0> below.
2008
2009=item *
2010
2011the extension needs an C<HMQ> since it wants to engage in a PM event loop.
2012Use C<serve = 1> below.
2013
2014=back
2015
2016To get an C<HMQ>, the extension should call C<hmq = perl_hmq_GET(serve)> in C.
2017After this call is performed, C<hmq> may be accessed as C<Perl_hmq>.
2018
2019To signal to Perl that HMQ is not needed any more, call
2020C<perl_hmq_UNSET(serve)>. Perl process will automatically morph/unmorph itself
2021into/from a PM process if HMQ is needed/not-needed. Perl will automatically
2022enable/disable C<WM_QUIT> message during shutdown if the message queue is
2023served/not-served.
2024
2025B<NOTE>. If during a shutdown there is a message queue which did not disable
2026WM_QUIT, and which did not process the received WM_QUIT message, the
2027shutdown will be automatically cancelled. Do not call C<perl_hmq_GET(1)>
2028unless you are going to process messages on an orderly basis.
2029
2030=item * Treating errors reported by OS/2 API
2031
2032There are two principal conventions (it is useful to call them C<Dos*>
2033and C<Win*> - though this part of the function signature is not always
2034determined by the name of the API) of reporting the error conditions
2035of OS/2 API. Most of C<Dos*> APIs report the error code as the result
2036of the call (so 0 means success, and there are many types of errors).
2037Most of C<Win*> API report success/fail via the result being
2038C<TRUE>/C<FALSE>; to find the reason for the failure one should call
2039WinGetLastError() API.
2040
2041Some C<Win*> entry points also overload a "meaningful" return value
2042with the error indicator; having a 0 return value indicates an error.
2043Yet some other C<Win*> entry points overload things even more, and 0
2044return value may mean a successful call returning a valid value 0, as
2045well as an error condition; in the case of a 0 return value one should
2046call WinGetLastError() API to distinguish a successful call from a
2047failing one.
2048
2049By convention, all the calls to OS/2 API should indicate their
2050failures by resetting $^E. All the Perl-accessible functions which
2051call OS/2 API may be broken into two classes: some die()s when an API
2052error is encountered, the other report the error via a false return
2053value (of course, this does not concern Perl-accessible functions
2054which I<expect> a failure of the OS/2 API call, having some workarounds
2055coded).
2056
2057Obviously, in the situation of the last type of the signature of an OS/2
2058API, it is must more convenient for the users if the failure is
2059indicated by die()ing: one does not need to check $^E to know that
2060something went wrong. If, however, this solution is not desirable by
2061some reason, the code in question should reset $^E to 0 before making
2062this OS/2 API call, so that the caller of this Perl-accessible
2063function has a chance to distinguish a success-but-0-return value from
2064a failure. (One may return undef as an alternative way of reporting
2065an error.)
2066
2067The macros to simplify this type of error propagation are
2068
2069=over
2070
2071=item C<CheckOSError(expr)>
2072
2073Returns true on error, sets $^E. Expects expr() be a call of
2074C<Dos*>-style API.
2075
2076=item C<CheckWinError(expr)>
2077
2078Returns true on error, sets $^E. Expects expr() be a call of
2079C<Win*>-style API.
2080
2081=item C<SaveWinError(expr)>
2082
2083Returns C<expr>, sets $^E from WinGetLastError() if C<expr> is false.
2084
2085=item C<SaveCroakWinError(expr,die,name1,name2)>
2086
2087Returns C<expr>, sets $^E from WinGetLastError() if C<expr> is false,
2088and die()s if C<die> and $^E are true. The message to die is the
2089concatenated strings C<name1> and C<name2>, separated by C<": "> from
2090the contents of $^E.
2091
2092=item C<WinError_2_Perl_rc>
2093
2094Sets C<Perl_rc> to the return value of WinGetLastError().
2095
2096=item C<FillWinError>
2097
2098Sets C<Perl_rc> to the return value of WinGetLastError(), and sets $^E
2099to the corresponding value.
2100
2101=item C<FillOSError(rc)>
2102
2103Sets C<Perl_rc> to C<rc>, and sets $^E to the corresponding value.
2104
2105=back
2106
2107=item * Loading DLLs and ordinals in DLLs
2108
2109Some DLLs are only present in some versions of OS/2, or in some
2110configurations of OS/2. Some exported entry points are present only
2111in DLLs shipped with some versions of OS/2. If these DLLs and entry
2112points were linked directly for a Perl executable/DLL or from a Perl
2113extensions, this binary would work only with the specified
2114versions/setups. Even if these entry points were not needed, the
2115I<load> of the executable (or DLL) would fail.
2116
2117For example, many newer useful APIs are not present in OS/2 v2; many
2118PM-related APIs require DLLs not available on floppy-boot setup.
2119
2120To make these calls fail I<only when the calls are executed>, one
2121should call these API via a dynamic linking API. There is a subsystem
2122in Perl to simplify such type of calls. A large number of entry
2123points available for such linking is provided (see C<entries_ordinals>
2124- and also C<PMWIN_entries> - in F<os2ish.h>). These ordinals can be
2125accessed via the APIs:
2126
2127 CallORD(), DeclFuncByORD(), DeclVoidFuncByORD(),
2128 DeclOSFuncByORD(), DeclWinFuncByORD(), AssignFuncPByORD(),
2129 DeclWinFuncByORD_CACHE(), DeclWinFuncByORD_CACHE_survive(),
2130 DeclWinFuncByORD_CACHE_resetError_survive(),
2131 DeclWinFunc_CACHE(), DeclWinFunc_CACHE_resetError(),
2132 DeclWinFunc_CACHE_survive(), DeclWinFunc_CACHE_resetError_survive()
2133
2134See the header files and the C code in the supplied OS/2-related
2135modules for the details on usage of these functions.
2136
2137Some of these functions also combine dynaloading semantic with the
2138error-propagation semantic discussed above.
2139
2140=back
2141
2142=head1 Perl flavors
2143
2144Because of idiosyncrasies of OS/2 one cannot have all the eggs in the
2145same basket (though EMX environment tries hard to overcome this
2146limitations, so the situation may somehow improve). There are 4
2147executables for Perl provided by the distribution:
2148
2149=head2 F<perl.exe>
2150
2151The main workhorse. This is a chimera executable: it is compiled as an
2152C<a.out>-style executable, but is linked with C<omf>-style dynamic
2153library F<perl.dll>, and with dynamic CRT DLL. This executable is a
2154VIO application.
2155
2156It can load perl dynamic extensions, and it can fork().
2157
2158B<Note.> Keep in mind that fork() is needed to open a pipe to yourself.
2159
2160=head2 F<perl_.exe>
2161
2162This is a statically linked C<a.out>-style executable. It cannot
2163load dynamic Perl extensions. The executable supplied in binary
2164distributions has a lot of extensions prebuilt, thus the above restriction is
2165important only if you use custom-built extensions. This executable is a VIO
2166application.
2167
2168I<This is the only executable with does not require OS/2.> The
2169friends locked into C<M$> world would appreciate the fact that this
2170executable runs under DOS, Win0.3*, Win0.95 and WinNT with an
2171appropriate extender. See L<"Other OSes">.
2172
2173=head2 F<perl__.exe>
2174
2175This is the same executable as F<perl___.exe>, but it is a PM
2176application.
2177
2178B<Note.> Usually (unless explicitly redirected during the startup)
2179STDIN, STDERR, and STDOUT of a PM
2180application are redirected to F<nul>. However, it is possible to I<see>
2181them if you start C<perl__.exe> from a PM program which emulates a
2182console window, like I<Shell mode> of Emacs or EPM. Thus it I<is
2183possible> to use Perl debugger (see L<perldebug>) to debug your PM
2184application (but beware of the message loop lockups - this will not
2185work if you have a message queue to serve, unless you hook the serving
2186into the getc() function of the debugger).
2187
2188Another way to see the output of a PM program is to run it as
2189
2190 pm_prog args 2>&1 | cat -
2191
2192with a shell I<different> from F<cmd.exe>, so that it does not create
2193a link between a VIO session and the session of C<pm_porg>. (Such a link
2194closes the VIO window.) E.g., this works with F<sh.exe> - or with Perl!
2195
2196 open P, 'pm_prog args 2>&1 |' or die;
2197 print while <P>;
2198
2199The flavor F<perl__.exe> is required if you want to start your program without
2200a VIO window present, but not C<detach>ed (run C<help detach> for more info).
2201Very useful for extensions which use PM, like C<Perl/Tk> or C<OpenGL>.
2202
2203Note also that the differences between PM and VIO executables are only
2204in the I<default> behaviour. One can start I<any> executable in
2205I<any> kind of session by using the arguments C</fs>, C</pm> or
2206C</win> switches of the command C<start> (of F<CMD.EXE> or a similar
2207shell). Alternatively, one can use the numeric first argument of the
2208C<system> Perl function (see L<OS2::Process>).
2209
2210=head2 F<perl___.exe>
2211
2212This is an C<omf>-style executable which is dynamically linked to
2213F<perl.dll> and CRT DLL. I know no advantages of this executable
2214over C<perl.exe>, but it cannot fork() at all. Well, one advantage is
2215that the build process is not so convoluted as with C<perl.exe>.
2216
2217It is a VIO application.
2218
2219=head2 Why strange names?
2220
2221Since Perl processes the C<#!>-line (cf.
2222L<perlrun/DESCRIPTION>, L<perlrun/Switches>,
2223L<perldiag/"Not a perl script">,
2224L<perldiag/"No Perl script found in input">), it should know when a
2225program I<is a Perl>. There is some naming convention which allows
2226Perl to distinguish correct lines from wrong ones. The above names are
2227almost the only names allowed by this convention which do not contain
2228digits (which have absolutely different semantics).
2229
2230=head2 Why dynamic linking?
2231
2232Well, having several executables dynamically linked to the same huge
2233library has its advantages, but this would not substantiate the
2234additional work to make it compile. The reason is the complicated-to-developers
2235but very quick and convenient-to-users "hard" dynamic linking used by OS/2.
2236
2237There are two distinctive features of the dyna-linking model of OS/2:
2238first, all the references to external functions are resolved at the compile time;
2239second, there is no runtime fixup of the DLLs after they are loaded into memory.
2240The first feature is an enormous advantage over other models: it avoids
2241conflicts when several DLLs used by an application export entries with
2242the same name. In such cases "other" models of dyna-linking just choose
2243between these two entry points using some random criterion - with predictable
2244disasters as results. But it is the second feature which requires the build
2245of F<perl.dll>.
2246
2247The address tables of DLLs are patched only once, when they are
2248loaded. The addresses of the entry points into DLLs are guaranteed to be
2249the same for all the programs which use the same DLL. This removes the
2250runtime fixup - once DLL is loaded, its code is read-only.
2251
2252While this allows some (significant?) performance advantages, this makes life
2253much harder for developers, since the above scheme makes it impossible
2254for a DLL to be "linked" to a symbol in the F<.EXE> file. Indeed, this
2255would need a DLL to have different relocations tables for the
2256(different) executables which use this DLL.
2257
2258However, a dynamically loaded Perl extension is forced to use some symbols
2259from the perl
2260executable, e.g., to know how to find the arguments to the functions:
2261the arguments live on the perl
2262internal evaluation stack. The solution is to put the main code of
2263the interpreter into a DLL, and make the F<.EXE> file which just loads
2264this DLL into memory and supplies command-arguments. The extension DLL
2265cannot link to symbols in F<.EXE>, but it has no problem linking
2266to symbols in the F<.DLL>.
2267
2268This I<greatly> increases the load time for the application (as well as
2269complexity of the compilation). Since interpreter is in a DLL,
2270the C RTL is basically forced to reside in a DLL as well (otherwise
2271extensions would not be able to use CRT). There are some advantages if
2272you use different flavors of perl, such as running F<perl.exe> and
2273F<perl__.exe> simultaneously: they share the memory of F<perl.dll>.
2274
2275B<NOTE>. There is one additional effect which makes DLLs more wasteful:
2276DLLs are loaded in the shared memory region, which is a scarse resource
2277given the 512M barrier of the "standard" OS/2 virtual memory. The code of
2278F<.EXE> files is also shared by all the processes which use the particular
2279F<.EXE>, but they are "shared in the private address space of the process";
2280this is possible because the address at which different sections
2281of the F<.EXE> file are loaded is decided at compile-time, thus all the
2282processes have these sections loaded at same addresses, and no fixup
2283of internal links inside the F<.EXE> is needed.
2284
2285Since DLLs may be loaded at run time, to have the same mechanism for DLLs
2286one needs to have the address range of I<any of the loaded> DLLs in the
2287system to be available I<in all the processes> which did not load a particular
2288DLL yet. This is why the DLLs are mapped to the shared memory region.
2289
2290=head2 Why chimera build?
2291
2292Current EMX environment does not allow DLLs compiled using Unixish
2293C<a.out> format to export symbols for data (or at least some types of
2294data). This forces C<omf>-style compile of F<perl.dll>.
2295
2296Current EMX environment does not allow F<.EXE> files compiled in
2297C<omf> format to fork(). fork() is needed for exactly three Perl
2298operations:
2299
2300=over 4
2301
2302=item *
2303
2304explicit fork() in the script,
2305
2306=item *
2307
2308C<open FH, "|-">
2309
2310=item *
2311
2312C<open FH, "-|">, in other words, opening pipes to itself.
2313
2314=back
2315
2316While these operations are not questions of life and death, they are
2317needed for a lot of
2318useful scripts. This forces C<a.out>-style compile of
2319F<perl.exe>.
2320
2321
2322=head1 ENVIRONMENT
2323
2324Here we list environment variables with are either OS/2- and DOS- and
2325Win*-specific, or are more important under OS/2 than under other OSes.
2326
2327=head2 C<PERLLIB_PREFIX>
2328
2329Specific for EMX port. Should have the form
2330
2331 path1;path2
2332
2333or
2334
2335 path1 path2
2336
2337If the beginning of some prebuilt path matches F<path1>, it is
2338substituted with F<path2>.
2339
2340Should be used if the perl library is moved from the default
2341location in preference to C<PERL(5)LIB>, since this would not leave wrong
2342entries in @INC. For example, if the compiled version of perl looks for @INC
2343in F<f:/perllib/lib>, and you want to install the library in
2344F<h:/opt/gnu>, do
2345
2346 set PERLLIB_PREFIX=f:/perllib/lib;h:/opt/gnu
2347
2348This will cause Perl with the prebuilt @INC of
2349
2350 f:/perllib/lib/5.00553/os2
2351 f:/perllib/lib/5.00553
2352 f:/perllib/lib/site_perl/5.00553/os2
2353 f:/perllib/lib/site_perl/5.00553
2354 .
2355
2356to use the following @INC:
2357
2358 h:/opt/gnu/5.00553/os2
2359 h:/opt/gnu/5.00553
2360 h:/opt/gnu/site_perl/5.00553/os2
2361 h:/opt/gnu/site_perl/5.00553
2362 .
2363
2364=head2 C<PERL_BADLANG>
2365
2366If 0, perl ignores setlocale() failing. May be useful with some
2367strange I<locale>s.
2368
2369=head2 C<PERL_BADFREE>
2370
2371If 0, perl would not warn of in case of unwarranted free(). With older
2372perls this might be
2373useful in conjunction with the module DB_File, which was buggy when
2374dynamically linked and OMF-built.
2375
2376Should not be set with newer Perls, since this may hide some I<real> problems.
2377
2378=head2 C<PERL_SH_DIR>
2379
2380Specific for EMX port. Gives the directory part of the location for
2381F<sh.exe>.
2382
2383=head2 C<USE_PERL_FLOCK>
2384
2385Specific for EMX port. Since L<flock(3)> is present in EMX, but is not
2386functional, it is emulated by perl. To disable the emulations, set
2387environment variable C<USE_PERL_FLOCK=0>.
2388
2389=head2 C<TMP> or C<TEMP>
2390
2391Specific for EMX port. Used as storage place for temporary files.
2392
2393=head1 Evolution
2394
2395Here we list major changes which could make you by surprise.
2396
2397=head2 Text-mode filehandles
2398
2399Starting from version 5.8, Perl uses a builtin translation layer for
2400text-mode files. This replaces the efficient well-tested EMX layer by
2401some code which should be best characterized as a "quick hack".
2402
2403In addition to possible bugs and an inability to follow changes to the
2404translation policy with off/on switches of TERMIO translation, this
2405introduces a serious incompatible change: before sysread() on
2406text-mode filehandles would go through the translation layer, now it
2407would not.
2408
2409=head2 Priorities
2410
2411C<setpriority> and C<getpriority> are not compatible with earlier
2412ports by Andreas Kaiser. See C<"setpriority, getpriority">.
2413
2414=head2 DLL name mangling: pre 5.6.2
2415
2416With the release 5.003_01 the dynamically loadable libraries
2417should be rebuilt when a different version of Perl is compiled. In particular,
2418DLLs (including F<perl.dll>) are now created with the names
2419which contain a checksum, thus allowing workaround for OS/2 scheme of
2420caching DLLs.
2421
2422It may be possible to code a simple workaround which would
2423
2424=over
2425
2426=item *
2427
2428find the old DLLs looking through the old @INC;
2429
2430=item *
2431
2432mangle the names according to the scheme of new perl and copy the DLLs to
2433these names;
2434
2435=item *
2436
2437edit the internal C<LX> tables of DLL to reflect the change of the name
2438(probably not needed for Perl extension DLLs, since the internally coded names
2439are not used for "specific" DLLs, they used only for "global" DLLs).
2440
2441=item *
2442
2443edit the internal C<IMPORT> tables and change the name of the "old"
2444F<perl????.dll> to the "new" F<perl????.dll>.
2445
2446=back
2447
2448=head2 DLL name mangling: 5.6.2 and beyond
2449
2450In fact mangling of I<extension> DLLs was done due to misunderstanding
2451of the OS/2 dynaloading model. OS/2 (effectively) maintains two
2452different tables of loaded DLL:
2453
2454=over
2455
2456=item Global DLLs
2457
2458those loaded by the base name from C<LIBPATH>; including those
2459associated at link time;
2460
2461=item specific DLLs
2462
2463loaded by the full name.
2464
2465=back
2466
2467When resolving a request for a global DLL, the table of already-loaded
2468specific DLLs is (effectively) ignored; moreover, specific DLLs are
2469I<always> loaded from the prescribed path.
2470
2471There is/was a minor twist which makes this scheme fragile: what to do
2472with DLLs loaded from
2473
2474=over
2475
2476=item C<BEGINLIBPATH> and C<ENDLIBPATH>
2477
2478(which depend on the process)
2479
2480=item F<.> from C<LIBPATH>
2481
2482which I<effectively> depends on the process (although C<LIBPATH> is the
2483same for all the processes).
2484
2485=back
2486
2487Unless C<LIBPATHSTRICT> is set to C<T> (and the kernel is after
24882000/09/01), such DLLs are considered to be global. When loading a
2489global DLL it is first looked in the table of already-loaded global
2490DLLs. Because of this the fact that one executable loaded a DLL from
2491C<BEGINLIBPATH> and C<ENDLIBPATH>, or F<.> from C<LIBPATH> may affect
2492I<which> DLL is loaded when I<another> executable requests a DLL with
2493the same name. I<This> is the reason for version-specific mangling of
2494the DLL name for perl DLL.
2495
2496Since the Perl extension DLLs are always loaded with the full path,
2497there is no need to mangle their names in a version-specific ways:
2498their directory already reflects the corresponding version of perl,
2499and @INC takes into account binary compatibility with older version.
2500Starting from C<5.6.2> the name mangling scheme is fixed to be the
2501same as for Perl 5.005_53 (same as in a popular binary release). Thus
2502new Perls will be able to I<resolve the names> of old extension DLLs
2503if @INC allows finding their directories.
2504
2505However, this still does not guarantee that these DLL may be loaded.
2506The reason is the mangling of the name of the I<Perl DLL>. And since
2507the extension DLLs link with the Perl DLL, extension DLLs for older
2508versions would load an older Perl DLL, and would most probably
2509segfault (since the data in this DLL is not properly initialized).
2510
2511There is a partial workaround (which can be made complete with newer
2512OS/2 kernels): create a forwarder DLL with the same name as the DLL of
2513the older version of Perl, which forwards the entry points to the
2514newer Perl's DLL. Make this DLL accessible on (say) the C<BEGINLIBPATH> of
2515the new Perl executable. When the new executable accesses old Perl's
2516extension DLLs, they would request the old Perl's DLL by name, get the
2517forwarder instead, so effectively will link with the currently running
2518(new) Perl DLL.
2519
2520This may break in two ways:
2521
2522=over
2523
2524=item *
2525
2526Old perl executable is started when a new executable is running has
2527loaded an extension compiled for the old executable (ouph!). In this
2528case the old executable will get a forwarder DLL instead of the old
2529perl DLL, so would link with the new perl DLL. While not directly
2530fatal, it will behave the same as new executable. This beats the whole
2531purpose of explicitly starting an old executable.
2532
2533=item *
2534
2535A new executable loads an extension compiled for the old executable
2536when an old perl executable is running. In this case the extension
2537will not pick up the forwarder - with fatal results.
2538
2539=back
2540
2541With support for C<LIBPATHSTRICT> this may be circumvented - unless
2542one of DLLs is started from F<.> from C<LIBPATH> (I do not know
2543whether C<LIBPATHSTRICT> affects this case).
2544
2545B<REMARK>. Unless newer kernels allow F<.> in C<BEGINLIBPATH> (older
2546do not), this mess cannot be completely cleaned. (It turns out that
2547as of the beginning of 2002, F<.> is not allowed, but F<.\.> is - and
2548it has the same effect.)
2549
2550
2551B<REMARK>. C<LIBPATHSTRICT>, C<BEGINLIBPATH> and C<ENDLIBPATH> are
2552not environment variables, although F<cmd.exe> emulates them on C<SET
2553...> lines. From Perl they may be accessed by L<Cwd::extLibpath> and
2554L<Cwd::extLibpath_set>.
2555
2556=head2 DLL forwarder generation
2557
2558Assume that the old DLL is named F<perlE0AC.dll> (as is one for
25595.005_53), and the new version is 5.6.1. Create a file
2560F<perl5shim.def-leader> with
2561
2562 LIBRARY 'perlE0AC' INITINSTANCE TERMINSTANCE
2563 DESCRIPTION '@#perl5-porters@perl.org:5.006001#@ Perl module for 5.00553 -> Perl 5.6.1 forwarder'
2564 CODE LOADONCALL
2565 DATA LOADONCALL NONSHARED MULTIPLE
2566 EXPORTS
2567
2568modifying the versions/names as needed. Run
2569
2570 perl -wnle "next if 0../EXPORTS/; print qq( \"$1\") if /\"(\w+)\"/" perl5.def >lst
2571
2572in the Perl build directory (to make the DLL smaller replace perl5.def
2573with the definition file for the older version of Perl if present).
2574
2575 cat perl5shim.def-leader lst >perl5shim.def
2576 gcc -Zomf -Zdll -o perlE0AC.dll perl5shim.def -s -llibperl
2577
2578(ignore multiple C<warning L4085>).
2579
2580=head2 Threading
2581
2582As of release 5.003_01 perl is linked to multithreaded C RTL
2583DLL. If perl itself is not compiled multithread-enabled, so will not be perl's
2584malloc(). However, extensions may use multiple thread on their own
2585risk.
2586
2587This was needed to compile C<Perl/Tk> for XFree86-OS/2 out-of-the-box, and
2588link with DLLs for other useful libraries, which typically are compiled
2589with C<-Zmt -Zcrtdll>.
2590
2591=head2 Calls to external programs
2592
2593Due to a popular demand the perl external program calling has been
2594changed wrt Andreas Kaiser's port. I<If> perl needs to call an
2595external program I<via shell>, the F<f:/bin/sh.exe> will be called, or
2596whatever is the override, see L<"PERL_SH_DIR">.
2597
2598Thus means that you need to get some copy of a F<sh.exe> as well (I
2599use one from pdksh). The path F<F:/bin> above is set up automatically during
2600the build to a correct value on the builder machine, but is
2601overridable at runtime,
2602
2603B<Reasons:> a consensus on C<perl5-porters> was that perl should use
2604one non-overridable shell per platform. The obvious choices for OS/2
2605are F<cmd.exe> and F<sh.exe>. Having perl build itself would be impossible
2606with F<cmd.exe> as a shell, thus I picked up C<sh.exe>. This assures almost
2607100% compatibility with the scripts coming from *nix. As an added benefit
2608this works as well under DOS if you use DOS-enabled port of pdksh
2609(see L<"Prerequisites">).
2610
2611B<Disadvantages:> currently F<sh.exe> of pdksh calls external programs
2612via fork()/exec(), and there is I<no> functioning exec() on
2613OS/2. exec() is emulated by EMX by an asynchronous call while the caller
2614waits for child completion (to pretend that the C<pid> did not change). This
2615means that 1 I<extra> copy of F<sh.exe> is made active via fork()/exec(),
2616which may lead to some resources taken from the system (even if we do
2617not count extra work needed for fork()ing).
2618
2619Note that this a lesser issue now when we do not spawn F<sh.exe>
2620unless needed (metachars found).
2621
2622One can always start F<cmd.exe> explicitly via
2623
2624 system 'cmd', '/c', 'mycmd', 'arg1', 'arg2', ...
2625
2626If you need to use F<cmd.exe>, and do not want to hand-edit thousands of your
2627scripts, the long-term solution proposed on p5-p is to have a directive
2628
2629 use OS2::Cmd;
2630
2631which will override system(), exec(), C<``>, and
2632C<open(,'...|')>. With current perl you may override only system(),
2633readpipe() - the explicit version of C<``>, and maybe exec(). The code
2634will substitute the one-argument call to system() by
2635C<CORE::system('cmd.exe', '/c', shift)>.
2636
2637If you have some working code for C<OS2::Cmd>, please send it to me,
2638I will include it into distribution. I have no need for such a module, so
2639cannot test it.
2640
2641For the details of the current situation with calling external programs,
2642see L<Starting OS/2 (and DOS) programs under Perl>. Set us mention a couple
2643of features:
2644
2645=over 4
2646
2647=item *
2648
2649External scripts may be called by their basename. Perl will try the same
2650extensions as when processing B<-S> command-line switch.
2651
2652=item *
2653
2654External scripts starting with C<#!> or C<extproc > will be executed directly,
2655without calling the shell, by calling the program specified on the rest of
2656the first line.
2657
2658=back
2659
2660=head2 Memory allocation
2661
2662Perl uses its own malloc() under OS/2 - interpreters are usually malloc-bound
2663for speed, but perl is not, since its malloc is lightning-fast.
2664Perl-memory-usage-tuned benchmarks show that Perl's malloc is 5 times quicker
2665than EMX one. I do not have convincing data about memory footprint, but
2666a (pretty random) benchmark showed that Perl's one is 5% better.
2667
2668Combination of perl's malloc() and rigid DLL name resolution creates
2669a special problem with library functions which expect their return value to
2670be free()d by system's free(). To facilitate extensions which need to call
2671such functions, system memory-allocation functions are still available with
2672the prefix C<emx_> added. (Currently only DLL perl has this, it should
2673propagate to F<perl_.exe> shortly.)
2674
2675=head2 Threads
2676
2677One can build perl with thread support enabled by providing C<-D usethreads>
2678option to F<Configure>. Currently OS/2 support of threads is very
2679preliminary.
2680
2681Most notable problems:
2682
2683=over 4
2684
2685=item C<COND_WAIT>
2686
2687may have a race condition (but probably does not due to edge-triggered
2688nature of OS/2 Event semaphores). (Needs a reimplementation (in terms of chaining
2689waiting threads, with the linked list stored in per-thread structure?)?)
2690
2691=item F<os2.c>
2692
2693has a couple of static variables used in OS/2-specific functions. (Need to be
2694moved to per-thread structure, or serialized?)
2695
2696=back
2697
2698Note that these problems should not discourage experimenting, since they
2699have a low probability of affecting small programs.
2700
2701=head1 BUGS
2702
2703This description is not updated often (since 5.6.1?), see F<./os2/Changes>
2704(L<perlos2delta>) for more info.
2705
2706=cut
2707
2708OS/2 extensions
2709~~~~~~~~~~~~~~~
2710I include 3 extensions by Andreas Kaiser, OS2::REXX, OS2::UPM, and OS2::FTP,
2711into my ftp directory, mirrored on CPAN. I made
2712some minor changes needed to compile them by standard tools. I cannot
2713test UPM and FTP, so I will appreciate your feedback. Other extensions
2714there are OS2::ExtAttr, OS2::PrfDB for tied access to EAs and .INI
2715files - and maybe some other extensions at the time you read it.
2716
2717Note that OS2 perl defines 2 pseudo-extension functions
2718OS2::Copy::copy and DynaLoader::mod2fname (many more now, see
2719L<Prebuilt methods>).
2720
2721The -R switch of older perl is deprecated. If you need to call a REXX code
2722which needs access to variables, include the call into a REXX compartment
2723created by
2724 REXX_call {...block...};
2725
2726Two new functions are supported by REXX code,
2727 REXX_eval 'string';
2728 REXX_eval_with 'string', REXX_function_name => \&perl_sub_reference;
2729
2730If you have some other extensions you want to share, send the code to
2731me. At least two are available: tied access to EA's, and tied access
2732to system databases.
2733
2734=head1 AUTHOR
2735
2736Ilya Zakharevich, cpan@ilyaz.org
2737
2738=head1 SEE ALSO
2739
2740perl(1).
2741
2742=cut
2743
2744
README.os390
1This document is written in pod format hence there are punctuation
2characters in odd places. Do not worry, you've apparently got the
3ASCII->EBCDIC translation worked out correctly. You can read more
4about pod in pod/perlpod.pod or the short summary in the INSTALL file.
5
6=head1 NAME
7
8README.os390 - building and installing Perl for OS/390 and z/OS
9
10=head1 SYNOPSIS
11
12This document will help you Configure, build, test and install Perl
13on OS/390 (aka z/OS) Unix System Services.
14
15=head1 DESCRIPTION
16
17This is a fully ported Perl for OS/390 Version 2 Release 3, 5, 6, 7,
188, and 9. It may work on other versions or releases, but those are
19the ones we've tested it on.
20
21You may need to carry out some system configuration tasks before
22running the Configure script for Perl.
23
24
25=head2 Tools
26
27The z/OS Unix Tools and Toys list may prove helpful and contains links
28to ports of much of the software helpful for building Perl.
29http://www-1.ibm.com/servers/eserver/zseries/zos/unix/bpxa1toy.html
30
31
32=head2 Unpacking Perl distribution on OS/390
33
34If using ftp remember to transfer the distribution in binary format.
35
36Gunzip/gzip for OS/390 is discussed at:
37
38 http://www-1.ibm.com/servers/eserver/zseries/zos/unix/faq/bpxqp1.html
39
40to extract an ASCII tar archive on OS/390, try this:
41
42 pax -o to=IBM-1047,from=ISO8859-1 -r < latest.tar
43
44or
45
46 zcat latest.tar.Z | pax -o to=IBM-1047,from=ISO8859-1 -r
47
48If you get lots of errors of the form
49
50 tar: FSUM7171 ...: cannot set uid/gid: EDC5139I Operation not permitted.
51
52you didn't read the above and tried to use tar instead of pax, you'll
53first have to remove the (now corrupt) perl directory
54
55 rm -rf perl-...
56
57and then use pax.
58
59=head2 Setup and utilities for Perl on OS/390
60
61Be sure that your yacc installation is in place including any necessary
62parser template files. If you have not already done so then be sure to:
63
64 cp /samples/yyparse.c /etc
65
66This may also be a good time to ensure that your /etc/protocol file
67and either your /etc/resolv.conf or /etc/hosts files are in place.
68The IBM document that described such USS system setup issues was
69SC28-1890-07 "OS/390 UNIX System Services Planning", in particular
70Chapter 6 on customizing the OE shell.
71
72GNU make for OS/390, which is recommended for the build of perl (as
73well as building CPAN modules and extensions), is available from the
74L</Tools>.
75
76Some people have reported encountering "Out of memory!" errors while
77trying to build Perl using GNU make binaries. If you encounter such
78trouble then try to download the source code kit and build GNU make
79from source to eliminate any such trouble. You might also find GNU make
80(as well as Perl and Apache) in the red-piece/book "Open Source Software
81for OS/390 UNIX", SG24-5944-00 from IBM.
82
83If instead of the recommended GNU make you would like to use the system
84supplied make program then be sure to install the default rules file
85properly via the shell command:
86
87 cp /samples/startup.mk /etc
88
89and be sure to also set the environment variable _C89_CCMODE=1 (exporting
90_C89_CCMODE=1 is also a good idea for users of GNU make).
91
92You might also want to have GNU groff for OS/390 installed before
93running the "make install" step for Perl.
94
95There is a syntax error in the /usr/include/sys/socket.h header file
96that IBM supplies with USS V2R7, V2R8, and possibly V2R9. The problem with
97the header file is that near the definition of the SO_REUSEPORT constant
98there is a spurious extra '/' character outside of a comment like so:
99
100 #define SO_REUSEPORT 0x0200 /* allow local address & port
101 reuse */ /
102
103You could edit that header yourself to remove that last '/', or you might
104note that Language Environment (LE) APAR PQ39997 describes the problem
105and PTF's UQ46272 and UQ46271 are the (R8 at least) fixes and apply them.
106If left unattended that syntax error will turn up as an inability for Perl
107to build its "Socket" extension.
108
109For successful testing you may need to turn on the sticky bit for your
110world readable /tmp directory if you have not already done so (see man chmod).
111
112=head2 Configure Perl on OS/390
113
114Once you've unpacked the distribution, run "sh Configure" (see INSTALL
115for a full discussion of the Configure options). There is a "hints" file
116for os390 that specifies the correct values for most things. Some things
117to watch out for include:
118
119=over 4
120
121=item *
122
123A message of the form:
124
125 (I see you are using the Korn shell. Some ksh's blow up on Configure,
126 mainly on older exotic systems. If yours does, try the Bourne shell instead.)
127
128is nothing to worry about at all.
129
130=item *
131
132Some of the parser default template files in /samples are needed in /etc.
133In particular be sure that you at least copy /samples/yyparse.c to /etc
134before running Perl's Configure. This step ensures successful extraction
135of EBCDIC versions of parser files such as perly.c, perly.h, and x2p/a2p.c.
136This has to be done before running Configure the first time. If you failed
137to do so then the easiest way to re-Configure Perl is to delete your
138misconfigured build root and re-extract the source from the tar ball.
139Then you must ensure that /etc/yyparse.c is properly in place before
140attempting to re-run Configure.
141
142=item *
143
144This port will support dynamic loading, but it is not selected by
145default. If you would like to experiment with dynamic loading then
146be sure to specify -Dusedl in the arguments to the Configure script.
147See the comments in hints/os390.sh for more information on dynamic loading.
148If you build with dynamic loading then you will need to add the
149$archlibexp/CORE directory to your LIBPATH environment variable in order
150for perl to work. See the config.sh file for the value of $archlibexp.
151If in trying to use Perl you see an error message similar to:
152
153 CEE3501S The module libperl.dll was not found.
154 From entry point __dllstaticinit at compile unit offset +00000194 at
155
156then your LIBPATH does not have the location of libperl.x and either
157libperl.dll or libperl.so in it. Add that directory to your LIBPATH and
158proceed.
159
160=item *
161
162Do not turn on the compiler optimization flag "-O". There is
163a bug in either the optimizer or perl that causes perl to
164not work correctly when the optimizer is on.
165
166=item *
167
168Some of the configuration files in /etc used by the
169networking APIs are either missing or have the wrong
170names. In particular, make sure that there's either
171an /etc/resolv.conf or an /etc/hosts, so that
172gethostbyname() works, and make sure that the file
173/etc/proto has been renamed to /etc/protocol (NOT
174/etc/protocols, as used by other Unix systems).
175You may have to look for things like HOSTNAME and DOMAINORIGIN
176in the "//'SYS1.TCPPARMS(TCPDATA)'" PDS member in order to
177properly set up your /etc networking files.
178
179=back
180
181=head2 Build, Test, Install Perl on OS/390
182
183Simply put:
184
185 sh Configure
186 make
187 make test
188
189if everything looks ok (see the next section for test/IVP diagnosis) then:
190
191 make install
192
193this last step may or may not require UID=0 privileges depending
194on how you answered the questions that Configure asked and whether
195or not you have write access to the directories you specified.
196
197=head2 Build Anomalies with Perl on OS/390
198
199"Out of memory!" messages during the build of Perl are most often fixed
200by re building the GNU make utility for OS/390 from a source code kit.
201
202Another memory limiting item to check is your MAXASSIZE parameter in your
203'SYS1.PARMLIB(BPXPRMxx)' data set (note too that as of V2R8 address space
204limits can be set on a per user ID basis in the USS segment of a RACF
205profile). People have reported successful builds of Perl with MAXASSIZE
206parameters as small as 503316480 (and it may be possible to build Perl
207with a MAXASSIZE smaller than that).
208
209Within USS your /etc/profile or $HOME/.profile may limit your ulimit
210settings. Check that the following command returns reasonable values:
211
212 ulimit -a
213
214To conserve memory you should have your compiler modules loaded into the
215Link Pack Area (LPA/ELPA) rather than in a link list or step lib.
216
217If the c89 compiler complains of syntax errors during the build of the
218Socket extension then be sure to fix the syntax error in the system
219header /usr/include/sys/socket.h.
220
221=head2 Testing Anomalies with Perl on OS/390
222
223The "make test" step runs a Perl Verification Procedure, usually before
224installation. You might encounter STDERR messages even during a successful
225run of "make test". Here is a guide to some of the more commonly seen
226anomalies:
227
228=over 4
229
230=item *
231
232A message of the form:
233
234 comp/cpp.............ERROR CBC3191 ./.301989890.c:1 The character $ is not a
235 valid C source character.
236 FSUM3065 The COMPILE step ended with return code 12.
237 FSUM3017 Could not compile .301989890.c. Correct the errors and try again.
238 ok
239
240indicates that the t/comp/cpp.t test of Perl's -P command line switch has
241passed but that the particular invocation of c89 -E in the cpp script does
242not suppress the C compiler check of source code validity.
243
244=item *
245
246A message of the form:
247
248 io/openpid...........CEE5210S The signal SIGHUP was received.
249 CEE5210S The signal SIGHUP was received.
250 CEE5210S The signal SIGHUP was received.
251 ok
252
253indicates that the t/io/openpid.t test of Perl has passed but done so
254with extraneous messages on stderr from CEE.
255
256=item *
257
258A message of the form:
259
260 lib/ftmp-security....File::Temp::_gettemp: Parent directory (/tmp/) is not safe
261 (sticky bit not set when world writable?) at lib/ftmp-security.t line 100
262 File::Temp::_gettemp: Parent directory (/tmp/) is not safe (sticky bit not
263 set when world writable?) at lib/ftmp-security.t line 100
264 ok
265
266indicates a problem with the permissions on your /tmp directory within the HFS.
267To correct that problem issue the command:
268
269 chmod a+t /tmp
270
271from an account with write access to the directory entry for /tmp.
272
273=item *
274
275Out of Memory!
276
277Recent perl test suite is quite memory hunrgy. In addition to the comments
278above on memory limitations it is also worth checking for _CEE_RUNOPTS
279in your environment. Perl now has (in miniperlmain.c) a C #pragma
280to set CEE run options, but the environment variable wins.
281
282The C code asks for:
283
284 #pragma runopts(HEAP(2M,500K,ANYWHERE,KEEP,8K,4K) STACK(,,ANY,) ALL31(ON))
285
286The important parts of that are the second argument (the increment) to HEAP,
287and allowing the stack to be "Above the (16M) line". If the heap
288increment is too small then when perl (for example loading unicode/Name.pl) tries
289to create a "big" (400K+) string it cannot fit in a single segment
290and you get "Out of Memory!" - even if there is still plenty of memory
291available.
292
293A related issue is use with perl's malloc. Perl's malloc uses C<sbrk()>
294to get memory, and C<sbrk()> is limited to the first allocation so in this
295case something like:
296
297 HEAP(8M,500K,ANYWHERE,KEEP,8K,4K)
298
299is needed to get through the test suite.
300
301
302=back
303
304=head2 Installation Anomalies with Perl on OS/390
305
306The installman script will try to run on OS/390. There will be fewer errors
307if you have a roff utility installed. You can obtain GNU groff from the
308Redbook SG24-5944-00 ftp site.
309
310=head2 Usage Hints for Perl on OS/390
311
312When using perl on OS/390 please keep in mind that the EBCDIC and ASCII
313character sets are different. See perlebcdic.pod for more on such character
314set issues. Perl builtin functions that may behave differently under
315EBCDIC are also mentioned in the perlport.pod document.
316
317Open Edition (UNIX System Services) from V2R8 onward does support
318#!/path/to/perl script invocation. There is a PTF available from
319IBM for V2R7 that will allow shell/kernel support for #!. USS
320releases prior to V2R7 did not support the #! means of script invocation.
321If you are running V2R6 or earlier then see:
322
323 head `whence perldoc`
324
325for an example of how to use the "eval exec" trick to ask the shell to
326have Perl run your scripts on those older releases of Unix System Services.
327
328If you are having trouble with square brackets then consider switching your
329rlogin or telnet client. Try to avoid older 3270 emulators and ISHELL for
330working with Perl on USS.
331
332=head2 Floating Point Anomalies with Perl on OS/390
333
334There appears to be a bug in the floating point implementation on S/390
335systems such that calling int() on the product of a number and a small
336magnitude number is not the same as calling int() on the quotient of
337that number and a large magnitude number. For example, in the following
338Perl code:
339
340 my $x = 100000.0;
341 my $y = int($x * 1e-5) * 1e5; # '0'
342 my $z = int($x / 1e+5) * 1e5; # '100000'
343 print "\$y is $y and \$z is $z\n"; # $y is 0 and $z is 100000
344
345Although one would expect the quantities $y and $z to be the same and equal
346to 100000 they will differ and instead will be 0 and 100000 respectively.
347
348The problem can be further examined in a roughly equivalent C program:
349
350 #include <stdio.h>
351 #include <math.h>
352 main()
353 {
354 double r1,r2;
355 double x = 100000.0;
356 double y = 0.0;
357 double z = 0.0;
358 x = 100000.0 * 1e-5;
359 r1 = modf (x,&y);
360 x = 100000.0 / 1e+5;
361 r2 = modf (x,&z);
362 printf("y is %e and z is %e\n",y*1e5,z*1e5);
363 /* y is 0.000000e+00 and z is 1.000000e+05 (with c89) */
364 }
365
366=head2 Modules and Extensions for Perl on OS/390
367
368Pure pure (that is non xs) modules may be installed via the usual:
369
370 perl Makefile.PL
371 make
372 make test
373 make install
374
375If you built perl with dynamic loading capability then that would also
376be the way to build xs based extensions. However, if you built perl with
377the default static linking you can still build xs based extensions for OS/390
378but you will need to follow the instructions in ExtUtils::MakeMaker for
379building statically linked perl binaries. In the simplest configurations
380building a static perl + xs extension boils down to:
381
382 perl Makefile.PL
383 make
384 make perl
385 make test
386 make install
387 make -f Makefile.aperl inst_perl MAP_TARGET=perl
388
389In most cases people have reported better results with GNU make rather
390than the system's /bin/make program, whether for plain modules or for
391xs based extensions.
392
393If the make process encounters trouble with either compilation or
394linking then try setting the _C89_CCMODE to 1. Assuming sh is your
395login shell then run:
396
397 export _C89_CCMODE=1
398
399If tcsh is your login shell then use the setenv command.
400
401=head1 AUTHORS
402
403David Fiander and Peter Prymmer with thanks to Dennis Longnecker
404and William Raffloer for valuable reports, LPAR and PTF feedback.
405Thanks to Mike MacIsaac and Egon Terwedow for SG24-5944-00.
406Thanks to Ignasi Roca for pointing out the floating point problems.
407Thanks to John Goodyear for dynamic loading help.
408
409=head1 SEE ALSO
410
411L<INSTALL>, L<perlport>, L<perlebcdic>, L<ExtUtils::MakeMaker>.
412
413 http://www-1.ibm.com/servers/eserver/zseries/zos/unix/bpxa1toy.html
414
415 http://www.redbooks.ibm.com/abstracts/sg245944.html
416
417 http://www-1.ibm.com/servers/eserver/zseries/zos/unix/bpxa1ty1.html#opensrc
418
419 http://www.xray.mpe.mpg.de/mailing-lists/perl-mvs/
420
421 http://publibz.boulder.ibm.com:80/cgi-bin/bookmgr_OS390/BOOKS/ceea3030/
422
423 http://publibz.boulder.ibm.com:80/cgi-bin/bookmgr_OS390/BOOKS/CBCUG030/
424
425=head2 Mailing list for Perl on OS/390
426
427If you are interested in the VM/ESA, z/OS (formerly known as OS/390)
428and POSIX-BC (BS2000) ports of Perl then see the perl-mvs mailing list.
429To subscribe, send an empty message to perl-mvs-subscribe@perl.org.
430
431See also:
432
433 http://lists.perl.org/showlist.cgi?name=perl-mvs
434
435There are web archives of the mailing list at:
436
437 http://www.xray.mpe.mpg.de/mailing-lists/perl-mvs/
438 http://archive.develooper.com/perl-mvs@perl.org/
439
440=head1 HISTORY
441
442This document was originally written by David Fiander for the 5.005
443release of Perl.
444
445This document was podified for the 5.005_03 release of Perl 11 March 1999.
446
447Updated 28 November 2001 for broken URLs.
448
449Updated 12 November 2000 for the 5.7.1 release of Perl.
450
451Updated 15 January 2001 for the 5.7.1 release of Perl.
452
453Updated 24 January 2001 to mention dynamic loading.
454
455Updated 12 March 2001 to mention //'SYS1.TCPPARMS(TCPDATA)'.
456
457=cut
458
459
README.os400
1If you read this file _as_is_, just ignore the funny characters you see.
2It is written in the POD format (see pod/perlpod.pod) which is specially
3designed to be readable as is.
4
5=head1 NAME
6
7README.os400 - Perl version 5 on OS/400
8
9=head1 DESCRIPTION
10
11This document describes various features of IBM's OS/400 operating
12system that will affect how Perl version 5 (hereafter just Perl) is
13compiled and/or runs.
14
15By far the easiest way to build Perl for OS/400 is to use the PASE
16(Portable Application Solutions Environment), for more information see
17http://www.iseries.ibm.com/developer/factory/pase/index.html
18This environment allows one to use AIX APIs while programming, and it
19provides a runtime that allows AIX binaries to execute directly on the
20PowerPC iSeries.
21
22=head2 Compiling Perl for OS/400 PASE
23
24The recommended way to build Perl for the OS/400 PASE is to build the
25Perl 5 source code (release 5.8.1 or later) under AIX.
26
27The trick is to give a special parameter to the Configure shell script
28when running it on AIX:
29
30 sh Configure -DPASE ...
31
32The default installation directory of Perl under PASE is /QOpenSys/perl.
33This can be modified if needed with Configure parameter -Dprefix=/some/dir.
34
35Starting from OS/400 V5R2 the IBM Visual Age compiler is supported
36on OS/400 PASE, so it is possible to build Perl natively on OS/400.
37The easier way, however, is to compile in AIX, as just described.
38
39If you don't want to install the compiled Perl in AIX into /QOpenSys
40(for packaging it before copying it to PASE), you can use a Configure
41parameter: -Dinstallprefix=/tmp/QOpenSys/perl. This will cause the
42"make install" to install everything into that directory, while the
43installed files still think they are (will be) in /QOpenSys/perl.
44
45If building natively on PASE, please do the build under the /QOpenSys
46directory, since Perl is happier when built on a case sensitive filesystem.
47
48=head2 Installing Perl in OS/400 PASE
49
50If you are compiling on AIX, simply do a "make install" on the AIX box.
51Once the install finishes, tar up the /QOpenSys/perl directory. Transfer
52the tarball to the OS/400 using FTP with the following commands:
53
54 > binary
55 > site namefmt 1
56 > put perl.tar /QOpenSys
57
58Once you have it on, simply bring up a PASE shell and extract the tarball.
59
60If you are compiling in PASE, then "make install" is the only thing you
61will need to do.
62
63The default path for perl binary is /QOpenSys/perl/bin/perl. You'll
64want to symlink /QOpenSys/usr/bin/perl to this file so you don't have
65to modify your path.
66
67=head2 Using Perl in OS/400 PASE
68
69Perl in PASE may be used in the same manner as you would use Perl on AIX.
70
71Scripts starting with #!/usr/bin/perl should work if you have
72/QOpenSys/usr/bin/perl symlinked to your perl binary. This will not
73work if you've done a setuid/setgid or have environment variable
74PASE_EXEC_QOPENSYS="N". If you have V5R1, you'll need to get the
75latest PTFs to have this feature. Scripts starting with
76#!/QOpenSys/perl/bin/perl should always work.
77
78=head2 Known Problems
79
80When compiling in PASE, there is no "oslevel" command. Therefore,
81you may want to create a script called "oslevel" that echoes the
82level of AIX that your version of PASE runtime supports. If you're
83unsure, consult your documentation or use "4.3.3.0".
84
85If you have test cases that fail, check for the existence of spool files.
86The test case may be trying to use a syscall that is not implemented
87in PASE. To avoid the SIGILL, try setting the PASE_SYSCALL_NOSIGILL
88environment variable or have a handler for the SIGILL. If you can
89compile programs for PASE, run the config script and edit config.sh
90when it gives you the option. If you want to remove fchdir(), which
91isn't implement in V5R1, simply change the line that says:
92
93d_fchdir='define'
94
95to
96
97d_fchdir='undef'
98
99and then compile Perl. The places where fchdir() is used have
100alternatives for systems that do not have fchdir() available.
101
102=head2 Perl on ILE
103
104There exists a port of Perl to the ILE environment. This port, however,
105is based quite an old release of Perl, Perl 5.00502 (August 1998).
106(As of July 2002 the latest release of Perl is 5.8.0, and even 5.6.1
107has been out since April 2001.) If you need to run Perl on ILE, though,
108you may need this older port: http://www.cpan.org/ports/#os400
109Note that any Perl release later than 5.00502 has not been ported to ILE.
110
111If you need to use Perl in the ILE environment, you may want to consider
112using Qp2RunPase() to call the PASE version of Perl.
113
114=head1 AUTHORS
115
116Jarkko Hietaniemi <jhi@iki.fi>
117Bryan Logan <bryanlog@us.ibm.com>
118David Larson <larson1@us.ibm.com>
119
120=cut
121
README.plan9
1If you read this file _as_is_, just ignore the funny characters you see.
2It is written in the POD format (see pod/perlpod.pod) which is specially
3designed to be readable as is.
4
5=head1 NAME
6
7perlplan9 - Plan 9-specific documentation for Perl
8
9=head1 DESCRIPTION
10
11These are a few notes describing features peculiar to
12Plan 9 Perl. As such, it is not intended to be a replacement
13for the rest of the Perl 5 documentation (which is both
14copious and excellent). If you have any questions to
15which you can't find answers in these man pages, contact
16Luther Huffman at lutherh@stratcom.com and we'll try to
17answer them.
18
19=head2 Invoking Perl
20
21Perl is invoked from the command line as described in
22L<perl>. Most perl scripts, however, do have a first line
23such as "#!/usr/local/bin/perl". This is known as a shebang
24(shell-bang) statement and tells the OS shell where to find
25the perl interpreter. In Plan 9 Perl this statement should be
26"#!/bin/perl" if you wish to be able to directly invoke the
27script by its name.
28 Alternatively, you may invoke perl with the command "Perl"
29instead of "perl". This will produce Acme-friendly error
30messages of the form "filename:18".
31
32Some scripts, usually identified with a *.PL extension, are
33self-configuring and are able to correctly create their own
34shebang path from config information located in Plan 9
35Perl. These you won't need to be worried about.
36
37=head2 What's in Plan 9 Perl
38
39Although Plan 9 Perl currently only provides static
40loading, it is built with a number of useful extensions.
41These include Opcode, FileHandle, Fcntl, and POSIX. Expect
42to see others (and DynaLoading!) in the future.
43
44=head2 What's not in Plan 9 Perl
45
46As mentioned previously, dynamic loading isn't currently
47available nor is MakeMaker. Both are high-priority items.
48
49=head2 Perl5 Functions not currently supported in Plan 9 Perl
50
51Some, such as C<chown> and C<umask> aren't provided
52because the concept does not exist within Plan 9. Others,
53such as some of the socket-related functions, simply
54haven't been written yet. Many in the latter category
55may be supported in the future.
56
57The functions not currently implemented include:
58
59 chown, chroot, dbmclose, dbmopen, getsockopt,
60 setsockopt, recvmsg, sendmsg, getnetbyname,
61 getnetbyaddr, getnetent, getprotoent, getservent,
62 sethostent, setnetent, setprotoent, setservent,
63 endservent, endnetent, endprotoent, umask
64
65There may be several other functions that have undefined
66behavior so this list shouldn't be considered complete.
67
68=head2 Signals in Plan 9 Perl
69
70For compatibility with perl scripts written for the Unix
71environment, Plan 9 Perl uses the POSIX signal emulation
72provided in Plan 9's ANSI POSIX Environment (APE). Signal stacking
73isn't supported. The signals provided are:
74
75 SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGABRT,
76 SIGFPE, SIGKILL, SIGSEGV, SIGPIPE, SIGPIPE, SIGALRM,
77 SIGTERM, SIGUSR1, SIGUSR2, SIGCHLD, SIGCONT,
78 SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU
79
80=head1 COMPILING AND INSTALLING PERL ON PLAN 9
81
82WELCOME to Plan 9 Perl, brave soul!
83
84 This is a preliminary alpha version of Plan 9 Perl. Still to be
85implemented are MakeMaker and DynaLoader. Many perl commands are
86missing or currently behave in an inscrutable manner. These gaps will,
87with perseverance and a modicum of luck, be remedied in the near
88future.To install this software:
89
901. Create the source directories and libraries for perl by running the
91plan9/setup.rc command (i.e., located in the plan9 subdirectory).
92Note: the setup routine assumes that you haven't dearchived these
93files into /sys/src/cmd/perl. After running setup.rc you may delete
94the copy of the source you originally detarred, as source code has now
95been installed in /sys/src/cmd/perl. If you plan on installing perl
96binaries for all architectures, run "setup.rc -a".
97
982. After making sure that you have adequate privileges to build system
99software, from /sys/src/cmd/perl/5.00301 (adjust version
100appropriately) run:
101
102 mk install
103
104If you wish to install perl versions for all architectures (68020,
105mips, sparc and 386) run:
106
107 mk installall
108
1093. Wait. The build process will take a *long* time because perl
110bootstraps itself. A 75MHz Pentium, 16MB RAM machine takes roughly 30
111minutes to build the distribution from scratch.
112
113=head2 Installing Perl Documentation on Plan 9
114
115This perl distribution comes with a tremendous amount of
116documentation. To add these to the built-in manuals that come with
117Plan 9, from /sys/src/cmd/perl/5.00301 (adjust version appropriately)
118run:
119
120 mk man
121
122To begin your reading, start with:
123
124 man perl
125
126This is a good introduction and will direct you towards other man
127pages that may interest you.
128
129(Note: "mk man" may produce some extraneous noise. Fear not.)
130
131=head1 BUGS
132
133"As many as there are grains of sand on all the beaches of the
134world . . ." - Carl Sagan
135
136=head1 Revision date
137
138This document was revised 09-October-1996 for Perl 5.003_7.
139
140=head1 AUTHOR
141
142Direct questions, comments, and the unlikely bug report (ahem) direct
143comments toward:
144
145Luther Huffman, lutherh@stratcom.com,
146Strategic Computer Solutions, Inc.
147
README.qnx
1If you read this file _as_is_, just ignore the funny characters you see.
2It is written in the POD format (see pod/perlpod.pod) which is specially
3designed to be readable as is.
4
5=head1 NAME
6
7README.qnx - Perl version 5 on QNX
8
9=head1 DESCRIPTION
10
11As of perl5.7.2 all tests pass under:
12
13 QNX 4.24G
14 Watcom 10.6 with Beta/970211.wcc.update.tar.F
15 socket3r.lib Nov21 1996.
16
17As of perl5.8.1 there is at least one test still failing.
18
19Some tests may complain under known circumstances.
20
21See below and hints/qnx.sh for more information.
22
23Under QNX 6.2.0 there are still a few tests which fail.
24See below and hints/qnx.sh for more information.
25
26=head2 Required Software for Compiling Perl on QNX4
27
28As with many unix ports, this one depends on a few "standard"
29unix utilities which are not necessarily standard for QNX4.
30
31=over 4
32
33=item /bin/sh
34
35This is used heavily by Configure and then by
36perl itself. QNX4's version is fine, but Configure
37will choke on the 16-bit version, so if you are
38running QNX 4.22, link /bin/sh to /bin32/ksh
39
40=item ar
41
42This is the standard unix library builder.
43We use wlib. With Watcom 10.6, when wlib is
44linked as "ar", it behaves like ar and all is
45fine. Under 9.5, a cover is required. One is
46included in ../qnx
47
48=item nm
49
50This is used (optionally) by configure to list
51the contents of libraries. I will generate
52a cover function on the fly in the UU directory.
53
54=item cpp
55
56Configure and perl need a way to invoke a C
57preprocessor. I have created a simple cover
58for cc which does the right thing. Without this,
59Configure will create its own wrapper which works,
60but it doesn't handle some of the command line arguments
61that perl will throw at it.
62
63=item make
64
65You really need GNU make to compile this. GNU make
66ships by default with QNX 4.23, but you can get it
67from quics for earlier versions.
68
69=back
70
71=head2 Outstanding Issues with Perl on QNX4
72
73There is no support for dynamically linked libraries in QNX4.
74
75If you wish to compile with the Socket extension, you need
76to have the TCP/IP toolkit, and you need to make sure that
77-lsocket locates the correct copy of socket3r.lib. Beware
78that the Watcom compiler ships with a stub version of
79socket3r.lib which has very little functionality. Also
80beware the order in which wlink searches directories for
81libraries. You may have /usr/lib/socket3r.lib pointing to
82the correct library, but wlink may pick up
83/usr/watcom/10.6/usr/lib/socket3r.lib instead. Make sure
84they both point to the correct library, that is,
85/usr/tcptk/current/usr/lib/socket3r.lib.
86
87The following tests may report errors under QNX4:
88
89ext/Cwd/Cwd.t will complain if `pwd` and cwd don't give
90the same results. cwd calls `fullpath -t`, so if you
91cd `fullpath -t` before running the test, it will
92pass.
93
94lib/File/Find/taint.t will complain if '.' is in your
95PATH. The PATH test is triggered because cwd calls
96`fullpath -t`.
97
98ext/IO/lib/IO/t/io_sock.t: Subtests 14 and 22 are skipped due to
99the fact that the functionality to read back the non-blocking
100status of a socket is not implemented in QNX's TCP/IP. This has
101been reported to QNX and it may work with later versions of
102TCP/IP.
103
104t/io/tell.t: Subtest 27 is failing. We are still investigating.
105
106=head2 QNX auxiliary files
107
108The files in the "qnx" directory are:
109
110=over 4
111
112=item qnx/ar
113
114A script that emulates the standard unix archive (aka library)
115utility. Under Watcom 10.6, ar is linked to wlib and provides the
116expected interface. With Watcom 9.5, a cover function is
117required. This one is fairly crude but has proved adequate for
118compiling perl.
119
120=item qnx/cpp
121
122A script that provides C preprocessing functionality. Configure can
123generate a similar cover, but it doesn't handle all the command-line
124options that perl throws at it. This might be reasonably placed in
125/usr/local/bin.
126
127=back
128
129=head2 Outstanding issues with perl under QNX6
130
131The following tests are still failing for Perl 5.8.1 under QNX 6.2.0:
132
133 op/sprintf.........................FAILED at test 91
134 lib/Benchmark......................FAILED at test 26
135
136This is due to a bug in the C library's printf routine.
137printf("'%e'", 0. ) produces '0.000000e+0', but ANSI requires
138'0.000000e+00'. QNX has acknowledged the bug.
139
140=head1 AUTHOR
141
142Norton T. Allen (allen@huarp.harvard.edu)
143
144
README.solaris
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see pod/perlpod.pod) which is
3specifically designed to be readable as is.
4
5=head1 NAME
6
7README.solaris - Perl version 5 on Solaris systems
8
9=head1 DESCRIPTION
10
11This document describes various features of Sun's Solaris operating system
12that will affect how Perl version 5 (hereafter just perl) is
13compiled and/or runs. Some issues relating to the older SunOS 4.x are
14also discussed, though they may be out of date.
15
16For the most part, everything should just work.
17
18Starting with Solaris 8, perl5.00503 (or higher) is supplied with the
19operating system, so you might not even need to build a newer version
20of perl at all. The Sun-supplied version is installed in /usr/perl5
21with /usr/bin/perl pointing to /usr/perl5/bin/perl. Do not disturb
22that installation unless you really know what you are doing. If you
23remove the perl supplied with the OS, you will render some bits of
24your system inoperable. If you wish to install a newer version of perl,
25install it under a different prefix from /usr/perl5. Common prefixes
26to use are /usr/local and /opt/perl.
27
28You may wish to put your version of perl in the PATH of all users by
29changing the link /usr/bin/perl. This is probably OK, as most perl
30scripts shipped with Solaris use an explicit path. (There are a few
31exceptions, such as /usr/bin/rpm2cpio and /etc/rcm/scripts/README, but
32these are also sufficiently generic that the actual version of perl
33probably doesn't matter too much.)
34
35Solaris ships with a range of Solaris-specific modules. If you choose
36to install your own version of perl you will find the source of many of
37these modules is available on CPAN under the Sun::Solaris:: namespace.
38
39Solaris may include two versions of perl, e.g. Solaris 9 includes
40both 5.005_03 and 5.6.1. This is to provide stability across Solaris
41releases, in cases where a later perl version has incompatibilities
42with the version included in the preceeding Solaris release. The
43default perl version will always be the most recent, and in general
44the old version will only be retained for one Solaris release. Note
45also that the default perl will NOT be configured to search for modules
46in the older version, again due to compatibility/stability concerns.
47As a consequence if you upgrade Solaris, you will have to
48rebuild/reinstall any additional CPAN modules that you installed for
49the previous Solaris version. See the CPAN manpage under 'autobundle'
50for a quick way of doing this.
51
52As an interim measure, you may either change the #! line of your
53scripts to specifically refer to the old perl version, e.g. on
54Solaris 9 use #!/usr/perl5/5.00503/bin/perl to use the perl version
55that was the default for Solaris 8, or if you have a large number of
56scripts it may be more convenient to make the old version of perl the
57default on your system. You can do this by changing the appropriate
58symlinks under /usr/perl5 as follows (example for Solaris 9):
59
60 # cd /usr/perl5
61 # rm bin man pod
62 # ln -s ./5.00503/bin
63 # ln -s ./5.00503/man
64 # ln -s ./5.00503/lib/pod
65 # rm /usr/bin/perl
66 # ln -s ../perl5/5.00503/bin/perl /usr/bin/perl
67
68In both cases this should only be considered to be a temporary
69measure - you should upgrade to the later version of perl as soon as
70is practicable.
71
72Note also that the perl command-line utilities (e.g. perldoc) and any
73that are added by modules that you install will be under
74/usr/perl5/bin, so that directory should be added to your PATH.
75
76=head2 Solaris Version Numbers.
77
78For consistency with common usage, perl's Configure script performs
79some minor manipulations on the operating system name and version
80number as reported by uname. Here's a partial translation table:
81
82 Sun: perl's Configure:
83 uname uname -r Name osname osvers
84 SunOS 4.1.3 Solaris 1.1 sunos 4.1.3
85 SunOS 5.6 Solaris 2.6 solaris 2.6
86 SunOS 5.8 Solaris 8 solaris 2.8
87 SunOS 5.9 Solaris 9 solaris 2.9
88 SunOS 5.10 Solaris 10 solaris 2.10
89
90The complete table can be found in the Sun Managers' FAQ
91L<ftp://ftp.cs.toronto.edu/pub/jdd/sunmanagers/faq> under
92"9.1) Which Sun models run which versions of SunOS?".
93
94=head1 RESOURCES
95
96There are many, many sources for Solaris information. A few of the
97important ones for perl:
98
99=over 4
100
101=item Solaris FAQ
102
103The Solaris FAQ is available at
104L<http://www.science.uva.nl/pub/solaris/solaris2.html>.
105
106The Sun Managers' FAQ is available at
107L<ftp://ftp.cs.toronto.edu/pub/jdd/sunmanagers/faq>
108
109=item Precompiled Binaries
110
111Precompiled binaries, links to many sites, and much, much more are
112available at L<http://www.sunfreeware.com/> and
113L<http://www.blastwave.org/>.
114
115=item Solaris Documentation
116
117All Solaris documentation is available on-line at L<http://docs.sun.com/>.
118
119=back
120
121=head1 SETTING UP
122
123=head2 File Extraction Problems on Solaris.
124
125Be sure to use a tar program compiled under Solaris (not SunOS 4.x)
126to extract the perl-5.x.x.tar.gz file. Do not use GNU tar compiled
127for SunOS4 on Solaris. (GNU tar compiled for Solaris should be fine.)
128When you run SunOS4 binaries on Solaris, the run-time system magically
129alters pathnames matching m#lib/locale# so that when tar tries to create
130lib/locale.pm, a file named lib/oldlocale.pm gets created instead.
131If you found this advice too late and used a SunOS4-compiled tar
132anyway, you must find the incorrectly renamed file and move it back
133to lib/locale.pm.
134
135=head2 Compiler and Related Tools on Solaris.
136
137You must use an ANSI C compiler to build perl. Perl can be compiled
138with either Sun's add-on C compiler or with gcc. The C compiler that
139shipped with SunOS4 will not do.
140
141=head3 Include /usr/ccs/bin/ in your PATH.
142
143Several tools needed to build perl are located in /usr/ccs/bin/: ar,
144as, ld, and make. Make sure that /usr/ccs/bin/ is in your PATH.
145
146You need to make sure the following packages are installed
147(this info is extracted from the Solaris FAQ):
148
149for tools (sccs, lex, yacc, make, nm, truss, ld, as): SUNWbtool,
150SUNWsprot, SUNWtoo
151
152for libraries & headers: SUNWhea, SUNWarc, SUNWlibm, SUNWlibms, SUNWdfbh,
153SUNWcg6h, SUNWxwinc, SUNWolinc
154
155for 64 bit development: SUNWarcx, SUNWbtoox, SUNWdplx, SUNWscpux,
156SUNWsprox, SUNWtoox, SUNWlmsx, SUNWlmx, SUNWlibCx
157
158If you are in doubt which package contains a file you are missing,
159try to find an installation that has that file. Then do a
160
161 $ grep /my/missing/file /var/sadm/install/contents
162
163This will display a line like this:
164
165/usr/include/sys/errno.h f none 0644 root bin 7471 37605 956241356 SUNWhea
166
167The last item listed (SUNWhea in this example) is the package you need.
168
169=head3 Avoid /usr/ucb/cc.
170
171You don't need to have /usr/ucb/ in your PATH to build perl. If you
172want /usr/ucb/ in your PATH anyway, make sure that /usr/ucb/ is NOT
173in your PATH before the directory containing the right C compiler.
174
175=head3 Sun's C Compiler
176
177If you use Sun's C compiler, make sure the correct directory
178(usually /opt/SUNWspro/bin/) is in your PATH (before /usr/ucb/).
179
180=head3 GCC
181
182If you use gcc, make sure your installation is recent and complete.
183perl versions since 5.6.0 build fine with gcc > 2.8.1 on Solaris >=
1842.6.
185
186You must Configure perl with
187
188 $ sh Configure -Dcc=gcc
189
190If you don't, you may experience strange build errors.
191
192If you have updated your Solaris version, you may also have to update
193your gcc. For example, if you are running Solaris 2.6 and your gcc is
194installed under /usr/local, check in /usr/local/lib/gcc-lib and make
195sure you have the appropriate directory, sparc-sun-solaris2.6/ or
196i386-pc-solaris2.6/. If gcc's directory is for a different version of
197Solaris than you are running, then you will need to rebuild gcc for
198your new version of Solaris.
199
200You can get a precompiled version of gcc from
201L<http://www.sunfreeware.com/> or L<http://www.blastwave.org/>. Make
202sure you pick up the package for your Solaris release.
203
204If you wish to use gcc to build add-on modules for use with the perl
205shipped with Solaris, you should use the Solaris::PerlGcc module
206which is available from CPAN. The perl shipped with Solaris
207is configured and built with the Sun compilers, and the compiler
208configuration information stored in Config.pm is therefore only
209relevant to the Sun compilers. The Solaris:PerlGcc module contains a
210replacement Config.pm that is correct for gcc - see the module for
211details.
212
213=head3 GNU as and GNU ld
214
215The following information applies to gcc version 2. Volunteers to
216update it as appropropriate for gcc version 3 would be appreciated.
217
218The versions of as and ld supplied with Solaris work fine for building
219perl. There is normally no need to install the GNU versions to
220compile perl.
221
222If you decide to ignore this advice and use the GNU versions anyway,
223then be sure that they are relatively recent. Versions newer than 2.7
224are apparently new enough. Older versions may have trouble with
225dynamic loading.
226
227If you wish to use GNU ld, then you need to pass it the -Wl,-E flag.
228The hints/solaris_2.sh file tries to do this automatically by setting
229the following Configure variables:
230
231 ccdlflags="$ccdlflags -Wl,-E"
232 lddlflags="$lddlflags -Wl,-E -G"
233
234However, over the years, changes in gcc, GNU ld, and Solaris ld have made
235it difficult to automatically detect which ld ultimately gets called.
236You may have to manually edit config.sh and add the -Wl,-E flags
237yourself, or else run Configure interactively and add the flags at the
238appropriate prompts.
239
240If your gcc is configured to use GNU as and ld but you want to use the
241Solaris ones instead to build perl, then you'll need to add
242-B/usr/ccs/bin/ to the gcc command line. One convenient way to do
243that is with
244
245 $ sh Configure -Dcc='gcc -B/usr/ccs/bin/'
246
247Note that the trailing slash is required. This will result in some
248harmless warnings as Configure is run:
249
250 gcc: file path prefix `/usr/ccs/bin/' never used
251
252These messages may safely be ignored.
253(Note that for a SunOS4 system, you must use -B/bin/ instead.)
254
255Alternatively, you can use the GCC_EXEC_PREFIX environment variable to
256ensure that Sun's as and ld are used. Consult your gcc documentation
257for further information on the -B option and the GCC_EXEC_PREFIX variable.
258
259=head3 Sun and GNU make
260
261The make under /usr/ccs/bin works fine for building perl. If you
262have the Sun C compilers, you will also have a parallel version of
263make (dmake). This works fine to build perl, but can sometimes cause
264problems when running 'make test' due to underspecified dependencies
265between the different test harness files. The same problem can also
266affect the building of some add-on modules, so in those cases either
267specify '-m serial' on the dmake command line, or use
268/usr/ccs/bin/make instead. If you wish to use GNU make, be sure that
269the set-group-id bit is not set. If it is, then arrange your PATH so
270that /usr/ccs/bin/make is before GNU make or else have the system
271administrator disable the set-group-id bit on GNU make.
272
273=head3 Avoid libucb.
274
275Solaris provides some BSD-compatibility functions in /usr/ucblib/libucb.a.
276Perl will not build and run correctly if linked against -lucb since it
277contains routines that are incompatible with the standard Solaris libc.
278Normally this is not a problem since the solaris hints file prevents
279Configure from even looking in /usr/ucblib for libraries, and also
280explicitly omits -lucb.
281
282=head2 Environment for Compiling perl on Solaris
283
284=head3 PATH
285
286Make sure your PATH includes the compiler (/opt/SUNWspro/bin/ if you're
287using Sun's compiler) as well as /usr/ccs/bin/ to pick up the other
288development tools (such as make, ar, as, and ld). Make sure your path
289either doesn't include /usr/ucb or that it includes it after the
290compiler and compiler tools and other standard Solaris directories.
291You definitely don't want /usr/ucb/cc.
292
293=head3 LD_LIBRARY_PATH
294
295If you have the LD_LIBRARY_PATH environment variable set, be sure that
296it does NOT include /lib or /usr/lib. If you will be building
297extensions that call third-party shared libraries (e.g. Berkeley DB)
298then make sure that your LD_LIBRARY_PATH environment variable includes
299the directory with that library (e.g. /usr/local/lib).
300
301If you get an error message
302
303 dlopen: stub interception failed
304
305it is probably because your LD_LIBRARY_PATH environment variable
306includes a directory which is a symlink to /usr/lib (such as /lib).
307The reason this causes a problem is quite subtle. The file
308libdl.so.1.0 actually *only* contains functions which generate 'stub
309interception failed' errors! The runtime linker intercepts links to
310"/usr/lib/libdl.so.1.0" and links in internal implementations of those
311functions instead. [Thanks to Tim Bunce for this explanation.]
312
313=head1 RUN CONFIGURE.
314
315See the INSTALL file for general information regarding Configure.
316Only Solaris-specific issues are discussed here. Usually, the
317defaults should be fine.
318
319=head2 64-bit perl on Solaris.
320
321See the INSTALL file for general information regarding 64-bit compiles.
322In general, the defaults should be fine for most people.
323
324By default, perl-5.6.0 (or later) is compiled as a 32-bit application
325with largefile and long-long support.
326
327=head3 General 32-bit vs. 64-bit issues.
328
329Solaris 7 and above will run in either 32 bit or 64 bit mode on SPARC
330CPUs, via a reboot. You can build 64 bit apps whilst running 32 bit
331mode and vice-versa. 32 bit apps will run under Solaris running in
332either 32 or 64 bit mode. 64 bit apps require Solaris to be running
33364 bit mode.
334
335Existing 32 bit apps are properly known as LP32, i.e. Longs and
336Pointers are 32 bit. 64-bit apps are more properly known as LP64.
337The discriminating feature of a LP64 bit app is its ability to utilise a
33864-bit address space. It is perfectly possible to have a LP32 bit app
339that supports both 64-bit integers (long long) and largefiles (> 2GB),
340and this is the default for perl-5.6.0.
341
342For a more complete explanation of 64-bit issues, see the
343"Solaris 64-bit Developer's Guide" at L<http://docs.sun.com/>
344
345You can detect the OS mode using "isainfo -v", e.g.
346
347 $ isainfo -v # Ultra 30 in 64 bit mode
348 64-bit sparcv9 applications
349 32-bit sparc applications
350
351By default, perl will be compiled as a 32-bit application. Unless
352you want to allocate more than ~ 4GB of memory inside perl, or unless
353you need more than 255 open file descriptors, you probably don't need
354perl to be a 64-bit app.
355
356=head3 Large File Support
357
358For Solaris 2.6 and onwards, there are two different ways for 32-bit
359applications to manipulate large files (files whose size is > 2GByte).
360(A 64-bit application automatically has largefile support built in
361by default.)
362
363First is the "transitional compilation environment", described in
364lfcompile64(5). According to the man page,
365
366 The transitional compilation environment exports all the
367 explicit 64-bit functions (xxx64()) and types in addition to
368 all the regular functions (xxx()) and types. Both xxx() and
369 xxx64() functions are available to the program source. A
370 32-bit application must use the xxx64() functions in order
371 to access large files. See the lf64(5) manual page for a
372 complete listing of the 64-bit transitional interfaces.
373
374The transitional compilation environment is obtained with the
375following compiler and linker flags:
376
377 getconf LFS64_CFLAGS -D_LARGEFILE64_SOURCE
378 getconf LFS64_LDFLAG # nothing special needed
379 getconf LFS64_LIBS # nothing special needed
380
381Second is the "large file compilation environment", described in
382lfcompile(5). According to the man page,
383
384 Each interface named xxx() that needs to access 64-bit entities
385 to access large files maps to a xxx64() call in the
386 resulting binary. All relevant data types are defined to be
387 of correct size (for example, off_t has a typedef definition
388 for a 64-bit entity).
389
390 An application compiled in this environment is able to use
391 the xxx() source interfaces to access both large and small
392 files, rather than having to explicitly utilize the transitional
393 xxx64() interface calls to access large files.
394
395Two exceptions are fseek() and ftell(). 32-bit applications should
396use fseeko(3C) and ftello(3C). These will get automatically mapped
397to fseeko64() and ftello64().
398
399The large file compilation environment is obtained with
400
401 getconf LFS_CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
402 getconf LFS_LDFLAGS # nothing special needed
403 getconf LFS_LIBS # nothing special needed
404
405By default, perl uses the large file compilation environment and
406relies on Solaris to do the underlying mapping of interfaces.
407
408=head3 Building an LP64 perl
409
410To compile a 64-bit application on an UltraSparc with a recent Sun Compiler,
411you need to use the flag "-xarch=v9". getconf(1) will tell you this, e.g.
412
413 $ getconf -a | grep v9
414 XBS5_LP64_OFF64_CFLAGS: -xarch=v9
415 XBS5_LP64_OFF64_LDFLAGS: -xarch=v9
416 XBS5_LP64_OFF64_LINTFLAGS: -xarch=v9
417 XBS5_LPBIG_OFFBIG_CFLAGS: -xarch=v9
418 XBS5_LPBIG_OFFBIG_LDFLAGS: -xarch=v9
419 XBS5_LPBIG_OFFBIG_LINTFLAGS: -xarch=v9
420 _XBS5_LP64_OFF64_CFLAGS: -xarch=v9
421 _XBS5_LP64_OFF64_LDFLAGS: -xarch=v9
422 _XBS5_LP64_OFF64_LINTFLAGS: -xarch=v9
423 _XBS5_LPBIG_OFFBIG_CFLAGS: -xarch=v9
424 _XBS5_LPBIG_OFFBIG_LDFLAGS: -xarch=v9
425 _XBS5_LPBIG_OFFBIG_LINTFLAGS: -xarch=v9
426
427This flag is supported in Sun WorkShop Compilers 5.0 and onwards
428(now marketed under the name Forte) when used on Solaris 7 or later on
429UltraSparc systems.
430
431If you are using gcc, you would need to use -mcpu=v9 -m64 instead. This
432option is not yet supported as of gcc 2.95.2; from install/SPECIFIC
433in that release:
434
435 GCC version 2.95 is not able to compile code correctly for sparc64
436 targets. Users of the Linux kernel, at least, can use the sparc32
437 program to start up a new shell invocation with an environment that
438 causes configure to recognize (via uname -a) the system as sparc-*-*
439 instead.
440
441All this should be handled automatically by the hints file, if
442requested.
443
444=head3 Long Doubles.
445
446As of 5.8.1, long doubles are working if you use the Sun compilers
447(needed for additional math routines not included in libm).
448
449=head2 Threads in perl on Solaris.
450
451It is possible to build a threaded version of perl on Solaris. The entire
452perl thread implementation is still experimental, however, so beware.
453
454=head2 Malloc Issues with perl on Solaris.
455
456Starting from perl 5.7.1 perl uses the Solaris malloc, since the perl
457malloc breaks when dealing with more than 2GB of memory, and the Solaris
458malloc also seems to be faster.
459
460If you for some reason (such as binary backward compatibility) really
461need to use perl's malloc, you can rebuild perl from the sources
462and Configure the build with
463
464 $ sh Configure -Dusemymalloc
465
466You should not use perl's malloc if you are building with gcc. There
467are reports of core dumps, especially in the PDL module. The problem
468appears to go away under -DDEBUGGING, so it has been difficult to
469track down. Sun's compiler appears to be okay with or without perl's
470malloc. [XXX further investigation is needed here.]
471
472=head1 MAKE PROBLEMS.
473
474=over 4
475
476=item Dynamic Loading Problems With GNU as and GNU ld
477
478If you have problems with dynamic loading using gcc on SunOS or
479Solaris, and you are using GNU as and GNU ld, see the section
480L<"GNU as and GNU ld"> above.
481
482=item ld.so.1: ./perl: fatal: relocation error:
483
484If you get this message on SunOS or Solaris, and you're using gcc,
485it's probably the GNU as or GNU ld problem in the previous item
486L<"GNU as and GNU ld">.
487
488=item dlopen: stub interception failed
489
490The primary cause of the 'dlopen: stub interception failed' message is
491that the LD_LIBRARY_PATH environment variable includes a directory
492which is a symlink to /usr/lib (such as /lib). See
493L<"LD_LIBRARY_PATH"> above.
494
495=item #error "No DATAMODEL_NATIVE specified"
496
497This is a common error when trying to build perl on Solaris 2.6 with a
498gcc installation from Solaris 2.5 or 2.5.1. The Solaris header files
499changed, so you need to update your gcc installation. You can either
500rerun the fixincludes script from gcc or take the opportunity to
501update your gcc installation.
502
503=item sh: ar: not found
504
505This is a message from your shell telling you that the command 'ar'
506was not found. You need to check your PATH environment variable to
507make sure that it includes the directory with the 'ar' command. This
508is a common problem on Solaris, where 'ar' is in the /usr/ccs/bin/
509directory.
510
511=back
512
513=head1 MAKE TEST
514
515=head2 op/stat.t test 4 in Solaris
516
517op/stat.t test 4 may fail if you are on a tmpfs of some sort.
518Building in /tmp sometimes shows this behavior. The
519test suite detects if you are building in /tmp, but it may not be able
520to catch all tmpfs situations.
521
522=head2 nss_delete core dump from op/pwent or op/grent
523
524See L<perlhpux/"nss_delete core dump from op/pwent or op/grent">.
525
526=head1 PREBUILT BINARIES OF PERL FOR SOLARIS.
527
528You can pick up prebuilt binaries for Solaris from
529L<http://www.sunfreeware.com/>, L<http://www.blastwave.org>,
530ActiveState L<http://www.activestate.com/>, and
531L<http://www.perl.com/> under the Binaries list at the top of the
532page. There are probably other sources as well. Please note that
533these sites are under the control of their respective owners, not the
534perl developers.
535
536=head1 RUNTIME ISSUES FOR PERL ON SOLARIS.
537
538=head2 Limits on Numbers of Open Files on Solaris.
539
540The stdio(3C) manpage notes that for LP32 applications, only 255
541files may be opened using fopen(), and only file descriptors 0
542through 255 can be used in a stream. Since perl calls open() and
543then fdopen(3C) with the resulting file descriptor, perl is limited
544to 255 simultaneous open files, even if sysopen() is used. If this
545proves to be an insurmountable problem, you can compile perl as a
546LP64 application, see L<Building an LP64 perl> for details. Note
547also that the default resource limit for open file descriptors on
548Solaris is 255, so you will have to modify your ulimit or rctl
549(Solaris 9 onwards) appropriately.
550
551=head1 SOLARIS-SPECIFIC MODULES.
552
553See the modules under the Solaris:: and Sun::Solaris namespaces on CPAN,
554see L<http://www.cpan.org/modules/by-module/Solaris/> and
555L<http://www.cpan.org/modules/by-module/Sun/>.
556
557=head1 SOLARIS-SPECIFIC PROBLEMS WITH MODULES.
558
559=head2 Proc::ProcessTable on Solaris
560
561Proc::ProcessTable does not compile on Solaris with perl5.6.0 and higher
562if you have LARGEFILES defined. Since largefile support is the
563default in 5.6.0 and later, you have to take special steps to use this
564module.
565
566The problem is that various structures visible via procfs use off_t,
567and if you compile with largefile support these change from 32 bits to
56864 bits. Thus what you get back from procfs doesn't match up with
569the structures in perl, resulting in garbage. See proc(4) for further
570discussion.
571
572A fix for Proc::ProcessTable is to edit Makefile to
573explicitly remove the largefile flags from the ones MakeMaker picks up
574from Config.pm. This will result in Proc::ProcessTable being built
575under the correct environment. Everything should then be OK as long as
576Proc::ProcessTable doesn't try to share off_t's with the rest of perl,
577or if it does they should be explicitly specified as off64_t.
578
579=head2 BSD::Resource on Solaris
580
581BSD::Resource versions earlier than 1.09 do not compile on Solaris
582with perl 5.6.0 and higher, for the same reasons as Proc::ProcessTable.
583BSD::Resource versions starting from 1.09 have a workaround for the problem.
584
585=head2 Net::SSLeay on Solaris
586
587Net::SSLeay requires a /dev/urandom to be present. This device is
588available from Solaris 9 onwards. For earlier Solaris versions you
589can either get the package SUNWski (packaged with several Sun
590software products, for example the Sun WebServer, which is part of
591the Solaris Server Intranet Extension, or the Sun Directory Services,
592part of Solaris for ISPs) or download the ANDIrand package from
593L<http://www.cosy.sbg.ac.at/~andi/>. If you use SUNWski, make a
594symbolic link /dev/urandom pointing to /dev/random. For more details,
595see Document ID27606 entitled "Differing /dev/random support requirements
596within Solaris[TM] Operating Environments", available at
597http://sunsolve.sun.com .
598
599It may be possible to use the Entropy Gathering Daemon (written in
600Perl!), available from L<http://www.lothar.com/tech/crypto/>.
601
602=head1 SunOS 4.x
603
604In SunOS 4.x you most probably want to use the SunOS ld, /usr/bin/ld,
605since the more recent versions of GNU ld (like 2.13) do not seem to
606work for building Perl anymore. When linking the extensions, the
607GNU ld gets very unhappy and spews a lot of errors like this
608
609 ... relocation truncated to fit: BASE13 ...
610
611and dies. Therefore the SunOS 4.1 hints file explicitly sets the
612ld to be /usr/bin/ld.
613
614As of Perl 5.8.1 the dynamic loading of libraries (DynaLoader, XSLoader)
615also seems to have become broken in in SunOS 4.x. Therefore the default
616is to build Perl statically.
617
618Running the test suite in SunOS 4.1 is a bit tricky since the
619F<lib/Tie/File/t/09_gen_rs> test hangs (subtest #51, FWIW) for some
620unknown reason. Just stop the test and kill that particular Perl
621process.
622
623There are various other failures, that as of SunOS 4.1.4 and gcc 3.2.2
624look a lot like gcc bugs. Many of the failures happen in the Encode
625tests, where for example when the test expects "0" you get "0"
626which should after a little squinting look very odd indeed.
627Another example is earlier in F<t/run/fresh_perl> where chr(0xff) is
628expected but the test fails because the result is chr(0xff). Exactly.
629
630This is the "make test" result from the said combination:
631
632 Failed 27 test scripts out of 745, 96.38% okay.
633
634Running the C<harness> is painful because of the many failing
635Unicode-related tests will output megabytes of failure messages,
636but if one patiently waits, one gets these results:
637
638 Failed Test Stat Wstat Total Fail Failed List of Failed
639 -----------------------------------------------------------------------------
640 ...
641 ../ext/Encode/t/at-cn.t 4 1024 29 4 13.79% 14-17
642 ../ext/Encode/t/at-tw.t 10 2560 17 10 58.82% 2 4 6 8 10 12
643 14-17
644 ../ext/Encode/t/enc_data.t 29 7424 ?? ?? % ??
645 ../ext/Encode/t/enc_eucjp.t 29 7424 ?? ?? % ??
646 ../ext/Encode/t/enc_module.t 29 7424 ?? ?? % ??
647 ../ext/Encode/t/encoding.t 29 7424 ?? ?? % ??
648 ../ext/Encode/t/grow.t 12 3072 24 12 50.00% 2 4 6 8 10 12 14
649 16 18 20 22 24
650 Failed Test Stat Wstat Total Fail Failed List of Failed
651 ------------------------------------------------------------------------------
652 ../ext/Encode/t/guess.t 255 65280 29 40 137.93% 10-29
653 ../ext/Encode/t/jperl.t 29 7424 15 30 200.00% 1-15
654 ../ext/Encode/t/mime-header.t 2 512 10 2 20.00% 2-3
655 ../ext/Encode/t/perlio.t 22 5632 38 22 57.89% 1-4 9-16 19-20
656 23-24 27-32
657 ../ext/List/Util/t/shuffle.t 0 139 ?? ?? % ??
658 ../ext/PerlIO/t/encoding.t 14 1 7.14% 11
659 ../ext/PerlIO/t/fallback.t 9 2 22.22% 3 5
660 ../ext/Socket/t/socketpair.t 0 2 45 70 155.56% 11-45
661 ../lib/CPAN/t/vcmp.t 30 1 3.33% 25
662 ../lib/Tie/File/t/09_gen_rs.t 0 15 ?? ?? % ??
663 ../lib/Unicode/Collate/t/test.t 199 30 15.08% 7 26-27 71-75
664 81-88 95 101
665 103-104 106 108-
666 109 122 124 161
667 169-172
668 ../lib/sort.t 0 139 119 26 21.85% 107-119
669 op/alarm.t 4 1 25.00% 4
670 op/utfhash.t 97 1 1.03% 31
671 run/fresh_perl.t 91 1 1.10% 32
672 uni/tr_7jis.t ?? ?? % ??
673 uni/tr_eucjp.t 29 7424 6 12 200.00% 1-6
674 uni/tr_sjis.t 29 7424 6 12 200.00% 1-6
675 56 tests and 467 subtests skipped.
676 Failed 27/811 test scripts, 96.67% okay. 1383/75399 subtests failed, 98.17% okay.
677
678The alarm() test failure is caused by system() apparently blocking
679alarm(). That is probably a libc bug, and given that SunOS 4.x
680has been end-of-lifed years ago, don't hold your breath for a fix.
681In addition to that, don't try anything too Unicode-y, especially
682with Encode, and you should be fine in SunOS 4.x.
683
684=head1 AUTHOR
685
686The original was written by Andy Dougherty F<doughera@lafayette.edu>
687drawing heavily on advice from Alan Burlison, Nick Ing-Simmons, Tim Bunce,
688and many other Solaris users over the years.
689
690Please report any errors, updates, or suggestions to F<perlbug@perl.org>.
691
README.tru64
1If you read this file _as_is_, just ignore the funny characters you see.
2It is written in the POD format (see pod/perlpod.pod) which is specially
3designed to be readable as is.
4
5=head1 NAME
6
7README.tru64 - Perl version 5 on Tru64 (formerly known as Digital UNIX formerly known as DEC OSF/1) systems
8
9=head1 DESCRIPTION
10
11This document describes various features of HP's (formerly Compaq's,
12formerly Digital's) Unix operating system (Tru64) that will affect
13how Perl version 5 (hereafter just Perl) is configured, compiled
14and/or runs.
15
16=head2 Compiling Perl 5 on Tru64
17
18The recommended compiler to use in Tru64 is the native C compiler.
19The native compiler produces much faster code (the speed difference is
20noticeable: several dozen percentages) and also more correct code: if
21you are considering using the GNU C compiler you should use at the
22very least the release of 2.95.3 since all older gcc releases are
23known to produce broken code when compiling Perl. One manifestation
24of this brokenness is the lib/sdbm test dumping core; another is many
25of the op/regexp and op/pat, or ext/Storable tests dumping core
26(the exact pattern of failures depending on the GCC release and
27optimization flags).
28
29gcc 3.2.1 is known to work okay with Perl 5.8.0. However, when
30optimizing the toke.c gcc likes to have a lot of memory, 256 megabytes
31seems to be enough. The default setting of the process data section
32in Tru64 should be one gigabyte, but some sites/setups might have
33lowered that. The configuration process of Perl checks for too low
34process limits, and lowers the optimization for the toke.c if
35necessary, and also gives advice on how to raise the process limits.
36
37=head2 Using Large Files with Perl on Tru64
38
39In Tru64 Perl is automatically able to use large files, that is,
40files larger than 2 gigabytes, there is no need to use the Configure
41-Duselargefiles option as described in INSTALL (though using the option
42is harmless).
43
44=head2 Threaded Perl on Tru64
45
46If you want to use threads, you should primarily use the new Perl
475.8.0 threads model by running Configure with -Duseithreads.
48
49The old Perl 5.005 threads is obsolete, unmaintained, and its use is
50discouraged. If you really want it, run Configure with the
51-Dusethreads -Duse5005threads options as described in INSTALL.
52
53Either thread model is going to work only in Tru64 4.0 and newer
54releases, older operating releases like 3.2 aren't probably going
55to work properly with threads.
56
57In Tru64 V5 (at least V5.1A, V5.1B) you cannot build threaded Perl with gcc
58because the system header <pthread.h> explicitly checks for supported
59C compilers, gcc (at least 3.2.2) not being one of them. But the
60system C compiler should work just fine.
61
62=head2 Long Doubles on Tru64
63
64You cannot Configure Perl to use long doubles unless you have at least
65Tru64 V5.0, the long double support simply wasn't functional enough
66before that. Perl's Configure will override attempts to use the long
67doubles (you can notice this by Configure finding out that the modfl()
68function does not work as it should).
69
70At the time of this writing (June 2002), there is a known bug in the
71Tru64 libc printing of long doubles when not using "e" notation.
72The values are correct and usable, but you only get a limited number
73of digits displayed unless you force the issue by using C<printf
74"%.33e",$num> or the like. For Tru64 versions V5.0A through V5.1A, a
75patch is expected sometime after perl 5.8.0 is released. If your libc
76has not yet been patched, you'll get a warning from Configure when
77selecting long doubles.
78
79=head2 DB_File tests failing on Tru64
80
81The DB_File tests (db-btree.t, db-hash.t, db-recno.t) may fail you
82have installed a newer version of Berkeley DB into the system and the
83-I and -L compiler and linker flags introduce version conflicts with
84the DB 1.85 headers and libraries that came with the Tru64. For example,
85mixing a DB v2 library with the DB v1 headers is a bad idea. Watch
86out for Configure options -Dlocincpth and -Dloclibpth, and check your
87/usr/local/include and /usr/local/lib since they are included by default.
88
89The second option is to explicitly instruct Configure to detect the
90newer Berkeley DB installation, by supplying the right directories with
91C<-Dlocincpth=/some/include> and C<-Dloclibpth=/some/lib> B<and> before
92running "make test" setting your LD_LIBRARY_PATH to F</some/lib>.
93
94The third option is to work around the problem by disabling the
95DB_File completely when build Perl by specifying -Ui_db to Configure,
96and then using the BerkeleyDB module from CPAN instead of DB_File.
97The BerkeleyDB works with Berkeley DB versions 2.* or greater.
98
99The Berkeley DB 4.1.25 has been tested with Tru64 V5.1A and found
100to work. The latest Berkeley DB can be found from F<http://www.sleepycat.com>.
101
102=head2 64-bit Perl on Tru64
103
104In Tru64 Perl's integers are automatically 64-bit wide, there is
105no need to use the Configure -Duse64bitint option as described
106in INSTALL. Similarly, there is no need for -Duse64bitall
107since pointers are automatically 64-bit wide.
108
109=head2 Warnings about floating-point overflow when compiling Perl on Tru64
110
111When compiling Perl in Tru64 you may (depending on the compiler
112release) see two warnings like this
113
114 cc: Warning: numeric.c, line 104: In this statement, floating-point overflow occurs in evaluating the expression "1.8e308". (floatoverfl)
115 return HUGE_VAL;
116 -----------^
117
118and when compiling the POSIX extension
119
120 cc: Warning: const-c.inc, line 2007: In this statement, floating-point overflow occurs in evaluating the expression "1.8e308". (floatoverfl)
121 return HUGE_VAL;
122 -------------------^
123
124The exact line numbers may vary between Perl releases. The warnings
125are benign and can be ignored: in later C compiler releases the warnings
126should be gone.
127
128When the file F<pp_sys.c> is being compiled you may (depending on the
129operating system release) see an additional compiler flag being used:
130C<-DNO_EFF_ONLY_OK>. This is normal and refers to a feature that is
131relevant only if you use the C<filetest> pragma. In older releases of
132the operating system the feature was broken and the NO_EFF_ONLY_OK
133instructs Perl not to use the feature.
134
135=head1 Testing Perl on Tru64
136
137During "make test" the C<comp/cpp> will be skipped because on Tru64 it
138cannot be tested before Perl has been installed. The test refers to
139the use of the C<-P> option of Perl.
140
141=head1 ext/ODBM_File/odbm Test Failing With Static Builds
142
143The ext/ODBM_File/odbm is known to fail with static builds
144(Configure -Uusedl) due to a known bug in Tru64's static libdbm
145library. The good news is that you very probably don't need to ever
146use the ODBM_File extension since more advanced NDBM_File works fine,
147not to mention the even more advanced DB_File.
148
149=head1 Perl Fails Because Of Unresolved Symbol sockatmark
150
151If you get an error like
152
153 Can't load '.../OSF1/lib/perl5/5.8.0/alpha-dec_osf/auto/IO/IO.so' for module IO: Unresolved symbol in .../lib/perl5/5.8.0/alpha-dec_osf/auto/IO/IO.so: sockatmark at .../lib/perl5/5.8.0/alpha-dec_osf/XSLoader.pm line 75.
154
155you need to either recompile your Perl in Tru64 4.0D or upgrade your
156Tru64 4.0D to at least 4.0F: the sockatmark() system call was
157added in Tru64 4.0F, and the IO extension refers that symbol.
158
159=head1 AUTHOR
160
161Jarkko Hietaniemi <jhi@iki.fi>
162
163=cut
164
README.tw
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see perlpod manpage) which is
3specially designed to be readable as is.
4
5The following documentation is written in Big5 encoding.
6
7�p�G�A�Τ@�몺��r�s�边�\���o�����, �Щ����夤�_�S�����O�r��.
8�o�����O�H POD (²�����榡) �g��; �o�خ榡�O���F�����H����Ū��,
9�ӯS�O�]�p��. ���榡���i�@�B��T, �аѦ� perlpod �u�W���.
10
11=head1 NAME
12
13perltw - ���餤�� Perl ���n
14
15=head1 DESCRIPTION
16
17�w��Ө� Perl ���Ѧa!
18
19�q 5.8.0 ���}�l, Perl ��ƤF������ Unicode (�U��X) �䴩,
20�]�s�a�䴩�F�\�h�ԤB�y�t�H�~���s�X�覡; CJK (������) �K�O�䤤���@����.
21Unicode �O��کʪ��з�, �չϲ[�\�@�ɤW�Ҧ����r��: ���@��, �F��@��,
22�H�Ψ�̶����@�� (��þ��, �ԧQ�Ȥ�, ���ԧB��, �ƧB�Ӥ�, �L�פ�,
23�L�a�w��, ����). ���]�e�ǤF�h�ا@�~�t�λP���O (�p PC �γ�����).
24
25Perl �����H Unicode �i��ާ@. �o��� Perl �������r���ƥi�� Unicode
26���; Perl ���禡�P��� (�Ҧp���W��ܦ����) �]��� Unicode �i��ާ@.
27�b��J�ο�X��, ���F�B�z�H Unicode ���e���s�X�覡�x�s�����, Perl
28���ѤF Encode �o�ӼҲ�, �i�H���A�����aŪ���μg�J�¦����s�X���.
29
30Encode �����Ҳդ䴩�U�C���餤�媺�s�X�覡 ('big5' ��� 'big5-eten'):
31
32 big5-eten Big5 �s�X (�t�ʤѩ����r��)
33 big5-hkscs Big5 + ����~�r��, 2001 �~��
34 cp950 �r�X�� 950 (Big5 + �L�n�K�[���r��)
35
36�|�Ҩӻ�, �N Big5 �s�X���ɮ��ন Unicode, ������J�U�C���O:
37
38 perl -Mencoding=big5,STDOUT,utf8 -pe1 < file.big5 > file.utf8
39
40Perl �]�����F "piconv", �@�䧹���H Perl �g�����r���ഫ�u��{��, �Ϊk�p�U:
41
42 piconv -f big5 -t utf8 < file.big5 > file.utf8
43 piconv -f utf8 -t big5 < file.utf8 > file.big5
44
45�t�~, �Q�� encoding �Ҳ�, �A�i�H�����g�X�H�r�Ŭ���쪺�{���X, �p�U�ҥ�:
46
47 #!/usr/bin/env perl
48 # �Ұ� big5 �r��ѪR; �зǿ�X�J�μзǿ��~���]�� big5 �s�X
49 use encoding 'big5', STDIN => 'big5', STDOUT => 'big5';
50 print length("�d�m"); # 2 (������ܦr��)
51 print length('�d�m'); # 4 (�����ܦ줸��)
52 print index("�ναл�", "να"); # -1 (���]�t���l�r��)
53 print index('�ναл�', 'να'); # 1 (�q�ĤG�Ӧ줸�ն}�l)
54
55�b�̫�@�C�Ҥl��, "��" ���ĤG�Ӧ줸�ջP "��" ���Ĥ@�Ӧ줸�յ��X�� Big5
56�X�� "ν"; "��" ���ĤG�Ӧ줸�իh�P "��" ���Ĥ@�Ӧ줸�յ��X�� "α".
57�o�ѨM�F�H�e Big5 �X���B�z�W�`�������D.
58
59=head2 �B�~������s�X
60
61�p�G�ݭn��h������s�X, �i�H�q CPAN (L<http://www.cpan.org/>) �U��
62Encode::HanExtra �Ҳ�. ���ثe���ѤU�C�s�X�覡:
63
64 cccii 1980 �~��ط|�������T�洫�X
65 euc-tw Unix �����r�Ŷ�, �]�t CNS11643 ���� 1-7
66 big5plus ����Ʀ�ƧN���s����|�� Big5+
67 big5ext ����Ʀ�ƧN���s����|�� Big5e
68
69�t�~, Encode::HanConvert �Ҳիh���ѤF²�c�ഫ�Ϊ���ؽs�X:
70
71 big5-simp Big5 ���餤��P Unicode ²�餤�夬��
72 gbk-trad GBK ²�餤��P Unicode ���餤�夬��
73
74�Y�Q�b GBK �P Big5 ��������, �аѦҸӼҲդ����� b2g.pl �P g2b.pl ���{��,
75�Φb�{�����ϥΤU�C�g�k:
76
77 use Encode::HanConvert;
78 $euc_cn = big5_to_gb($big5); # �q Big5 �ର GBK
79 $big5 = gb_to_big5($euc_cn); # �q GBK �ର Big5
80
81=head2 �i�@�B����T
82
83�аѦ� Perl �������j�q������� (�������O�έ^��g��), �ӾDzߧ�h����
84Perl ������, �H�� Unicode ���ϥΤ覡. ���L, �~�����귽�۷��״I:
85
86=head2 ���� Perl �귽�����}
87
88=over 4
89
90=item L<http://www.perl.com/>
91
92Perl ������ (�Ѽڵ�§���q���@)
93
94=item L<http://www.cpan.org/>
95
96Perl ��X���ú� (Comprehensive Perl Archive Network)
97
98=item L<http://lists.perl.org/>
99
100Perl �l���¤@��
101
102=back
103
104=head2 �Dz� Perl �����}
105
106=over 4
107
108=item L<http://www.oreilly.com.tw/chinese/perl/index.html>
109
110���餤�媩���ڵ�§ Perl ����
111
112=item L<http://groups.google.com/groups?q=tw.bbs.comp.lang.perl>
113
114�O�W Perl �s�u�Q�װ� (�]�N�O�U�j BBS �� Perl �s�u��)
115
116=back
117
118=head2 Perl �ϥΪ̶��|
119
120=over 4
121
122=item L<http://www.pm.org/groups/asia.shtml#Taiwan>
123
124�O�W Perl ���s�դ@��
125
126=item L<http://irc.elixus.org/>
127
128���ߨ�u�W��ѫ�
129
130=back
131
132=head2 Unicode �������}
133
134=over 4
135
136=item L<http://www.unicode.org/>
137
138Unicode �dzN�Ƿ| (Unicode �зǪ���w��)
139
140=item L<http://www.cl.cam.ac.uk/%7Emgk25/unicode.html>
141
142Unix/Linux �W�� UTF-8 �� Unicode ���Ȱ�
143
144=back
145
146=head2 ����Ƹ�T
147
148=over 4
149
150=item ������s "���餤��" ���s "�c�餤��"?
151
152L<http://www.csie.ntu.edu.tw/~b7506051/mozilla/faq.html#faqglossary>
153
154=item ����Ƴn���p��
155
156L<http://www.cpatch.org/>
157
158=item Linux �n�餤��ƭp��
159
160L<http://www.linux.org.tw/CLDP/>
161
162=back
163
164=head1 SEE ALSO
165
166L<Encode>, L<Encode::TW>, L<encoding>, L<perluniintro>, L<perlunicode>
167
168=head1 AUTHORS
169
170Jarkko Hietaniemi E<lt>jhi@iki.fiE<gt>
171
172Autrijus Tang (��v�~) E<lt>autrijus@autrijus.orgE<gt>
173
174=cut
175
README.uts
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see perlpod manpage) which is
3specially designed to be readable as is.
4
5=head1 NAME
6
7perluts - Perl under UTS
8
9=head1 SYNOPSIS
10
11This document can be read I<as is>: as F<README.uts>, or you
12can read it after you build your package using "man perluts".
13
14The purpose is to help you build Perl for UTS, which, if you
15follow these instructions, should be easy, and result in
16a solidly working installation.
17
18=head1 DESCRIPTION
19
20Perl 5.7.2 (Developmental) or Perl 5.8.x (forthcoming) for UTS
21
22=head1 BUILDING PERL ON UTS
23
24NOTE: Some sites have redefined the way uname works, and if yours
25does this, special steps must be taken so that Configure can
26recognize your system as a UTS system. To see if you are in
27this category, issue the command "uname -a". It should look
28something like:
29
30 uts juno 4 4.4 9672 370
31
32At any rate, the first field should be "uts". If this is not
33the case; supposing it is, say telcoUTS, create a script, uts/uname
34(i.e. uname, in the subdirectory "uts" of the main Perl source dir):
35 # uname
36 /usr/bin/uname "$@" | sed -e 's/^telcoUTS/uts/'
37
38and when you execute Configure, do it as below, except for adding
39PATH=uts:$PATH as a prefix. I.e. do:
40
41 PATH=uts:$PATH ./Configure ...
42
43There is no need to do an interactive configure, just type
44
45 ./Configure -de [-Dusedevel] [-Doptimize=-g ] 2>&1 | tee Conf.out
46
47"-Dusedevel" may be required to configure Perl 5.7.2 non-interactively.
48Use -Doptimize=-g if you want to run Perl under sdb or gdb, OR
49if you want to be able to use the -D command line flags to perl,
50which are occasionally useful in debugging perl scripts.
51
52In this and the following steps, the "2>&1 | tee XXX.out" records all
53output from the process, which will be useful if anything unexpected
54goes wrong.
55
56Then do the compilation with
57
58 make 2>&1 | tee make.out
59
60Finally, test using
61
62 make test 2>&1 | tee make-test.out
63
64In the output, the only failures you should see should look like:
65
66 lib/Math/BigInt/t/bigfltpm.........Use of uninitialized value ...
67 FAILED at test 57
68 lib/Math/BigInt/t/bigintc..........ok
69 lib/Math/BigInt/t/bigintpm.........FAILED at test 204
70 lib/Math/BigInt/t/mbimbf...........Use of uninitialized value ...
71 Illegal division by zero at ../lib/Math/BigInt/Calc.pm line 314.
72 FAILED at test 71
73 lib/Math/Complex...................exp: OVERFLOW
74 FAILED at test 250
75 lib/Math/Trig......................exp: OVERFLOW
76 ok
77 lib/Memoize/t/array................ok
78 ...
79 lib/Net/protoent...................ok
80 lib/Net/servent....................FAILED at test 0
81
82This means that everything passes except for some problems in the
83packages "Math::BigInt", "Math::Complex", and "Math::Trig".
84The lib/Net/servent failure seems to be a bug in the test
85program. To confirm this, from the main Perl source dir, do:
86
87 LD_LIBRARY_PATH=`pwd` ./perl -Ilib lib/Net/servent.t
88
89and it should output
90
91 1..3
92 ok 1
93 ok 2
94 ok 3
95
96=head1 Installing the built perl on UTS
97
98Run the command "make install"
99
100=head1 AUTHOR
101
102 Hal Morris
103 UTS Global LLC
104 email: hom00@utsglobal.com
105
106=cut
107
108
README.vmesa
1
2This document is written in pod format hence there are punctuation
3characters in odd places. Do not worry, you've apparently got
4the ASCII->EBCDIC translation worked out correctly. You can read
5more about pod in pod/perlpod.pod or the short summary in the
6INSTALL file.
7
8=head1 NAME
9
10README.vmesa - building and installing Perl for VM/ESA.
11
12=head1 SYNOPSIS
13
14This document will help you Configure, build, test and install Perl
15on VM/ESA.
16
17=head1 DESCRIPTION
18
19This is a fully ported perl for VM/ESA 2.3.0. It may work on
20other versions, but that's the one we've tested it on.
21
22If you've downloaded the binary distribution, it needs to be
23installed below /usr/local. Source code distributions have an
24automated "make install" step that means you do not need to extract
25the source code below /usr/local (though that is where it will be
26installed by default). You may need to worry about the networking
27configuration files discussed in the last bullet below.
28
29=head2 Unpacking Perl Distribution on VM/ESA
30
31To extract an ASCII tar archive on VM/ESA, try this:
32
33 pax -o to=IBM-1047,from=ISO8859-1 -r < latest.tar
34
35=head2 Setup Perl and utilities on VM/ESA
36
37GNU make for VM/ESA, which may be required for the build of perl,
38is available from:
39
40 http://vm.marist.edu/~neale/vmoe.html
41
42=head2 Configure Perl on VM/ESA
43
44Once you've unpacked the distribution, run Configure (see INSTALL for
45full discussion of the Configure options), and then run make, then
46"make test" then "make install" (this last step may require UID=0
47privileges).
48
49There is a "hints" file for vmesa that specifies the correct values
50for most things. Some things to watch out for are:
51
52=over 4
53
54=item *
55
56this port does support dynamic loading but it's not had much testing
57
58=item *
59
60Don't turn on the compiler optimization flag "-O". There's
61a bug in the compiler (APAR PQ18812) that generates some bad code
62the optimizer is on.
63
64=item *
65
66As VM/ESA doesn't fully support the fork() API programs relying on
67this call will not work. I've replaced fork()/exec() with spawn()
68and the standalone exec() with spawn(). This has a side effect when
69opening unnamed pipes in a shell script: there is no child process
70generated under.
71
72=item *
73
74At the moment the hints file for VM/ESA basically bypasses all of the
75automatic configuration process. This is because Configure relies on:
761. The header files living in the Byte File System (you could put the
77there if you want); 2. The C preprocessor including the #include
78statements in the preprocessor output (.i) file.
79
80=back
81
82=head2 Testing Anomalies of Perl on VM/ESA
83
84The "make test" step runs a Perl Verification Procedure, usually before
85installation. As the 5.6.1 kit was being assembled
86the following "failures" were known to appear on some machines
87during "make test" (mostly due to ASCII vs. EBCDIC conflicts),
88your results may differ:
89
90[the list of failures being compiled]
91
92=head2 Usage Hints for Perl on VM/ESA
93
94When using perl on VM/ESA please keep in mind that the EBCDIC and ASCII
95character sets are different. Perl builtin functions that may behave
96differently under EBCDIC are mentioned in the perlport.pod document.
97
98OpenEdition (UNIX System Services) does not (yet) support the #! means
99of script invocation.
100See:
101
102 head `whence perldoc`
103
104for an example of how to use the "eval exec" trick to ask the shell to
105have perl run your scripts for you.
106
107=head1 AUTHORS
108
109Neale Ferguson.
110
111=head1 SEE ALSO
112
113L<INSTALL>, L<perlport>, L<perlebcdic>.
114
115=head2 Mailing list for Perl on VM/ESA
116
117If you are interested in the VM/ESA, z/OS (formerly known as OS/390)
118and POSIX-BC (BS2000) ports of Perl then see the perl-mvs mailing list.
119To subscribe, send an empty message to perl-mvs-subscribe@perl.org.
120
121See also:
122
123 http://lists.perl.org/showlist.cgi?name=perl-mvs
124
125There are web archives of the mailing list at:
126
127 http://www.xray.mpe.mpg.de/mailing-lists/perl-mvs/
128 http://archive.develooper.com/perl-mvs@perl.org/
129
130=cut
131
132
README.vms
1If you read this file _as_is_, just ignore the equal signs on the left.
2This file is written in the POD format (see [.POD]PERLPOD.POD;1) which is
3specially designed to be readable as is.
4
5=head1 NAME
6
7README.vms - Configuring, building, testing, and installing perl on VMS
8
9=head1 SYNOPSIS
10
11To configure, build, test, and install perl on VMS:
12
13 @ Configure
14 mms
15 mms test
16 mms install
17
18mmk may be used in place of mms in the last three steps.
19
20=head1 DESCRIPTION
21
22=head2 Important safety tip
23
24The build and install procedures have changed significantly from the 5.004
25releases! Make sure you read the "Configuring the Perl Build", "Building
26Perl", and "Installing Perl" sections of this document before you build or
27install. Also please note other changes in the current release by having
28a look at L<perldelta/VMS>.
29
30Also note that, as of Perl version 5.005 and later, an ANSI C compliant
31compiler is required to build Perl. VAX C is *not* ANSI compliant, as it
32died a natural death some time before the standard was set. Therefore
33VAX C will not compile Perl 5.005 or later. We are sorry about that.
34
35If you are stuck without Compaq (formerly DEC) C consider trying Gnu C
36instead, though there have been no recent reports of builds using Gnu C.
37There is minimal support for Compaq C++ but this support is not complete;
38if you get it working please write to the vmsperl list (for info see
39L</"Mailing Lists">).
40
41
42=head2 Introduction to Perl on VMS
43
44The VMS port of Perl is as functionally complete as any other Perl port
45(and as complete as the ports on some Unix systems). The Perl binaries
46provide all the Perl system calls that are either available under VMS or
47reasonably emulated. There are some incompatibilities in process handling
48(e.g. the fork/exec model for creating subprocesses doesn't do what you
49might expect under Unix), mainly because VMS and Unix handle processes and
50sub-processes very differently.
51
52There are still some unimplemented system functions, and of course we
53could use modules implementing useful VMS system services, so if you'd like
54to lend a hand we'd love to have you. Join the Perl Porting Team Now!
55
56The current sources and build procedures have been tested on a VAX using
57DEC C, and on an AXP using DEC C. If you run into problems with
58other compilers, please let us know. (Note: DEC C was renamed to Compaq C
59around version 6.2).
60
61There are issues with various versions of DEC C, so if you're not running a
62relatively modern version, check the "DEC C issues" section later on in this
63document.
64
65=head2 Other required software for Compiling Perl on VMS
66
67In addition to VMS and DCL you will need two things:
68
69=over 4
70
71=item 1 A C compiler.
72
73DEC (now Compaq) C or gcc for VMS (AXP or VAX).
74
75=item 2 A make tool.
76
77DEC's MMS (v2.6 or later), or MadGoat's free MMS
78analog MMK (available from ftp.madgoat.com/madgoat) both work
79just fine. Gnu Make might work, but it's been so long since
80anyone's tested it that we're not sure. MMK is free though, so
81go ahead and use that.
82
83=back
84
85=head2 Additional software that is optional for Perl on VMS
86
87You may also want to have on hand:
88
89=over 4
90
91=item 1 GUNZIP/GZIP.EXE for VMS
92
93A de-compressor for *.gz and *.tgz files available from a number
94of web/ftp sites and is distributed on the OpenVMS Freeware CD-ROM
95from Compaq.
96
97 http://www.fsf.org/order/ftp.html
98 http://www.openvms.compaq.com/freeware/
99 http://www.crinoid.com/utils/
100
101=item 2 VMS TAR
102
103For reading and writing unix tape archives (*.tar files). Vmstar is also
104available from a number of web/ftp sites and is distributed on the OpenVMS
105Freeware CD-ROM from Compaq.
106
107 ftp://ftp.lp.se/vms/
108 http://www.openvms.compaq.com/freeware/
109
110Recent versions of VMS tar on ODS-5 volumes may extract tape archive
111files with ^. escaped periods in them. See below for further workarounds.
112
113=item 3 UNZIP.EXE for VMS
114
115A combination decompressor and archive reader/writer for *.zip files.
116Unzip is available from a number of web/ftp sites.
117
118 http://www.info-zip.org/UnZip.html
119 http://www.openvms.compaq.com/freeware/
120 ftp://ftp.openvms.compaq.com/
121 ftp://ftp.madgoat.com/madgoat/
122 ftp://ftp.process.com/vms-freeware/
123
124=item 4 MOST
125
126Most is an optional pager that is convenient to use with perldoc (unlike
127TYPE/PAGE, MOST can go forward and backwards in a document and supports
128regular expression searching). Most builds with the slang
129library on VMS. Most and slang are available from:
130
131 ftp://space.mit.edu/pub/davis/
132 ftp://ftp.process.com/vms-freeware/narnia/
133
134=item 5 GNU PATCH and DIFFUTILS for VMS
135
136Patches to Perl are usually distributed as GNU unified or contextual diffs.
137Such patches are created by the GNU diff program (part of the diffutils
138distribution) and applied with GNU patch. VMS ports of these utilities are
139available here:
140
141 http://www.crinoid.com/utils/
142 http://www.openvms.compaq.com/freeware/
143
144=back
145
146Please note that UNZIP and GUNZIP are not the same thing (they work with
147different formats). Many of the useful files from CPAN (the Comprehensive
148Perl Archive Network) are in *.tar.gz or *.tgz format (this includes copies
149of the source code for perl as well as modules and scripts that you may
150wish to add later) hence you probably want to have GUNZIP.EXE and
151VMSTAR.EXE on your VMS machine.
152
153If you want to include socket support, you'll need a TCP/IP stack and either
154DEC C, or socket libraries. See the "Socket Support (optional)" topic
155for more details.
156
157=head1 Unpacking the Perl source code
158
159You may need to set up a foreign symbol for the unpacking utility of choice.
160
161If you unpack a perl source kit with a name containing multiple periods on
162an ODS-5 volume using recent versions of vmstar (e.g. V3.4 or later) you may
163need to be especially careful in unpacking the tape archive file. Try to use
164the ODS-2 compatability qualifiers such as:
165
166 vmstar /extract/verbose/ods2 perl-V^.VIII^.III.tar
167
168or:
169
170 vmstar -xvof perl-5^.8^.8.tar
171
172If you neglected to use the /ODS2 qualifier or the -o switch then you
173could rename the source directory:
174
175 set security/protection=(o:rwed) perl-5^.8^.8.dir
176 rename perl-5^.8^.8.dir perl-5_8_8.dir
177
178Perl on VMS as of 5.8.8 does not completely handle extended file
179parse styles such as are encountered on ODS-5. While it can be built,
180installed, and run on ODS-5 filesystems; it may encounter
181trouble with characters that are otherwise illegal on ODS-2
182volumes (notably the ^. escaped period sequence).
183
184=head1 Configuring the Perl build
185
186To configure perl (a necessary first step), issue the command
187
188 @ Configure
189
190from the top of an unpacked perl source directory. You will be asked a
191series of questions, and the answers to them (along with the capabilities
192of your C compiler and network stack) will determine how perl is custom
193built for your machine.
194
195If you have multiple C compilers installed, you'll have your choice of
196which one to use. Various older versions of DEC C had some caveats, so if
197you're using a version older than 5.2, check the "DEC C Issues" section.
198
199If you have any symbols or logical names in your environment that may
200interfere with the build or regression testing of perl then configure.com
201will try to warn you about them. If a logical name is causing
202you trouble but is in an LNM table that you do not have write access to
203then try defining your own to a harmless equivalence string in a table
204such that it is resolved before the other (e.g. if TMP is defined in the
205SYSTEM table then try DEFINE TMP "NL:" or somesuch in your process table)
206otherwise simply deassign the dangerous logical names. The potentially
207troublesome logicals and symbols are:
208
209 COMP "LOGICAL"
210 EXT "LOGICAL"
211 FOO "LOGICAL"
212 LIB "LOGICAL"
213 LIST "LOGICAL"
214 MIME "LOGICAL"
215 POSIX "LOGICAL"
216 SYS "LOGICAL"
217 T "LOGICAL"
218 THREAD "LOGICAL"
219 THREADS "LOGICAL"
220 TIME "LOGICAL"
221 TMP "LOGICAL"
222 UNICODE "LOGICAL"
223 UTIL "LOGICAL"
224 TEST "SYMBOL"
225
226As a handy shortcut, the command:
227
228 @ Configure "-des"
229
230(note the quotation marks and case) will choose reasonable defaults
231automatically (it takes DEC C over Gnu C, DEC C sockets over SOCKETSHR
232sockets, and either over no sockets). Some options can be given
233explicitly on the command line; the following example specifies a
234non-default location for where Perl will be installed:
235
236 @ Configure "-d" "-Dprefix=dka100:[utils.perl5.]"
237
238Note that the installation location would be by default where you unpacked
239the source with a "_ROOT." appended. For example if you unpacked the perl
240source into:
241
242 DKA200:[PERL-5_10_2...]
243
244Then the PERL_SETUP.COM that gets written out by CONFIGURE.COM will
245try to DEFINE your installation PERL_ROOT to be:
246
247 DKA200:[PERL-5_10_2_ROOT.]
248
249More help with configure.com is available from:
250
251 @ Configure "-h"
252
253See the "Changing compile-time options (optional)" section below to learn
254even more details about how to influence the outcome of the important
255configuration step. If you find yourself reconfiguring and rebuilding
256then be sure to also follow the advice in the "Cleaning up and starting
257fresh (optional)" and the checklist of items in the "CAVEATS" sections
258below.
259
260=head2 Changing compile-time options (optional) for Perl on VMS
261
262Most of the user definable features of Perl are enabled or disabled in
263configure.com, which processes the hints file config_h.SH. There is
264code in there to Do The Right Thing, but that may end up being the
265wrong thing for you. Make sure you understand what you are doing since
266inappropriate changes to configure.com or config_h.SH can render perl
267unbuildable; odds are that there's nothing in there you'll need to
268change.
269
270The one exception is the various *DIR install locations. Changing those
271requires changes in genconfig.pl as well. Be really careful if you need to
272change these, as they can cause some fairly subtle problems.
273
274=head2 Socket Support (optional) for Perl on VMS
275
276Perl includes a number of functions for IP sockets, which are available if
277you choose to compile Perl with socket support. Since IP networking is an
278optional addition to VMS, there are several different IP stacks available.
279How well integrated they are into the system depends on the stack, your
280version of VMS, and the version of your C compiler.
281
282The most portable solution uses the SOCKETSHR library. In combination with
283either UCX or NetLib, this supports all the major TCP stacks (Multinet,
284Pathways, TCPWare, UCX, and CMU) on all versions of VMS Perl runs on, with
285all the compilers on both VAX and Alpha. The socket interface is also
286consistent across versions of VMS and C compilers. It has a problem with
287UDP sockets when used with Multinet, though, so you should be aware of
288that.
289
290The other solution available is to use the socket routines built into DEC
291C. Which routines are available depend on the version of VMS you're
292running, and require proper UCX emulation by your TCP/IP vendor.
293Relatively current versions of Multinet, TCPWare, Pathway, and UCX all
294provide the required libraries--check your manuals or release notes to see
295if your version is new enough.
296
297=head1 Building Perl
298
299The configuration script will print out, at the very end, the MMS or MMK
300command you need to compile perl. Issue it (exactly as printed) to start
301the build.
302
303Once you issue your MMS or MMK command, sit back and wait. Perl should
304compile and link without a problem. If a problem does occur check the
305"CAVEATS" section of this document. If that does not help send some
306mail to the VMSPERL mailing list. Instructions are in the "Mailing Lists"
307section of this document.
308
309=head1 Testing Perl
310
311Once Perl has built cleanly you need to test it to make sure things work.
312This step is very important since there are always things that can go wrong
313somehow and yield a dysfunctional Perl for you.
314
315Testing is very easy, though, as there's a full test suite in the perl
316distribution. To run the tests, enter the *exact* MMS line you used to
317compile Perl and add the word "test" to the end, like this:
318
319If the compile command was:
320
321 MMS
322
323then the test command ought to be:
324
325 MMS test
326
327MMS (or MMK) will run all the tests. This may take some time, as there are
328a lot of tests. If any tests fail, there will be a note made on-screen.
329At the end of all the tests, a summary of the tests, the number passed and
330failed, and the time taken will be displayed.
331
332The test driver invoked via MMS TEST has a DCL wrapper ([.VMS]TEST.COM) that
333downgrades privileges to NETMBX, TMPMBX for the duration of the test run,
334and then restores them to their prior state upon completion of testing.
335This is done to ensure that the tests run in a private sandbox and can do no
336harm to your system even in the unlikely event something goes badly wrong in
337one of the test scripts while running the tests from a privileged account.
338A side effect of this safety precaution is that the account used to run the
339test suite must be the owner of the directory tree in which Perl has been
340built; otherwise the manipulations of temporary files and directories
341attempted by some of the tests will fail.
342
343If any tests fail, it means something is wrong with Perl. If the test suite
344hangs (some tests can take upwards of two or three minutes, or more if
345you're on an especially slow machine, depending on your machine speed, so
346don't be hasty), then the test *after* the last one displayed failed. Don't
347install Perl unless you're confident that you're OK. Regardless of how
348confident you are, make a bug report to the VMSPerl mailing list.
349
350If one or more tests fail, you can get more information on the failure by
351issuing this command sequence:
352
353 @ [.VMS]TEST .typ "" "-v" [.subdir]test.T
354
355where ".typ" is the file type of the Perl images you just built (if you
356didn't do anything special, use .EXE), and "[.subdir]test.T" is the test
357that failed. For example, with a normal Perl build, if the test indicated
358that t/op/time failed, then you'd do this:
359
360 @ [.VMS]TEST .EXE "" "-v" [.OP]TIME.T
361
362Note that test names are reported in UNIX syntax and relative to the
363top-level build directory. When supplying them individually to the test
364driver, you can use either UNIX or VMS syntax, but you must give the path
365relative to the [.T] directory and you must also add the .T extension to the
366filename. So, for example if the test lib/Math/Trig fails, you would run:
367
368 @ [.VMS]TEST .EXE "" -"v" [-.lib.math]trig.t
369
370When you send in a bug report for failed tests, please include the output
371from this command, which is run from the main source directory:
372
373 MCR []MINIPERL "-V"
374
375Note that -"V" really is a capital V in double quotes. This will dump out a
376couple of screens worth of configuration information, and can help us
377diagnose the problem. If (and only if) that did not work then try enclosing
378the output of:
379
380 MMS printconfig
381
382If (and only if) that did not work then try enclosing the output of:
383
384 @ [.vms]myconfig
385
386You may also be asked to provide your C compiler version ("CC/VERSION NL:"
387with DEC C, "gcc --version" with GNU CC). To obtain the version of MMS or
388MMK you are running try "MMS/ident" or "MMK /ident". The GNU make version
389can be identified with "make --version".
390
391=head2 Cleaning up and starting fresh (optional) installing Perl on VMS
392
393If you need to recompile from scratch, you have to make sure you clean up
394first. There is a procedure to do it--enter the *exact* MMS line you used
395to compile and add "realclean" at the end, like this:
396
397if the compile command was:
398
399 MMS
400
401then the cleanup command ought to be:
402
403 MMS realclean
404
405If you do not do this things may behave erratically during the subsequent
406rebuild attempt. They might not, too, so it is best to be sure and do it.
407
408=head1 Installing Perl
409
410There are several steps you need to take to get Perl installed and
411running.
412
413=over 4
414
415=item 1
416
417Check your default file protections with
418
419 SHOW PROTECTION /DEFAULT
420
421and adjust if necessary with SET PROTECTION=(code)/DEFAULT.
422
423=item 2
424
425Decide where you want Perl to be installed (unless you have already done so
426by using the "prefix" configuration parameter -- see the example in the
427"Configuring the Perl build" section).
428
429The DCL script PERL_SETUP.COM that is written by CONFIGURE.COM will help you
430with the definition of the PERL_ROOT and PERLSHR logical names and the PERL
431foreign command symbol. Take a look at PERL_SETUP.COM and modify it if you
432want to. The installation process will execute PERL_SETUP.COM and copy
433files to the directory tree pointed to by the PERL_ROOT logical name defined
434there, so make sure that you have write access to the parent directory of
435what will become the root of your Perl installation.
436
437=item 3
438
439Run the install script via:
440
441 MMS install
442
443or
444
445 MMK install
446
447If for some reason it complains about target INSTALL being up to date,
448throw a /FORCE switch on the MMS or MMK command.
449
450=back
451
452Copy PERL_SETUP.COM to a place accessible to your perl users.
453
454For example:
455
456 COPY PERL_SETUP.COM SYS$LIBRARY:
457
458If you want to have everyone on the system have access to perl
459then add a line that reads
460
461 $ @sys$library:perl_setup
462
463to SYS$MANAGER:SYLOGIN.COM.
464
465Two alternatives to the foreign symbol would be to install PERL into
466DCLTABLES.EXE (Check out the section "Installing Perl into DCLTABLES
467(optional)" for more information), or put the image in a
468directory that's in your DCL$PATH (if you're using VMS V6.2 or higher).
469
470An alternative to having PERL_SETUP.COM define the PERLSHR logical name
471is to simply copy it into the system shareable library directory with:
472
473 copy perl_root:[000000]perlshr.exe sys$share:
474
475See also the "INSTALLing images (optional)" section.
476
477=head2 Installing Perl into DCLTABLES (optional) on VMS
478
479Execute the following command file to define PERL as a DCL command.
480You'll need CMKRNL privilege to install the new dcltables.exe.
481
482 $ create perl.cld
483 !
484 ! modify to reflect location of your perl.exe
485 !
486 define verb perl
487 image perl_root:[000000]perl.exe
488 cliflags (foreign)
489 $!
490 $ set command perl /table=sys$common:[syslib]dcltables.exe -
491 /output=sys$common:[syslib]dcltables.exe
492 $ install replace sys$common:[syslib]dcltables.exe
493 $ exit
494
495=head2 INSTALLing Perl images (optional) on VMS
496
497On systems that are using perl quite a bit, and particularly those with
498minimal RAM, you can boost the performance of perl by INSTALLing it as
499a known image. PERLSHR.EXE is typically larger than 3000 blocks
500and that is a reasonably large amount of IO to load each time perl is
501invoked.
502
503 INSTALL ADD PERLSHR/SHARE
504 INSTALL ADD PERL/HEADER
505
506should be enough for PERLSHR.EXE (/share implies /header and /open),
507while /HEADER should do for PERL.EXE (perl.exe is not a shared image).
508
509If your code 'use's modules, check to see if there is a shareable image for
510them, too. In the base perl build, POSIX, IO, Fcntl, Opcode, SDBM_File,
511DCLsym, and Stdio, and other extensions all have shared images that can be
512installed /SHARE.
513
514How much of a win depends on your memory situation, but if you are firing
515off perl with any regularity (like more than once every 20 seconds or so)
516it is probably beneficial to INSTALL at least portions of perl.
517
518While there is code in perl to remove privileges as it runs you are advised
519to NOT INSTALL PERL.EXE with PRIVs!
520
521=head2 Running h2ph to create perl header files (optional) on VMS
522
523If using DEC C or Compaq C ensure that you have extracted loose versions
524of your compiler's header or *.H files. Be sure to check the contents of:
525
526 SYS$LIBRARY:DECC$RTLDEF.TLB
527 SYS$LIBRARY:SYS$LIB_C.TLB
528 SYS$LIBRARY:SYS$STARLET_C.TLB
529
530etcetera.
531
532If using GNU cc then also check your GNU_CC:[000000...] tree for the locations
533of the GNU cc headers.
534
535=head1 Reporting Bugs
536
537If you come across what you think might be a bug in Perl, please report
538it. There's a script in PERL_ROOT:[UTILS], perlbug, that walks you through
539the process of creating a bug report. This script includes details of your
540installation, and is very handy. Completed bug reports should go to
541perlbug@perl.com.
542
543=head1 CAVEATS
544
545Probably the single biggest gotcha in compiling Perl is giving the wrong
546switches to MMS/MMK when you build. Use *exactly* what the configure.com
547script prints!
548
549The next big gotcha is directory depth. Perl can create directories four,
550five, or even six levels deep during the build, so you don't have to be
551too deep to start to hit the RMS 8 level limit (for ODS 2 volumes which were
552common on versions of VMS prior to V7.2 and even with V7.2 on the VAX).
553It is best to do:
554
555 DEFINE/TRANS=(CONC,TERM) PERLSRC "disk:[dir.dir.dir.perldir.]"
556 SET DEFAULT PERLSRC:[000000]
557
558before building in cases where you have to unpack the distribution so deep
559(note the trailing period in the definition of PERLSRC). Perl modules
560from CPAN can be just as bad (or worse), so watch out for them, too. Perl's
561configuration script will warn if it thinks you are too deep (at least on
562a VAX or on Alpha versions of VMS prior to 7.2). But MakeMaker will not
563warn you if you start out building a module too deep in a directory.
564
565As noted above ODS-5 escape sequences such as ^. can break the perl
566build. Solutions include renaming files and directories as needed or
567being careful to use the -o switch or /ODS2 qualifier with latter
568versions of the vmstar utility when unpacking perl or CPAN modules
569on ODS-5 volumes.
570
571Be sure that the process that you use to build perl has a PGFLQ greater
572than 100000. Be sure to have a correct local time zone to UTC offset
573defined (in seconds) in the logical name SYS$TIMEZONE_DIFFERENTIAL before
574running the regression test suite. The SYS$MANAGER:UTC$CONFIGURE_TDF.COM
575procedure will help you set that logical for your system but may require
576system privileges. For example, a location 5 hours west of UTC (such as
577the US East coast while not on daylight savings time) would have:
578
579 DEFINE SYS$TIMEZONE_DIFFERENTIAL "-18000"
580
581A final thing that causes trouble is leftover pieces from a failed
582build. If things go wrong make sure you do a "(MMK|MMS|make) realclean"
583before you rebuild.
584
585=head2 DEC C issues with Perl on VMS
586
587Note to DEC C users: Some early versions (pre-5.2, some pre-4. If you're DEC
588C 5.x or higher, with current patches if any, you're fine) of the DECCRTL
589contained a few bugs which affect Perl performance:
590
591=over 4
592
593=item - pipes
594
595Newlines are lost on I/O through pipes, causing lines to run together.
596This shows up as RMS RTB errors when reading from a pipe. You can
597work around this by having one process write data to a file, and
598then having the other read the file, instead of the pipe. This is
599fixed in version 4 of DEC C.
600
601=item - modf()
602
603The modf() routine returns a non-integral value for some values above
604INT_MAX; the Perl "int" operator will return a non-integral value in
605these cases. This is fixed in version 4 of DEC C.
606
607=item - ALPACRT ECO
608
609On the AXP, if SYSNAM privilege is enabled, the CRTL chdir() routine
610changes the process default device and directory permanently, even
611though the call specified that the change should not persist after
612Perl exited. This is fixed by DEC CSC patch ALPACRT04_061 or later.
613See also:
614
615 http://ftp.support.compaq.com/patches/.new/openvms.shtml
616
617=back
618
619Please note that in later versions "DEC C" may also be known as
620"Compaq C".
621
622=head2 GNU issues with Perl on VMS
623
624It has been a while since the GNU utilities such as GCC or GNU make
625were used to build perl on VMS. Hence they may require a great deal
626of source code modification to work again.
627
628 http://slacvx.slac.stanford.edu/HELP/GCC
629 http://www.progis.de/
630 http://www.lp.se/products/gnu.html
631
632=head2 Floating Point Considerations
633
634Prior to 5.8.0, Perl simply accepted the default floating point options of the
635C compiler, namely representing doubles with D_FLOAT on VAX and G_FLOAT on
636Alpha. Single precision floating point values are represented in F_FLOAT
637format when either D_FLOAT or G_FLOAT is in use for doubles. Beginning with
6385.8.0, Alpha builds now use IEEE floating point formats by default, which in
639VMS parlance are S_FLOAT for singles and T_FLOAT for doubles. IEEE is not
640available on VAX, so F_FLOAT and D_FLOAT remain the defaults for singles and
641doubles respectively. The available non-default options are G_FLOAT on VAX
642and D_FLOAT or G_FLOAT on Alpha.
643
644The use of IEEE on Alpha introduces NaN, infinity, and denormalization
645capabilities not available with D_FLOAT and G_FLOAT. When using one of those
646non-IEEE formats, silent underflow and overflow are emulated in the conversion
647of strings to numbers, but it is preferable to get the real thing by using
648IEEE where possible.
649
650Regardless of what floating point format you consider preferable, be aware
651that the choice may have an impact on compatibility with external libraries,
652such as database interfaces, and with existing data, such as data created with
653the C<pack> function and written to disk, or data stored via the Storable
654extension. For example, a C<pack("d", $foo)")> will create a D_FLOAT,
655G_FLOAT, or T_FLOAT depending on what your Perl was configured with. When
656written to disk, the value can only be retrieved later by a Perl configured
657with the same floating point option that was in effect when it was created.
658
659To obtain a non-IEEE build on Alpha, simply answer no to the "Use IEEE math?"
660question during the configuration. To obtain an option different from the C
661compiler default on either VAX or Alpha, put in the option that you want in
662answer to the "Any additional cc flags?" question. For example, to obtain a
663G_FLOAT build on VAX, put in C</FLOAT=G_FLOAT>.
664
665=head2 Multinet issues with Perl on VMS
666
667Prior to the release of Perl 5.8.0 it was noted that the regression
668test for lib/Net/hostent (in file [.lib.Net]hostent.t) will fail owing
669to problems with the hostent structure returned by C calls to either
670gethostbyname() or gethostbyaddr() using DEC or Compaq C with a
671Multinet TCP/IP stack. The problem was noted in Multinet 4.3A
672using either Compaq C 6.5 or DEC C 6.0, and with Multinet 4.2A
673using DEC C 5.2, but could easily affect other versions of Multinet.
674Process Software Inc. has acknowledged a bug in the Multinet version
675of UCX$IPC_SHR and has provided an ECO for it. The ECO is called
676UCX_LIBRARY_EMULATION-010_A044 and is available from:
677
678 http://www.multinet.process.com/eco.html
679
680As of this writing, the ECO is only available for Multinet versions
6814.3A and later. You may determine the version of Multinet that you
682are running using the command:
683
684 multinet show /version
685
686from the DCL command prompt.
687
688If the ECO is unavailable for your version of Multinet and you are
689unable to upgrade, you might try using Perl programming constructs
690such as:
691
692 $address = substr($gethostbyname_addr,0,4);
693
694to temporarily work around the problem, or if you are brave
695and do not mind the possibility of breaking IPv6 addresses,
696you might modify the pp_sys.c file to add an ad-hoc correction
697like so:
698
699
700 --- pp_sys.c;1 Thu May 30 14:42:17 2002
701 +++ pp_sys.c Thu May 30 12:54:02 2002
702 @@ -4684,6 +4684,10 @@
703 }
704 #endif
705
706 + if (hent) {
707 + hent->h_length = 4;
708 + }
709 +
710 if (GIMME != G_ARRAY) {
711 PUSHs(sv = sv_newmortal());
712 if (hent) {
713
714then re-compile and re-test your perl. After the installation
715of the Multinet ECO you ought to back out any such changes though.
716
717=head1 Mailing Lists
718
719There are several mailing lists available to the Perl porter. For VMS
720specific issues (including both Perl questions and installation problems)
721there is the VMSPERL mailing list. It is usually a low-volume (10-12
722messages a week) mailing list.
723
724To subscribe, send a mail message to VMSPERL-SUBSCRIBE@PERL.ORG. The VMSPERL
725mailing list address is VMSPERL@PERL.ORG. Any mail sent there gets echoed
726to all subscribers of the list. There is a searchable archive of the list
727on the web at:
728
729 http://www.xray.mpe.mpg.de/mailing-lists/vmsperl/
730
731To unsubscribe from VMSPERL send a message to VMSPERL-UNSUBSCRIBE@PERL.ORG.
732Be sure to do so from the subscribed account that you are canceling.
733
734=head2 Web sites for Perl on VMS
735
736Vmsperl pages on the web include:
737
738 http://www.sidhe.org/vmsperl/index.html
739 http://www.crinoid.com/
740 http://duphy4.physics.drexel.edu/pub/cgi_info.htmlx
741 http://www.cpan.org/modules/by-module/VMS/
742 http://www.xray.mpe.mpg.de/mailing-lists/vmsperl/
743 http://www.best.com/~pvhp/vms/
744 http://www-ang.kfunigraz.ac.at/~binder/perl.html
745 http://lists.perl.org/showlist.cgi?name=vmsperl
746 http://archive.develooper.com/vmsperl@perl.org/
747 http://www.openvms.compaq.com/openvms/products/ips/apache/csws_modperl.html
748
749=head1 SEE ALSO
750
751Perl information for users and programmers about the port of perl to VMS is
752available from the [.VMS]PERLVMS.POD file that gets installed as L<perlvms>.
753For administrators the perlvms document also includes a detailed discussion
754of extending vmsperl with CPAN modules after Perl has been installed.
755
756=head1 AUTHORS
757
758Revised 10-October-2001 by Craig Berry craigberry@mac.com.
759Revised 25-February-2000 by Peter Prymmer pvhp@best.com.
760Revised 27-October-1999 by Craig Berry craigberry@mac.com.
761Revised 01-March-1999 by Dan Sugalski dan@sidhe.org.
762Originally by Charles Bailey bailey@newman.upenn.edu.
763
764=head1 ACKNOWLEDGEMENTS
765
766A real big thanks needs to go to Charles Bailey
767bailey@newman.upenn.edu, who is ultimately responsible for Perl 5.004
768running on VMS. Without him, nothing the rest of us have done would be at
769all important.
770
771There are, of course, far too many people involved in the porting and testing
772of Perl to mention everyone who deserves it, so please forgive us if we've
773missed someone. That said, special thanks are due to the following:
774
775 Tim Adye T.J.Adye@rl.ac.uk
776 for the VMS emulations of getpw*()
777 David Denholm denholm@conmat.phys.soton.ac.uk
778 for extensive testing and provision of pipe and SocketShr code,
779 Mark Pizzolato mark@infocomm.com
780 for the getredirection() code
781 Rich Salz rsalz@bbn.com
782 for readdir() and related routines
783 Peter Prymmer pvhp@best.com
784 for extensive testing, as well as development work on
785 configuration and documentation for VMS Perl,
786 Dan Sugalski dan@sidhe.org
787 for extensive contributions to recent version support,
788 development of VMS-specific extensions, and dissemination
789 of information about VMS Perl,
790 the Stanford Synchrotron Radiation Laboratory and the
791 Laboratory of Nuclear Studies at Cornell University for
792 the opportunity to test and develop for the AXP,
793 John Hasstedt John.Hasstedt@sunysb.edu
794 for VAX VMS V7.2 support
795
796and to the entire VMSperl group for useful advice and suggestions. In
797addition the perl5-porters deserve credit for their creativity and
798willingness to work with the VMS newcomers. Finally, the greatest debt of
799gratitude is due to Larry Wall larry@wall.org, for having the ideas which
800have made our sleepless nights possible.
801
802Thanks,
803The VMSperl group
804
805=cut
806
807
README.vos
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see pod/perlpod.pod) which is
3specially designed to be readable as is.
4
5=head1 NAME
6
7README.vos - Perl for Stratus VOS
8
9=head1 SYNOPSIS
10
11This file contains notes for building perl on the Stratus VOS
12operating system. Perl is a scripting or macro language that is
13popular on many systems. See L<perlbook> for a number of good
14books on Perl.
15
16These are instructions for building Perl from source. Most people can
17simply download a pre-compiled distribution from the VOS anonymous FTP
18site. If you are running VOS Release 14.2.0 or earlier, download Perl
19from ftp://ftp.stratus.com/pub/vos/posix/alpha/alpha.html If you are
20running VOS Release 14.3.0 or later, download Perl from
21ftp://ftp.stratus.com/pub/vos/posix/ga/ga.html Instructions for
22unbundling the Perl distribution file are at
23ftp://ftp.stratus.com/pub/vos/utility/utility.html
24
25If you are running VOS Release 14.4.1 or later, you can obtain a
26pre-compiled, supported copy of perl by purchasing Release 2.0.1
27(or later) of the VOS GNU C++ and GNU Tools product from Stratus
28Technologies.
29
30=head2 Multiple methods to build perl for VOS
31
32If you elect to build perl from its source code, you have several
33different ways that you can build perl. The method that you use
34depends on the version of VOS that you are using and on the
35architecture of your Stratus hardware platform.
36
37=over 5
38
39=item 1
40
41If you have a Stratus XA2000 (Motorola 68k-based) platform, you
42must build perl using the alpha version of VOS POSIX support and
43using the VOS Standard C Cross-compiler. You must build perl on
44VOS Release 14.1.0 (or later) on an XA/R or Continuum platform.
45
46This version of perl is properly called "miniperl" because it
47does not contain the complete perl functionality.
48
49You must build perl with the compile_perl.cm command macro found
50in the vos subdirectory.
51
52=item 2
53
54If you have a Stratus XA/R (Intel i860-based) platform, you must
55build perl using the alpha version of VOS POSIX support and using
56the VOS Standard C compiler or cross-compiler. You must build
57perl on VOS Release 14.1.0 (or later) on an XA/R or Continuum
58platform.
59
60This version of perl is properly called "miniperl" because it
61does not contain the complete perl functionality.
62
63You must build perl with the compile_perl.cm command macro found
64in the vos subdirectory.
65
66=item 3
67
68If you have a Stratus Continuum (PA-RISC-based) platform that is
69running a version of VOS earlier than VOS 14.3.0, you must build
70perl using the alpha version of VOS POSIX support and using the
71VOS Standard C compiler or cross-compiler. You must build perl
72on VOS Release 14.1.0 (or later) on an XA/R or Continuum
73platform.
74
75This version of perl is properly called "miniperl" because it
76does not contain the complete perl functionality.
77
78You must build perl with the compile_perl.cm command macro found
79in the vos subdirectory.
80
81=item 4
82
83If you have a Stratus Continuum (PA-RISC-based) platform that is
84running VOS Release 14.3.0 through VOS Release 14.4.1, you must
85build perl using the generally-available version of VOS POSIX
86support, and using either the VOS Standard C compiler or the VOS
87GNU C compiler. You must build perl on VOS Release 14.3.0 (or
88later) on a Continuum platform.
89
90This version of perl is properly called "miniperl" because it
91does not contain the complete perl functionality.
92
93You must build perl with the compile_perl.cm command macro found
94in the vos subdirectory.
95
96=item 5
97
98If you have a Stratus Continuum (PA-RISC-based) platform that is
99running VOS Release 14.5.0 or later, you can either use the
100previous method to build "miniperl" or you can build "full
101perl", which contains the complete functionality of perl. I
102strongly recommend that you build full perl. To build full
103perl, you must use the generally-available version of VOS POSIX
104support. You must use the VOS GNU C compiler and the VOS GNU
105C/C++ and GNU Tools Release 2.0.1 (or later) product. You must
106build full perl on VOS Release 14.5.0 (or later) on a Continuum
107platform.
108
109You must build full perl with the compile_full_perl.cm command
110macro found in the vos subdirectory.
111
112=back
113
114=head2 Stratus POSIX Support
115
116Note that there are two different implementations of POSIX.1
117support on VOS. There is an alpha version of POSIX that is
118available from the Stratus anonymous ftp site
119( ftp://ftp.stratus.com/pub/vos/posix/alpha/alpha.html ). There
120is a generally-available version of POSIX that comes with VOS
121Release 14.3.0 or higher. This port of POSIX will compile and
122bind with either version of POSIX.
123
124Most of the Perl features should work on VOS regardless of which
125version of POSIX that you are using. However, the alpha version
126of POSIX is missing a number of key functions, and therefore any
127attempt by perl.pm to call the following unimplemented POSIX
128functions will result in an error message and an immediate and
129fatal call to the VOS debugger. They are "dup", "fork", and
130"waitpid". The lack of these functions prevents you from
131starting VOS commands and grabbing their output in perl. The
132workaround is to run the commands outside of perl, then have perl
133process the output file. These functions are all available in
134the generally-available version of POSIX.
135
136=head1 INSTALLING PERL IN VOS
137
138=head2 Compiling Perl 5 on VOS
139
140Before you can build Perl 5 on VOS, you need to have or acquire the
141following additional items.
142
143=over 5
144
145=item 1
146
147The VOS Standard C Compiler (or the VOS Standard C
148Cross-Compiler) and the VOS C Runtime. If you are using
149the generally-available version of POSIX support, you may
150instead use the VOS GNU C/C++ Compiler. These are
151standard Stratus products.
152
153=item 2
154
155Either the VOS OS TCP/IP or STCP product set. If you are
156building with the alpha version of POSIX you need the OS
157TCP/IP product set. If you are building with the
158generally-available version of POSIX you need the STCP
159product set. These are standard Stratus products.
160
161=item 3
162
163Either the alpha or generally-available version of the VOS
164POSIX.1 environment.
165
166The alpha version of POSIX.1 support is available on the
167Stratus FTP site. Login anonymously to ftp.stratus.com and
168get the file /pub/vos/posix/alpha/posix.save.evf.gz in
169binary file-transfer mode. Or use the Uniform Resource
170Locator (URL)
171ftp://ftp.stratus.com/pub/vos/posix/alpha/posix.save.evf.gz from
172your web browser. Instructions for unbundling this file
173are at ftp://ftp.stratus.com/pub/vos/utility/utility.html
174This is NOT a standard Stratus product.
175
176In VOS Release 14.3.0, the generally-available version of
177POSIX.1 support is bundled with the VOS Standard C compiler
178(or Standard C Cross-Compiler). In VOS Release 14.4.0 or
179higher, it is also bundled with the VOS C Runtime. These
180are standard Stratus products.
181
182=item 4
183
184You must compile this version of Perl 5 on VOS Release
18514.1.0 or higher because some of the perl source files
186contain more than 32,767 source lines. Due to VOS
187release-compatibility rules, this port of perl may not
188execute on VOS Release 12 or earlier.
189
190=item 5
191
192If you are using the generally-available version of VOS POSIX
193support, then you should also acquire the VOS GNU C/C++ Compiler
194and GNU Tools product. When perl is built with this version of
195POSIX support, it assumes that it can find "bash", "sed" and
196other POSIX-compatible commands in the directory
197/system/gnu_library/bin.
198
199=back
200
201To build perl using the supplied VOS command macros, change to
202the "vos" subdirectory and type the command "compile_perl
203-processor X", where X is the processor type (mc68020, i80860,
204pa7100, pa8000) that you wish to use. Note that the
205generally-available version of POSIX.1 support is not available
206for the mc68020 or i80860 processors.
207
208Use the "-version alpha" control argument to build perl with
209the alpha version of POSIX support, and use the "-version
210ga" control argument to build it with the
211generally-available version of POSIX. The default is "ga".
212
213Use the "-compiler cc" control argument to build perl with
214the VOS Standard C compiler. Use the "-compiler gcc"
215control argument to build it with the GNU GCC compiler. The
216default is "cc".
217
218You must have purchased the VOS Standard C Cross Compiler in
219order to compile perl for a processor type that is different
220from the processor type of the module.
221
222Note that code compiled for the pa7100 processor type can
223execute on the PA7100, PA8000, PA8500 and PA8600 processors, and
224that code compiled for the pa8000 processor type can execute on
225the PA8000, PA8500 and PA8600 processors.
226
227To build full perl using the supplied Configure script and
228makefiles, change to the "vos" subdirectory and type the command
229"compile_full_perl" or "start_process compile_full_perl". This
230will configure, build, and test perl.
231
232=head2 Installing Perl 5 on VOS
233
234=over 4
235
236=item 1
237
238If you have built perl using the Configure script, ensure that
239you have modify permission to C<< >system>ported >> and type
240
241 gmake install
242
243=item 2
244
245If you have built perl using any of the other methods, type
246
247 install_perl -processor PROCESSOR -name NAME
248
249where PROCESSOR is mc68020, i80860, pa7100, or pa8000, as
250appropriate, and NAME is perl or perl5, according to which name
251you wish to use.
252
253This command macro will install perl and all of its related
254files in the proper directories.
255
256=item 3
257
258While there are currently no architecture-specific
259extensions or modules distributed with perl, the following
260directories can be used to hold such files:
261
262 >system>ported>lib>perl5>5.8.0>68k
263 >system>ported>lib>perl5>5.8.0>860
264 >system>ported>lib>perl5>5.8.0>7100
265 >system>ported>lib>perl5>5.8.0>8000
266
267=item 4
268
269Site-specific perl extensions and modules can be installed in one of
270two places. Put architecture-independent files into:
271
272 >system>ported>lib>perl5>site_perl>5.8.0
273
274Put site-specific architecture-dependent files into one of the
275following directories:
276
277 >system>ported>lib>perl5>site_perl>5.8.0>68k
278 >system>ported>lib>perl5>site_perl>5.8.0>860
279 >system>ported>lib>perl5>site_perl>5.8.0>7100
280 >system>ported>lib>perl5>site_perl>5.8.0>8000
281
282=item 5
283
284You can examine the @INC variable from within a perl program
285to see the order in which Perl searches these directories.
286
287=back
288
289=head1 USING PERL IN VOS
290
291=head2 Unimplemented Features of Perl on VOS
292
293If perl is built with the alpha version of VOS POSIX.1 support
294and if it attempts to call an unimplemented VOS POSIX.1
295function, it will print a fatal error message and enter the VOS
296debugger. This error is not recoverable. See vos_dummies.c for
297a list of the unimplemented POSIX.1 functions. To see what
298functions are unimplemented and what the error message looks
299like, compile and execute "test_vos_dummies.c".
300
301=head2 Restrictions of Perl on VOS
302
303This port of Perl version 5 to VOS prefers Unix-style,
304slash-separated pathnames over VOS-style greater-than-separated
305pathnames. VOS-style pathnames should work in most contexts, but
306if you have trouble, replace all greater-than characters by slash
307characters. Because the slash character is used as a pathname
308delimiter, Perl cannot process VOS pathnames containing a slash
309character in a directory or file name; these must be renamed.
310
311This port of Perl also uses Unix-epoch date values internally.
312As long as you are dealing with ASCII character string
313representations of dates, this should not be an issue. The
314supported epoch is January 1, 1980 to January 17, 2038.
315
316See the file pod/perlport.pod for more information about the VOS
317port of Perl.
318
319=head2 Handling of underflow and overflow
320
321Prior to VOS Release 14.7.0, VOS does not support automatically
322mapping overflowed floating-point values to +infinity, nor
323automatically mapping underflowed floating-point values to zero,
324unlike many other platforms. The Perl pack function has been
325modified to perform such mapping in software on VOS. Performing
326other floating-point computations that underflow or overflow
327will probably result in SIGFPE. Don't push your luck.
328
329As of VOS Release 14.7.0, the VOS POSIX runtime sets up the
330PA-RISC hardware floating-point status register so that the
331overflow and underflow exceptions do not trap, but instead
332automatically convert the result to infinity or zero, as
333appropriate. As of this writing, there are still floating-point
334operations that can trap, for example, subtracting two infinite
335values. This is recorded as suggestion posix-1022, which is not
336yet fixed.
337
338=head1 TEST STATUS
339
340When Perl 5.8.3 is built using the native build process on VOS
341Release 14.7.0 and GNU C++/GNU Tools 2.0.2a, all but three
342attempted tests either pass or result in TODO (ignored)
343failures. The tests that fail are:
344
345t/io/tell.t, test 28
346t/op/pack.t, test 39
347lib/Net/ing/t/450_service.t, test 8
348
349=head1 SUPPORT STATUS
350
351I'm offering this port "as is". You can ask me questions, but I
352can't guarantee I'll be able to answer them. There are some
353excellent books available on the Perl language; consult a book
354seller.
355
356If you want a supported version of perl for VOS, purchase the
357VOS GNU C++ and GNU Tools Release 2.0.1 (or later) product from
358Stratus Technologies, along with a support contract (or from
359anyone else who will sell you support).
360
361=head1 AUTHOR
362
363Paul Green (Paul.Green@stratus.com)
364
365=head1 LAST UPDATE
366
367January 15, 2004
368
369=cut
370
README.win32
1If you read this file _as_is_, just ignore the funny characters you
2see. It is written in the POD format (see pod/perlpod.pod) which is
3specially designed to be readable as is.
4
5=head1 NAME
6
7perlwin32 - Perl under Windows
8
9=head1 SYNOPSIS
10
11These are instructions for building Perl under Windows 9x/NT/2000/XP
12on the Intel x86 and Itanium architectures.
13
14=head1 DESCRIPTION
15
16Before you start, you should glance through the README file
17found in the top-level directory to which the Perl distribution
18was extracted. Make sure you read and understand the terms under
19which this software is being distributed.
20
21Also make sure you read L<BUGS AND CAVEATS> below for the
22known limitations of this port.
23
24The INSTALL file in the perl top-level has much information that is
25only relevant to people building Perl on Unix-like systems. In
26particular, you can safely ignore any information that talks about
27"Configure".
28
29You may also want to look at two other options for building
30a perl that will work on Windows NT: the README.cygwin and
31README.os2 files, each of which give a different set of rules to
32build a Perl that will work on Win32 platforms. Those two methods
33will probably enable you to build a more Unix-compatible perl, but
34you will also need to download and use various other build-time and
35run-time support software described in those files.
36
37This set of instructions is meant to describe a so-called "native"
38port of Perl to Win32 platforms. This includes both 32-bit and
3964-bit Windows operating systems. The resulting Perl requires no
40additional software to run (other than what came with your operating
41system). Currently, this port is capable of using one of the
42following compilers on the Intel x86 architecture:
43
44 Borland C++ version 5.02 or later
45 Microsoft Visual C++ version 2.0 or later
46 MinGW with gcc gcc version 2.95.2 or later
47
48The last of these is a high quality freeware compiler. Use version
493.2.x or later for the best results with this compiler.
50
51The Borland C++ and Microsoft Visual C++ compilers are also now being given
52away free. The Borland compiler is available as "Borland C++ Compiler Free
53Command Line Tools" and is the same compiler that ships with the full
54"Borland C++ Builder" product. The Microsoft compiler is available as
55"Visual C++ Toolkit 2003", and also as part of the ".NET Framework SDK", and
56is the same compiler that ships with "Visual Studio .NET 2003 Professional".
57
58This port can also be built on the Intel IA64 using:
59
60 Microsoft Platform SDK Nov 2001 (64-bit compiler and tools)
61
62The MS Platform SDK can be downloaded from http://www.microsoft.com/.
63
64This port fully supports MakeMaker (the set of modules that
65is used to build extensions to perl). Therefore, you should be
66able to build and install most extensions found in the CPAN sites.
67See L<Usage Hints for Perl on Win32> below for general hints about this.
68
69=head2 Setting Up Perl on Win32
70
71=over 4
72
73=item Make
74
75You need a "make" program to build the sources. If you are using
76Visual C++ or the Platform SDK tools under Windows NT/2000/XP, nmake
77will work. All other builds need dmake.
78
79dmake is a freely available make that has very nice macro features
80and parallelability.
81
82A port of dmake for Windows is available from:
83
84 http://search.cpan.org/dist/dmake/
85
86Fetch and install dmake somewhere on your path.
87
88There exists a minor coexistence problem with dmake and Borland C++
89compilers. Namely, if a distribution has C files named with mixed
90case letters, they will be compiled into appropriate .obj-files named
91with all lowercase letters, and every time dmake is invoked
92to bring files up to date, it will try to recompile such files again.
93For example, Tk distribution has a lot of such files, resulting in
94needless recompiles every time dmake is invoked. To avoid this, you
95may use the script "sync_ext.pl" after a successful build. It is
96available in the win32 subdirectory of the Perl source distribution.
97
98=item Command Shell
99
100Use the default "cmd" shell that comes with NT. Some versions of the
101popular 4DOS/NT shell have incompatibilities that may cause you trouble.
102If the build fails under that shell, try building again with the cmd
103shell.
104
105The nmake Makefile also has known incompatibilities with the
106"command.com" shell that comes with Windows 9x. You will need to
107use dmake and makefile.mk to build under Windows 9x.
108
109The surest way to build it is on Windows NT/2000/XP, using the cmd shell.
110
111Make sure the path to the build directory does not contain spaces. The
112build usually works in this circumstance, but some tests will fail.
113
114=item Borland C++
115
116If you are using the Borland compiler, you will need dmake.
117(The make that Borland supplies is seriously crippled and will not
118work for MakeMaker builds.)
119
120See L</"Make"> above.
121
122=item Microsoft Visual C++
123
124The nmake that comes with Visual C++ will suffice for building.
125You will need to run the VCVARS32.BAT file, usually found somewhere
126like C:\MSDEV4.2\BIN or C:\Program Files\Microsoft Visual Studio\VC98\Bin.
127This will set your build environment.
128
129You can also use dmake to build using Visual C++; provided, however,
130you set OSRELEASE to "microsft" (or whatever the directory name
131under which the Visual C dmake configuration lives) in your environment
132and edit win32/config.vc to change "make=nmake" into "make=dmake". The
133latter step is only essential if you want to use dmake as your default
134make for building extensions using MakeMaker.
135
136=item Microsoft Visual C++ Toolkit 2003
137
138This free toolkit contains the same compiler and linker that ship with
139Visual Studio .NET 2003 Professional, but doesn't contain everything
140necessary to build Perl.
141
142You will also need to download the "Platform SDK" (the "Core SDK" and "MDAC
143SDK" components are required) for header files, libraries and rc.exe, and
144".NET Framework SDK" for more libraries and nmake.exe. Note that the latter
145(which also includes the free compiler and linker) requires the ".NET
146Framework Redistributable" to be installed first. This can be downloaded and
147installed separately, but is included in the "Visual C++ Toolkit 2003" anyway.
148
149These packages can all be downloaded by searching in the Download Center at
150http://www.microsoft.com/downloads/search.aspx?displaylang=en. (Providing exact
151links to these packages has proven a pointless task because the links keep on
152changing so often.)
153
154Try to obtain the latest version of the Platform SDK. Sometimes these packages
155contain a particular Windows OS version in their name, but actually work on
156other OS versions too. For example, the "Windows Server 2003 SP1 Platform SDK"
157also runs on Windows XP SP2 and Windows 2000.
158
159According to the download pages the Toolkit and the .NET Framework SDK are only
160supported on Windows 2000/XP/2003, so trying to use these tools on Windows
16195/98/ME and even Windows NT probably won't work.
162
163Install the Toolkit first, then the Platform SDK, then the .NET Framework SDK.
164Setup your environment as follows (assuming default installation locations
165were chosen):
166
167 SET PATH=%SystemRoot%\system32;%SystemRoot%;C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin;C:\Program Files\Microsoft SDK\Bin;C:\Program Files\Microsoft.NET\SDK\v1.1\Bin
168 SET INCLUDE=C:\Program Files\Microsoft Visual C++ Toolkit 2003\include;C:\Program Files\Microsoft SDK\include;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include
169 SET LIB=C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;C:\Program Files\Microsoft SDK\lib;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
170
171Several required files will still be missing:
172
173=over 4
174
175=item *
176
177cvtres.exe is required by link.exe when using a .res file. It is actually
178installed by the .NET Framework SDK, but into a location such as the
179following:
180
181 C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322
182
183Copy it from there to C:\Program Files\Microsoft SDK\Bin
184
185=item *
186
187lib.exe is normally used to build libraries, but link.exe with the /lib
188option also works, so change win32/config.vc to use it instead:
189
190Change the line reading:
191
192 ar='lib'
193
194to:
195
196 ar='link /lib'
197
198It may also be useful to create a batch file called lib.bat in
199C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin containing:
200
201 @echo off
202 link /lib %*
203
204for the benefit of any naughty C extension modules that you might want to build
205later which explicitly reference "lib" rather than taking their value from
206$Config{ar}.
207
208=item *
209
210setargv.obj is required to build perlglob.exe (and perl.exe if the USE_SETARGV
211option is enabled). The Platform SDK supplies this object file in source form
212in C:\Program Files\Microsoft SDK\src\crt. Copy setargv.c, cruntime.h and
213internal.h from there to some temporary location and build setargv.obj using
214
215 cl.exe /c /I. /D_CRTBLD setargv.c
216
217Then copy setargv.obj to C:\Program Files\Microsoft SDK\lib
218
219Alternatively, if you don't need perlglob.exe and don't need to enable the
220USE_SETARGV option then you can safely just remove all mention of $(GLOBEXE)
221from win32/Makefile and setargv.obj won't be required anyway.
222
223=back
224
225Perl should now build using the win32/Makefile. You will need to edit that
226file to set
227
228 CCTYPE = MSVC70FREE
229
230and to set CCHOME, CCINCDIR and CCLIBDIR as per the environment setup above.
231
232=item Microsoft Platform SDK 64-bit Compiler
233
234The nmake that comes with the Platform SDK will suffice for building
235Perl. Make sure you are building within one of the "Build Environment"
236shells available after you install the Platform SDK from the Start Menu.
237
238=item MinGW release 3 with gcc
239
240The latest release of MinGW at the time of writing is 3.1.0, which contains
241gcc-3.2.3. It can be downloaded here:
242
243 http://www.mingw.org/
244
245Perl also compiles with earlier releases of gcc (2.95.2 and up). See below
246for notes about using earlier versions of MinGW/gcc.
247
248You also need dmake. See L</"Make"> above on how to get it.
249
250=item MinGW release 1 with gcc
251
252The MinGW-1.1 bundle contains gcc-2.95.3.
253
254Make sure you install the binaries that work with MSVCRT.DLL as indicated
255in the README for the GCC bundle. You may need to set up a few environment
256variables (usually ran from a batch file).
257
258There are a couple of problems with the version of gcc-2.95.2-msvcrt.exe
259released 7 November 1999:
260
261=over
262
263=item *
264
265It left out a fix for certain command line quotes. To fix this, be sure
266to download and install the file fixes/quote-fix-msvcrt.exe from the above
267ftp location.
268
269=item *
270
271The definition of the fpos_t type in stdio.h may be wrong. If your
272stdio.h has this problem, you will see an exception when running the
273test t/lib/io_xs.t. To fix this, change the typedef for fpos_t from
274"long" to "long long" in the file i386-mingw32msvc/include/stdio.h,
275and rebuild.
276
277=back
278
279A potentially simpler to install (but probably soon-to-be-outdated) bundle
280of the above package with the mentioned fixes already applied is available
281here:
282
283 http://downloads.ActiveState.com/pub/staff/gsar/gcc-2.95.2-msvcrt.zip
284 ftp://ftp.ActiveState.com/pub/staff/gsar/gcc-2.95.2-msvcrt.zip
285
286=back
287
288=head2 Building
289
290=over 4
291
292=item *
293
294Make sure you are in the "win32" subdirectory under the perl toplevel.
295This directory contains a "Makefile" that will work with
296versions of nmake that come with Visual C++ or the Platform SDK, and
297a dmake "makefile.mk" that will work for all supported compilers. The
298defaults in the dmake makefile are setup to build using MinGW/gcc.
299
300=item *
301
302Edit the makefile.mk (or Makefile, if you're using nmake) and change
303the values of INST_DRV and INST_TOP. You can also enable various
304build flags. These are explained in the makefiles.
305
306Note that it is generally not a good idea to try to build a perl with
307INST_DRV and INST_TOP set to a path that already exists from a previous
308build. In particular, this may cause problems with the
309lib/ExtUtils/t/Embed.t test, which attempts to build a test program and
310may end up building against the installed perl's lib/CORE directory rather
311than the one being tested.
312
313You will have to make sure that CCTYPE is set correctly and that
314CCHOME points to wherever you installed your compiler.
315
316The default value for CCHOME in the makefiles for Visual C++
317may not be correct for some versions. Make sure the default exists
318and is valid.
319
320You may also need to comment out the C<DELAYLOAD = ...> line in the
321Makefile if you're using VC++ 6.0 without the latest service pack and
322the linker reports an internal error.
323
324If you have either the source or a library that contains des_fcrypt(),
325enable the appropriate option in the makefile. A ready-to-use version
326of fcrypt.c, based on the version originally written by Eric Young at
327ftp://ftp.funet.fi/pub/crypt/mirrors/dsi/libdes/, is bundled with the
328distribution and CRYPT_SRC is set to use it.
329Alternatively, if you have built a library that contains des_fcrypt(),
330you can set CRYPT_LIB to point to the library name.
331Perl will also build without des_fcrypt(), but the crypt() builtin will
332fail at run time.
333
334If you want build some core extensions statically into perl's dll, specify
335them in the STATIC_EXT macro.
336
337Be sure to read the instructions near the top of the makefiles carefully.
338
339=item *
340
341Type "dmake" (or "nmake" if you are using that make).
342
343This should build everything. Specifically, it will create perl.exe,
344perl58.dll at the perl toplevel, and various other extension dll's
345under the lib\auto directory. If the build fails for any reason, make
346sure you have done the previous steps correctly.
347
348=back
349
350=head2 Testing Perl on Win32
351
352Type "dmake test" (or "nmake test"). This will run most of the tests from
353the testsuite (many tests will be skipped).
354
355There should be no test failures when running under Windows NT/2000/XP.
356Many tests I<will> fail under Windows 9x due to the inferior command shell.
357
358Some test failures may occur if you use a command shell other than the
359native "cmd.exe", or if you are building from a path that contains
360spaces. So don't do that.
361
362If you are running the tests from a emacs shell window, you may see
363failures in op/stat.t. Run "dmake test-notty" in that case.
364
365If you're using the Borland compiler, you may see a failure in op/taint.t
366arising from the inability to find the Borland Runtime DLLs on the system
367default path. You will need to copy the DLLs reported by the messages
368from where Borland chose to install it, into the Windows system directory
369(usually somewhere like C:\WINNT\SYSTEM32) and rerun the test.
370
371If you're using Borland compiler versions 5.2 and below, you may run into
372problems finding the correct header files when building extensions. For
373example, building the "Tk" extension may fail because both perl and Tk
374contain a header file called "patchlevel.h". The latest Borland compiler
375(v5.5) is free of this misbehaviour, and it even supports an
376option -VI- for backward (bugward) compatibility for using the old Borland
377search algorithm to locate header files.
378
379If you run the tests on a FAT partition, you may see some failures for
380C<link()> related tests:
381
382 Failed Test Stat Wstat Total Fail Failed List
383
384 ../ext/IO/lib/IO/t/io_dup.t 6 4 66.67% 2-5
385 ../lib/File/Temp/t/mktemp.t 9 1 11.11% 2
386 ../lib/File/Temp/t/posix.t 7 1 14.29% 3
387 ../lib/File/Temp/t/security.t 13 1 7.69% 2
388 ../lib/File/Temp/t/tempfile.t 20 2 10.00% 2 4
389 comp/multiline.t 6 2 33.33% 5-6
390 io/dup.t 8 6 75.00% 2-7
391 op/write.t 47 7 14.89% 1-3 6 9-11
392
393Testing on NTFS avoids these errors.
394
395Furthermore, you should make sure that during C<make test> you do not
396have any GNU tool packages in your path: some toolkits like Unixutils
397include some tools (C<type> for instance) which override the Windows
398ones and makes tests fail. Remove them from your path while testing to
399avoid these errors.
400
401Please report any other failures as described under L<BUGS AND CAVEATS>.
402
403=head2 Installation of Perl on Win32
404
405Type "dmake install" (or "nmake install"). This will put the newly
406built perl and the libraries under whatever C<INST_TOP> points to in the
407Makefile. It will also install the pod documentation under
408C<$INST_TOP\$INST_VER\lib\pod> and HTML versions of the same under
409C<$INST_TOP\$INST_VER\lib\pod\html>.
410
411To use the Perl you just installed you will need to add a new entry to
412your PATH environment variable: C<$INST_TOP\bin>, e.g.
413
414 set PATH=c:\perl\bin;%PATH%
415
416If you opted to uncomment C<INST_VER> and C<INST_ARCH> in the makefile
417then the installation structure is a little more complicated and you will
418need to add two new PATH components instead: C<$INST_TOP\$INST_VER\bin> and
419C<$INST_TOP\$INST_VER\bin\$ARCHNAME>, e.g.
420
421 set PATH=c:\perl\5.6.0\bin;c:\perl\5.6.0\bin\MSWin32-x86;%PATH%
422
423=head2 Usage Hints for Perl on Win32
424
425=over 4
426
427=item Environment Variables
428
429The installation paths that you set during the build get compiled
430into perl, so you don't have to do anything additional to start
431using that perl (except add its location to your PATH variable).
432
433If you put extensions in unusual places, you can set PERL5LIB
434to a list of paths separated by semicolons where you want perl
435to look for libraries. Look for descriptions of other environment
436variables you can set in L<perlrun>.
437
438You can also control the shell that perl uses to run system() and
439backtick commands via PERL5SHELL. See L<perlrun>.
440
441Perl does not depend on the registry, but it can look up certain default
442values if you choose to put them there. Perl attempts to read entries from
443C<HKEY_CURRENT_USER\Software\Perl> and C<HKEY_LOCAL_MACHINE\Software\Perl>.
444Entries in the former override entries in the latter. One or more of the
445following entries (of type REG_SZ or REG_EXPAND_SZ) may be set:
446
447 lib-$] version-specific standard library path to add to @INC
448 lib standard library path to add to @INC
449 sitelib-$] version-specific site library path to add to @INC
450 sitelib site library path to add to @INC
451 vendorlib-$] version-specific vendor library path to add to @INC
452 vendorlib vendor library path to add to @INC
453 PERL* fallback for all %ENV lookups that begin with "PERL"
454
455Note the C<$]> in the above is not literal. Substitute whatever version
456of perl you want to honor that entry, e.g. C<5.6.0>. Paths must be
457separated with semicolons, as usual on win32.
458
459=item File Globbing
460
461By default, perl handles file globbing using the File::Glob extension,
462which provides portable globbing.
463
464If you want perl to use globbing that emulates the quirks of DOS
465filename conventions, you might want to consider using File::DosGlob
466to override the internal glob() implementation. See L<File::DosGlob> for
467details.
468
469=item Using perl from the command line
470
471If you are accustomed to using perl from various command-line
472shells found in UNIX environments, you will be less than pleased
473with what Windows offers by way of a command shell.
474
475The crucial thing to understand about the Windows environment is that
476the command line you type in is processed twice before Perl sees it.
477First, your command shell (usually CMD.EXE on Windows NT, and
478COMMAND.COM on Windows 9x) preprocesses the command line, to handle
479redirection, environment variable expansion, and location of the
480executable to run. Then, the perl executable splits the remaining
481command line into individual arguments, using the C runtime library
482upon which Perl was built.
483
484It is particularly important to note that neither the shell nor the C
485runtime do any wildcard expansions of command-line arguments (so
486wildcards need not be quoted). Also, the quoting behaviours of the
487shell and the C runtime are rudimentary at best (and may, if you are
488using a non-standard shell, be inconsistent). The only (useful) quote
489character is the double quote ("). It can be used to protect spaces
490and other special characters in arguments.
491
492The Windows NT documentation has almost no description of how the
493quoting rules are implemented, but here are some general observations
494based on experiments: The C runtime breaks arguments at spaces and
495passes them to programs in argc/argv. Double quotes can be used to
496prevent arguments with spaces in them from being split up. You can
497put a double quote in an argument by escaping it with a backslash and
498enclosing the whole argument within double quotes. The backslash and
499the pair of double quotes surrounding the argument will be stripped by
500the C runtime.
501
502The file redirection characters "E<lt>", "E<gt>", and "|" can be quoted by
503double quotes (although there are suggestions that this may not always
504be true). Single quotes are not treated as quotes by the shell or
505the C runtime, they don't get stripped by the shell (just to make
506this type of quoting completely useless). The caret "^" has also
507been observed to behave as a quoting character, but this appears
508to be a shell feature, and the caret is not stripped from the command
509line, so Perl still sees it (and the C runtime phase does not treat
510the caret as a quote character).
511
512Here are some examples of usage of the "cmd" shell:
513
514This prints two doublequotes:
515
516 perl -e "print '\"\"' "
517
518This does the same:
519
520 perl -e "print \"\\\"\\\"\" "
521
522This prints "bar" and writes "foo" to the file "blurch":
523
524 perl -e "print 'foo'; print STDERR 'bar'" > blurch
525
526This prints "foo" ("bar" disappears into nowhereland):
527
528 perl -e "print 'foo'; print STDERR 'bar'" 2> nul
529
530This prints "bar" and writes "foo" into the file "blurch":
531
532 perl -e "print 'foo'; print STDERR 'bar'" 1> blurch
533
534This pipes "foo" to the "less" pager and prints "bar" on the console:
535
536 perl -e "print 'foo'; print STDERR 'bar'" | less
537
538This pipes "foo\nbar\n" to the less pager:
539
540 perl -le "print 'foo'; print STDERR 'bar'" 2>&1 | less
541
542This pipes "foo" to the pager and writes "bar" in the file "blurch":
543
544 perl -e "print 'foo'; print STDERR 'bar'" 2> blurch | less
545
546
547Discovering the usefulness of the "command.com" shell on Windows 9x
548is left as an exercise to the reader :)
549
550One particularly pernicious problem with the 4NT command shell for
551Windows NT is that it (nearly) always treats a % character as indicating
552that environment variable expansion is needed. Under this shell, it is
553therefore important to always double any % characters which you want
554Perl to see (for example, for hash variables), even when they are
555quoted.
556
557=item Building Extensions
558
559The Comprehensive Perl Archive Network (CPAN) offers a wealth
560of extensions, some of which require a C compiler to build.
561Look in http://www.cpan.org/ for more information on CPAN.
562
563Note that not all of the extensions available from CPAN may work
564in the Win32 environment; you should check the information at
565http://testers.cpan.org/ before investing too much effort into
566porting modules that don't readily build.
567
568Most extensions (whether they require a C compiler or not) can
569be built, tested and installed with the standard mantra:
570
571 perl Makefile.PL
572 $MAKE
573 $MAKE test
574 $MAKE install
575
576where $MAKE is whatever 'make' program you have configured perl to
577use. Use "perl -V:make" to find out what this is. Some extensions
578may not provide a testsuite (so "$MAKE test" may not do anything or
579fail), but most serious ones do.
580
581It is important that you use a supported 'make' program, and
582ensure Config.pm knows about it. If you don't have nmake, you can
583either get dmake from the location mentioned earlier or get an
584old version of nmake reportedly available from:
585
586 http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/nmake15.exe
587
588Another option is to use the make written in Perl, available from
589CPAN.
590
591 http://www.cpan.org/modules/by-module/Make/
592
593You may also use dmake. See L</"Make"> above on how to get it.
594
595Note that MakeMaker actually emits makefiles with different syntax
596depending on what 'make' it thinks you are using. Therefore, it is
597important that one of the following values appears in Config.pm:
598
599 make='nmake' # MakeMaker emits nmake syntax
600 make='dmake' # MakeMaker emits dmake syntax
601 any other value # MakeMaker emits generic make syntax
602 (e.g GNU make, or Perl make)
603
604If the value doesn't match the 'make' program you want to use,
605edit Config.pm to fix it.
606
607If a module implements XSUBs, you will need one of the supported
608C compilers. You must make sure you have set up the environment for
609the compiler for command-line compilation.
610
611If a module does not build for some reason, look carefully for
612why it failed, and report problems to the module author. If
613it looks like the extension building support is at fault, report
614that with full details of how the build failed using the perlbug
615utility.
616
617=item Command-line Wildcard Expansion
618
619The default command shells on DOS descendant operating systems (such
620as they are) usually do not expand wildcard arguments supplied to
621programs. They consider it the application's job to handle that.
622This is commonly achieved by linking the application (in our case,
623perl) with startup code that the C runtime libraries usually provide.
624However, doing that results in incompatible perl versions (since the
625behavior of the argv expansion code differs depending on the
626compiler, and it is even buggy on some compilers). Besides, it may
627be a source of frustration if you use such a perl binary with an
628alternate shell that *does* expand wildcards.
629
630Instead, the following solution works rather well. The nice things
631about it are 1) you can start using it right away; 2) it is more
632powerful, because it will do the right thing with a pattern like
633*/*/*.c; 3) you can decide whether you do/don't want to use it; and
6344) you can extend the method to add any customizations (or even
635entirely different kinds of wildcard expansion).
636
637 C:\> copy con c:\perl\lib\Wild.pm
638 # Wild.pm - emulate shell @ARGV expansion on shells that don't
639 use File::DosGlob;
640 @ARGV = map {
641 my @g = File::DosGlob::glob($_) if /[*?]/;
642 @g ? @g : $_;
643 } @ARGV;
644 1;
645 ^Z
646 C:\> set PERL5OPT=-MWild
647 C:\> perl -le "for (@ARGV) { print }" */*/perl*.c
648 p4view/perl/perl.c
649 p4view/perl/perlio.c
650 p4view/perl/perly.c
651 perl5.005/win32/perlglob.c
652 perl5.005/win32/perllib.c
653 perl5.005/win32/perlglob.c
654 perl5.005/win32/perllib.c
655 perl5.005/win32/perlglob.c
656 perl5.005/win32/perllib.c
657
658Note there are two distinct steps there: 1) You'll have to create
659Wild.pm and put it in your perl lib directory. 2) You'll need to
660set the PERL5OPT environment variable. If you want argv expansion
661to be the default, just set PERL5OPT in your default startup
662environment.
663
664If you are using the Visual C compiler, you can get the C runtime's
665command line wildcard expansion built into perl binary. The resulting
666binary will always expand unquoted command lines, which may not be
667what you want if you use a shell that does that for you. The expansion
668done is also somewhat less powerful than the approach suggested above.
669
670=item Win32 Specific Extensions
671
672A number of extensions specific to the Win32 platform are available
673from CPAN. You may find that many of these extensions are meant to
674be used under the Activeware port of Perl, which used to be the only
675native port for the Win32 platform. Since the Activeware port does not
676have adequate support for Perl's extension building tools, these
677extensions typically do not support those tools either and, therefore,
678cannot be built using the generic steps shown in the previous section.
679
680To ensure smooth transitioning of existing code that uses the
681ActiveState port, there is a bundle of Win32 extensions that contains
682all of the ActiveState extensions and several other Win32 extensions from
683CPAN in source form, along with many added bugfixes, and with MakeMaker
684support. The latest version of this bundle is available at:
685
686 http://search.cpan.org/dist/libwin32/
687
688See the README in that distribution for building and installation
689instructions.
690
691=item Notes on 64-bit Windows
692
693Windows .NET Server supports the LLP64 data model on the Intel Itanium
694architecture.
695
696The LLP64 data model is different from the LP64 data model that is the
697norm on 64-bit Unix platforms. In the former, C<int> and C<long> are
698both 32-bit data types, while pointers are 64 bits wide. In addition,
699there is a separate 64-bit wide integral type, C<__int64>. In contrast,
700the LP64 data model that is pervasive on Unix platforms provides C<int>
701as the 32-bit type, while both the C<long> type and pointers are of
70264-bit precision. Note that both models provide for 64-bits of
703addressability.
704
70564-bit Windows running on Itanium is capable of running 32-bit x86
706binaries transparently. This means that you could use a 32-bit build
707of Perl on a 64-bit system. Given this, why would one want to build
708a 64-bit build of Perl? Here are some reasons why you would bother:
709
710=over
711
712=item *
713
714A 64-bit native application will run much more efficiently on
715Itanium hardware.
716
717=item *
718
719There is no 2GB limit on process size.
720
721=item *
722
723Perl automatically provides large file support when built under
72464-bit Windows.
725
726=item *
727
728Embedding Perl inside a 64-bit application.
729
730=back
731
732=back
733
734=head2 Running Perl Scripts
735
736Perl scripts on UNIX use the "#!" (a.k.a "shebang") line to
737indicate to the OS that it should execute the file using perl.
738Win32 has no comparable means to indicate arbitrary files are
739executables.
740
741Instead, all available methods to execute plain text files on
742Win32 rely on the file "extension". There are three methods
743to use this to execute perl scripts:
744
745=over 8
746
747=item 1
748
749There is a facility called "file extension associations" that will
750work in Windows NT 4.0. This can be manipulated via the two
751commands "assoc" and "ftype" that come standard with Windows NT
7524.0. Type "ftype /?" for a complete example of how to set this
753up for perl scripts (Say what? You thought Windows NT wasn't
754perl-ready? :).
755
756=item 2
757
758Since file associations don't work everywhere, and there are
759reportedly bugs with file associations where it does work, the
760old method of wrapping the perl script to make it look like a
761regular batch file to the OS, may be used. The install process
762makes available the "pl2bat.bat" script which can be used to wrap
763perl scripts into batch files. For example:
764
765 pl2bat foo.pl
766
767will create the file "FOO.BAT". Note "pl2bat" strips any
768.pl suffix and adds a .bat suffix to the generated file.
769
770If you use the 4DOS/NT or similar command shell, note that
771"pl2bat" uses the "%*" variable in the generated batch file to
772refer to all the command line arguments, so you may need to make
773sure that construct works in batch files. As of this writing,
7744DOS/NT users will need a "ParameterChar = *" statement in their
7754NT.INI file or will need to execute "setdos /p*" in the 4DOS/NT
776startup file to enable this to work.
777
778=item 3
779
780Using "pl2bat" has a few problems: the file name gets changed,
781so scripts that rely on C<$0> to find what they must do may not
782run properly; running "pl2bat" replicates the contents of the
783original script, and so this process can be maintenance intensive
784if the originals get updated often. A different approach that
785avoids both problems is possible.
786
787A script called "runperl.bat" is available that can be copied
788to any filename (along with the .bat suffix). For example,
789if you call it "foo.bat", it will run the file "foo" when it is
790executed. Since you can run batch files on Win32 platforms simply
791by typing the name (without the extension), this effectively
792runs the file "foo", when you type either "foo" or "foo.bat".
793With this method, "foo.bat" can even be in a different location
794than the file "foo", as long as "foo" is available somewhere on
795the PATH. If your scripts are on a filesystem that allows symbolic
796links, you can even avoid copying "runperl.bat".
797
798Here's a diversion: copy "runperl.bat" to "runperl", and type
799"runperl". Explain the observed behavior, or lack thereof. :)
800Hint: .gnidnats llits er'uoy fi ,"lrepnur" eteled :tniH
801
802=back
803
804=head2 Miscellaneous Things
805
806A full set of HTML documentation is installed, so you should be
807able to use it if you have a web browser installed on your
808system.
809
810C<perldoc> is also a useful tool for browsing information contained
811in the documentation, especially in conjunction with a pager
812like C<less> (recent versions of which have Win32 support). You may
813have to set the PAGER environment variable to use a specific pager.
814"perldoc -f foo" will print information about the perl operator
815"foo".
816
817One common mistake when using this port with a GUI library like C<Tk>
818is assuming that Perl's normal behavior of opening a command-line
819window will go away. This isn't the case. If you want to start a copy
820of C<perl> without opening a command-line window, use the C<wperl>
821executable built during the installation process. Usage is exactly
822the same as normal C<perl> on Win32, except that options like C<-h>
823don't work (since they need a command-line window to print to).
824
825If you find bugs in perl, you can run C<perlbug> to create a
826bug report (you may have to send it manually if C<perlbug> cannot
827find a mailer on your system).
828
829=head1 BUGS AND CAVEATS
830
831Norton AntiVirus interferes with the build process, particularly if
832set to "AutoProtect, All Files, when Opened". Unlike large applications
833the perl build process opens and modifies a lot of files. Having the
834the AntiVirus scan each and every one slows build the process significantly.
835Worse, with PERLIO=stdio the build process fails with peculiar messages
836as the virus checker interacts badly with miniperl.exe writing configure
837files (it seems to either catch file part written and treat it as suspicious,
838or virus checker may have it "locked" in a way which inhibits miniperl
839updating it). The build does complete with
840
841 set PERLIO=perlio
842
843but that may be just luck. Other AntiVirus software may have similar issues.
844
845Some of the built-in functions do not act exactly as documented in
846L<perlfunc>, and a few are not implemented at all. To avoid
847surprises, particularly if you have had prior exposure to Perl
848in other operating environments or if you intend to write code
849that will be portable to other environments, see L<perlport>
850for a reasonably definitive list of these differences.
851
852Not all extensions available from CPAN may build or work properly
853in the Win32 environment. See L</"Building Extensions">.
854
855Most C<socket()> related calls are supported, but they may not
856behave as on Unix platforms. See L<perlport> for the full list.
857Perl requires Winsock2 to be installed on the system. If you're
858running Win95, you can download Winsock upgrade from here:
859
860http://www.microsoft.com/windows95/downloads/contents/WUAdminTools/S_WUNetworkingTools/W95Sockets2/Default.asp
861
862Later OS versions already include Winsock2 support.
863
864Signal handling may not behave as on Unix platforms (where it
865doesn't exactly "behave", either :). For instance, calling C<die()>
866or C<exit()> from signal handlers will cause an exception, since most
867implementations of C<signal()> on Win32 are severely crippled.
868Thus, signals may work only for simple things like setting a flag
869variable in the handler. Using signals under this port should
870currently be considered unsupported.
871
872Please send detailed descriptions of any problems and solutions that
873you may find to E<lt>F<perlbug@perl.org>E<gt>, along with the output
874produced by C<perl -V>.
875
876=head1 ACKNOWLEDGEMENTS
877
878The use of a camel with the topic of Perl is a trademark
879of O'Reilly and Associates, Inc. Used with permission.
880
881=head1 AUTHORS
882
883=over 4
884
885=item Gary Ng E<lt>71564.1743@CompuServe.COME<gt>
886
887=item Gurusamy Sarathy E<lt>gsar@activestate.comE<gt>
888
889=item Nick Ing-Simmons E<lt>nick@ing-simmons.netE<gt>
890
891=item Jan Dubois E<lt>jand@activestate.comE<gt>
892
893=item Steve Hay E<lt>steve.hay@uk.radan.comE<gt>
894
895=back
896
897This document is maintained by Jan Dubois.
898
899=head1 SEE ALSO
900
901L<perl>
902
903=head1 HISTORY
904
905This port was originally contributed by Gary Ng around 5.003_24,
906and borrowed from the Hip Communications port that was available
907at the time. Various people have made numerous and sundry hacks
908since then.
909
910Borland support was added in 5.004_01 (Gurusamy Sarathy).
911
912GCC/mingw32 support was added in 5.005 (Nick Ing-Simmons).
913
914Support for PERL_OBJECT was added in 5.005 (ActiveState Tool Corp).
915
916Support for fork() emulation was added in 5.6 (ActiveState Tool Corp).
917
918Win9x support was added in 5.6 (Benjamin Stuhl).
919
920Support for 64-bit Windows added in 5.8 (ActiveState Corp).
921
922Last updated: 30 September 2005
923
924=cut
925