|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| Cross/ | H | 29-Jan-2025 | - | 4,595 | 3,883 |
| Porting/ | H | 29-Jan-2025 | - | 48,614 | 35,235 |
| amigaos4/ | H | 08-Jul-2024 | - | 2,107 | 1,657 |
| cpan/ | H | 29-Jan-2025 | - | 921,758 | 691,192 |
| cygwin/ | H | 08-Jul-2024 | - | 552 | 432 |
| dist/ | H | 08-Jul-2024 | - | 203,799 | 147,548 |
| ext/ | H | 20-Feb-2020 | - | 99,328 | 68,333 |
| h2pl/ | H | 20-Feb-2020 | - | 578 | 491 |
| haiku/ | H | 20-Feb-2020 | - | 222 | 137 |
| hints/ | H | 29-Jan-2025 | - | 12,026 | 7,093 |
| lib/ | H | 29-Jan-2025 | - | 817,214 | 732,925 |
| os2/ | H | 29-Jan-2025 | - | 17,732 | 12,402 |
| plan9/ | H | 29-Jan-2025 | - | 10,585 | 9,350 |
| pod/ | H | 29-Jan-2025 | - | 185,230 | 131,294 |
| qnx/ | H | 08-Jul-2024 | - | 70 | 30 |
| regen/ | H | 29-Jan-2025 | - | 22,216 | 14,437 |
| t/ | H | 29-Jan-2025 | - | 161,551 | 127,063 |
| utils/ | H | 29-Jan-2025 | - | 7,555 | 5,803 |
| vms/ | H | 29-Jan-2025 | - | 16,992 | 12,587 |
| vos/ | H | 20-Feb-2020 | - | 243 | 191 |
| win32/ | H | 29-Jan-2025 | - | 34,112 | 27,833 |
| .dir-locals.el | H A D | 20-Feb-2020 | 208 | 6 | 4 |
| .editorconfig | H A D | 08-Jul-2024 | 169 | 11 | 9 |
| .metaconf-exclusions.txt | H A D | 20-Feb-2020 | 1.3 KiB | 28 | 26 |
| AUTHORS | H A D | 29-Jan-2025 | 73.1 KiB | | |
| Artistic | H A D | 20-Feb-2020 | 6.2 KiB | 132 | 99 |
| CODE_OF_CONDUCT.md | H A D | 08-Jul-2024 | 973 | 21 | 16 |
| Changes | H A D | 20-Feb-2020 | 3 KiB | 70 | 55 |
| Configure | H A D | 29-Jan-2025 | 599.5 KiB | | |
| Copying | H A D | 20-Feb-2020 | 12.3 KiB | 252 | 200 |
| EXTERN.h | H A D | 08-Jul-2024 | 1.5 KiB | 59 | 37 |
| INSTALL | H A D | 29-Jan-2025 | 111.8 KiB | | |
| INTERN.h | H A D | 08-Jul-2024 | 1.3 KiB | 52 | 32 |
| MANIFEST | H A D | 29-Jan-2025 | 414.6 KiB | | |
| META.json | H A D | 29-Jan-2025 | 3.2 KiB | | |
| META.yml | H A D | 29-Jan-2025 | 2.5 KiB | | |
| Makefile.SH | H A D | 29-Jan-2025 | 52 KiB | | |
| Makefile.bsd-wrapper | H A D | 08-Jul-2024 | 1.3 KiB | 57 | 35 |
| Makefile.bsd-wrapper1 | H A D | 29-Jan-2025 | 46.3 KiB | | |
| PACKAGING | H A D | 08-Jul-2024 | 1.7 KiB | 53 | 35 |
| Policy_sh.SH | H A D | 20-Feb-2020 | 7.9 KiB | 259 | 124 |
| README | H A D | 29-Jan-2025 | 5.3 KiB | | |
| README.aix | H A D | 08-Jul-2024 | 20 KiB | 519 | 390 |
| README.amiga | H A D | 08-Jul-2024 | 5.6 KiB | 226 | 135 |
| README.android | H A D | 08-Jul-2024 | 8 KiB | 221 | 153 |
| README.bs2000 | H A D | 08-Jul-2024 | 7.8 KiB | 246 | 170 |
| README.cn | H A D | 08-Jul-2024 | 4.7 KiB | 157 | 93 |
| README.cygwin | H A D | 08-Jul-2024 | 25.5 KiB | 745 | 548 |
| README.freebsd | H A D | 08-Jul-2024 | 1.6 KiB | 44 | 30 |
| README.haiku | H A D | 29-Jan-2025 | 1.5 KiB | | |
| README.hpux | H A D | 08-Jul-2024 | 29.9 KiB | 712 | 552 |
| README.hurd | H A D | 08-Jul-2024 | 2 KiB | 58 | 39 |
| README.irix | H A D | 08-Jul-2024 | 4.3 KiB | 142 | 92 |
| README.jp | H A D | 08-Jul-2024 | 8.2 KiB | 212 | 133 |
| README.ko | H A D | 08-Jul-2024 | 11.9 KiB | 337 | 201 |
| README.linux | H A D | 08-Jul-2024 | 2 KiB | 54 | 36 |
| README.macosx | H A D | 29-Jan-2025 | 11.9 KiB | | |
| README.openbsd | H A D | 08-Jul-2024 | 1.2 KiB | 34 | 22 |
| README.os2 | H A D | 29-Jan-2025 | 91.2 KiB | | |
| README.os390 | H A D | 08-Jul-2024 | 13.9 KiB | 420 | 292 |
| README.os400 | H A D | 08-Jul-2024 | 4.7 KiB | 126 | 88 |
| README.plan9 | H A D | 08-Jul-2024 | 5 KiB | 149 | 105 |
| README.qnx | H A D | 08-Jul-2024 | 6.5 KiB | 207 | 142 |
| README.riscos | H A D | 29-Jan-2025 | 1.6 KiB | | |
| README.solaris | H A D | 29-Jan-2025 | 29.1 KiB | | |
| README.synology | H A D | 08-Jul-2024 | 10.1 KiB | 351 | 229 |
| README.tru64 | H A D | 08-Jul-2024 | 8.3 KiB | 193 | 144 |
| README.tw | H A D | 08-Jul-2024 | 4.4 KiB | 161 | 93 |
| README.vms | H A D | 29-Jan-2025 | 22.5 KiB | | |
| README.vos | H A D | 08-Jul-2024 | 3.8 KiB | 124 | 82 |
| README.win32 | H A D | 29-Jan-2025 | 31.1 KiB | | |
| SECURITY.md | H A D | 08-Jul-2024 | 2 KiB | 43 | 33 |
| TestInit.pm | H A D | 29-Jan-2025 | 4 KiB | | |
| XSUB.h | H A D | 29-Jan-2025 | 23.7 KiB | | |
| asan_ignore | H A D | 13-Mar-2021 | 868 | 29 | 23 |
| autodoc.pl | H A D | 29-Jan-2025 | 77.9 KiB | | |
| av.c | H A D | 29-Jan-2025 | 35.2 KiB | | |
| av.h | H A D | 29-Jan-2025 | 7.1 KiB | | |
| builtin.c | H A D | 29-Jan-2025 | 20.8 KiB | | |
| caretx.c | H A D | 08-Jul-2024 | 4.1 KiB | 139 | 81 |
| cflags.SH | H A D | 08-Jul-2024 | 14.6 KiB | 520 | 352 |
| charclass_invlists.h | H A D | 29-Jan-2025 | 4.3 MiB | | |
| class.c | H A D | 29-Jan-2025 | 34.7 KiB | | |
| config.over | H A D | 08-Jul-2024 | 1.8 KiB | 73 | 58 |
| config_h.SH | H A D | 29-Jan-2025 | 169.3 KiB | | |
| configpm | H A D | 08-Jul-2024 | 38.1 KiB | | |
| configure.com | H A D | 29-Jan-2025 | 213.6 KiB | 7,502 | 7,473 |
| configure.gnu | H A D | 20-Feb-2020 | 2.5 KiB | 137 | 107 |
| cop.h | H A D | 29-Jan-2025 | 56.4 KiB | 1,453 | 722 |
| cv.h | H A D | 29-Jan-2025 | 14.4 KiB | 372 | 194 |
| deb.c | H A D | 29-Jan-2025 | 10.6 KiB | 371 | 247 |
| doio.c | H A D | 29-Jan-2025 | 106.6 KiB | 3,453 | 2,858 |
| doop.c | H A D | 29-Jan-2025 | 38.6 KiB | 1,258 | 897 |
| dosish.h | H A D | 08-Jul-2024 | 3.6 KiB | 120 | 48 |
| dquote.c | H A D | 08-Jul-2024 | 18.3 KiB | 567 | 361 |
| dump.c | H A D | 29-Jan-2025 | 114.3 KiB | 3,441 | 2,651 |
| ebcdic_tables.h | H A D | 08-Jul-2024 | 48.8 KiB | 799 | 609 |
| embed.fnc | H A D | 29-Jan-2025 | 197.1 KiB | 6,190 | 6,137 |
| embed.h | H A D | 29-Jan-2025 | 148.5 KiB | 2,168 | 2,109 |
| embedvar.h | H A D | 29-Jan-2025 | 23.8 KiB | 372 | 348 |
| fakesdio.h | H A D | 20-Feb-2020 | 3.1 KiB | 128 | 102 |
| feature.h | H A D | 29-Jan-2025 | 18.5 KiB | 455 | 387 |
| form.h | H A D | 20-Feb-2020 | 1.4 KiB | 28 | 18 |
| gen_syscall_emulator.pl | H A D | 08-Jul-2024 | 8.1 KiB | 361 | 266 |
| generate_uudmap.c | H A D | 08-Jul-2024 | 5.5 KiB | 200 | 129 |
| git_version.h | H A D | 13-Mar-2021 | 279 | 8 | 1 |
| globals.c | H A D | 08-Jul-2024 | 1.4 KiB | 45 | 7 |
| globvar.sym | H A D | 29-Jan-2025 | 1.6 KiB | 100 | 98 |
| gv.c | H A D | 29-Jan-2025 | 144.6 KiB | 4,356 | 2,935 |
| gv.h | H A D | 29-Jan-2025 | 12.3 KiB | 313 | 194 |
| handy.h | H A D | 29-Jan-2025 | 143.4 KiB | 3,119 | 1,215 |
| hv.c | H A D | 29-Jan-2025 | 135.5 KiB | 4,180 | 2,619 |
| hv.h | H A D | 08-Jul-2024 | 27.6 KiB | 712 | 374 |
| hv_func.h | H A D | 08-Jul-2024 | 7.7 KiB | 190 | 132 |
| hv_macro.h | H A D | 08-Jul-2024 | 3.1 KiB | 86 | 56 |
| inline.h | H A D | 29-Jan-2025 | 133.6 KiB | 3,766 | 1,711 |
| install_lib.pl | H A D | 08-Jul-2024 | 5.2 KiB | 218 | 173 |
| installhtml | H A D | 08-Jul-2024 | 17.4 KiB | 588 | 390 |
| installman | H A D | 08-Jul-2024 | 5.9 KiB | 189 | 142 |
| installperl | H A D | 08-Jul-2024 | 26.6 KiB | 810 | 601 |
| intrpvar.h | H A D | 29-Jan-2025 | 38.2 KiB | 1,110 | 437 |
| invlist_inline.h | H A D | 08-Jul-2024 | 11.2 KiB | 376 | 215 |
| iperlsys.h | H A D | 08-Jul-2024 | 62.5 KiB | 1,423 | 1,245 |
| keywords.c | H A D | 29-Jan-2025 | 92.9 KiB | 3,563 | 2,913 |
| keywords.h | H A D | 29-Jan-2025 | 6.7 KiB | 284 | 264 |
| l1_char_class_tab.h | H A D | 08-Jul-2024 | 118.1 KiB | 797 | 780 |
| locale.c | H A D | 29-Jan-2025 | 411.8 KiB | 7,333 | 3,997 |
| locale_table.h | H A D | 29-Jan-2025 | 6 KiB | | |
| make_ext.pl | H A D | 08-Jul-2024 | 26.3 KiB | 779 | 532 |
| make_patchnum.pl | H A D | 08-Jul-2024 | 7.5 KiB | 235 | 166 |
| makedef.pl | H A D | 29-Jan-2025 | 30.4 KiB | 1,237 | 1,029 |
| makedepend.SH | H A D | 08-Jul-2024 | 4.5 KiB | 173 | 139 |
| makedepend_file.SH | H A D | 08-Jul-2024 | 6.3 KiB | 177 | 126 |
| malloc.c | H A D | 29-Jan-2025 | 80.5 KiB | 2,412 | 1,645 |
| malloc_ctl.h | H A D | 20-Feb-2020 | 1.5 KiB | 63 | 46 |
| mathoms.c | H A D | 08-Jul-2024 | 20.6 KiB | 980 | 495 |
| metaconfig.SH | H A D | 08-Jul-2024 | 1.2 KiB | 33 | 1 |
| metaconfig.h | H A D | 29-Jan-2025 | 2.5 KiB | 19 | 0 |
| mg.c | H A D | 29-Jan-2025 | 111 KiB | 4,038 | 3,068 |
| mg.h | H A D | 08-Jul-2024 | 3.6 KiB | 90 | 61 |
| mg_names.inc | H A D | 08-Jul-2024 | 2.3 KiB | 59 | 56 |
| mg_raw.h | H A D | 08-Jul-2024 | 4.7 KiB | 101 | 90 |
| mg_vtable.h | H A D | 29-Jan-2025 | 10.2 KiB | 260 | 219 |
| miniperlmain.c | H A D | 29-Jan-2025 | 5.1 KiB | 165 | 69 |
| mkppport | H A D | 08-Jul-2024 | 4.3 KiB | 188 | 102 |
| mkppport.lst | H A D | 08-Jul-2024 | 369 | 21 | 19 |
| mro_core.c | H A D | 29-Jan-2025 | 49.6 KiB | 1,459 | 877 |
| myconfig.SH | H A D | 08-Jul-2024 | 2.6 KiB | 100 | 90 |
| mydtrace.h | H A D | 20-Feb-2020 | 1.7 KiB | 55 | 28 |
| nostdio.h | H A D | 29-Jan-2025 | 3.5 KiB | 135 | 106 |
| numeric.c | H A D | 08-Jul-2024 | 62.9 KiB | 1,999 | 1,164 |
| op.c | H A D | 29-Jan-2025 | 521.2 KiB | 15,713 | 10,516 |
| op.h | H A D | 08-Jul-2024 | 40.9 KiB | 1,179 | 630 |
| op_reg_common.h | H A D | 08-Jul-2024 | 5.9 KiB | 158 | 77 |
| opcode.h | H A D | 29-Jan-2025 | 96.8 KiB | 3,514 | 3,424 |
| opnames.h | H A D | 29-Jan-2025 | 9.2 KiB | 468 | 438 |
| overload.h | H A D | 08-Jul-2024 | 3.2 KiB | 99 | 79 |
| overload.inc | H A D | 08-Jul-2024 | 3.6 KiB | 181 | 176 |
| packsizetables.inc | H A D | 08-Jul-2024 | 5.9 KiB | 223 | 219 |
| pad.c | H A D | 29-Jan-2025 | 98 KiB | 2,986 | 1,834 |
| pad.h | H A D | 29-Jan-2025 | 19.6 KiB | 575 | 249 |
| parser.h | H A D | 08-Jul-2024 | 6.9 KiB | 166 | 117 |
| patchlevel.h | H A D | 29-Jan-2025 | 6.3 KiB | 179 | 33 |
| peep.c | H A D | 29-Jan-2025 | 152.7 KiB | 4,228 | 2,388 |
| perl.c | H A D | 29-Jan-2025 | 169.3 KiB | 5,484 | 3,903 |
| perl.h | H A D | 29-Jan-2025 | 326.1 KiB | 9,186 | 5,626 |
| perl_inc_macro.h | H A D | 08-Jul-2024 | 5.9 KiB | 183 | 119 |
| perl_langinfo.h | H A D | 29-Jan-2025 | 7.9 KiB | 191 | 178 |
| perl_siphash.h | H A D | 08-Jul-2024 | 5.1 KiB | 128 | 105 |
| perlapi.h | H A D | 08-Jul-2024 | 635 | 23 | 3 |
| perldtrace.d | H A D | 20-Feb-2020 | 491 | 21 | 8 |
| perlio.c | H A D | 29-Jan-2025 | 151.9 KiB | 5,248 | 4,268 |
| perlio.h | H A D | 08-Jul-2024 | 9.5 KiB | 351 | 245 |
| perlio.sym | H A D | 20-Feb-2020 | 446 | 29 | 27 |
| perliol.h | H A D | 08-Jul-2024 | 13.3 KiB | 284 | 225 |
| perlsdio.h | H A D | 20-Feb-2020 | 527 | 22 | 3 |
| perlstatic.h | H A D | 08-Jul-2024 | 894 | 34 | 7 |
| perlvars.h | H A D | 29-Jan-2025 | 16.7 KiB | 403 | 102 |
| perly.act | H A D | 29-Jan-2025 | 69.5 KiB | 2,354 | 1,760 |
| perly.c | H A D | 08-Jul-2024 | 18.7 KiB | 616 | 383 |
| perly.h | H A D | 29-Jan-2025 | 9.9 KiB | 242 | 179 |
| perly.tab | H A D | 29-Jan-2025 | 104.6 KiB | 1,334 | 1,309 |
| perly.y | H A D | 29-Jan-2025 | 53.5 KiB | 1,689 | 1,406 |
| pp.c | H A D | 29-Jan-2025 | 234.6 KiB | 7,570 | 5,954 |
| pp.h | H A D | 29-Jan-2025 | 29.8 KiB | 726 | 348 |
| pp_ctl.c | H A D | 29-Jan-2025 | 227.2 KiB | 6,672 | 4,868 |
| pp_hot.c | H A D | 29-Jan-2025 | 234.4 KiB | 5,941 | 3,921 |
| pp_pack.c | H A D | 29-Jan-2025 | 107.4 KiB | 3,179 | 2,722 |
| pp_proto.h | H A D | 29-Jan-2025 | 20.5 KiB | 325 | 316 |
| pp_sort.c | H A D | 29-Jan-2025 | 47.3 KiB | 1,348 | 857 |
| pp_sys.c | H A D | 29-Jan-2025 | 168.6 KiB | 5,977 | 4,907 |
| proto.h | H A D | 29-Jan-2025 | 337.9 KiB | 10,555 | 8,419 |
| reentr.c | H A D | 29-Jan-2025 | 20 KiB | 681 | 503 |
| reentr.h | H A D | 29-Jan-2025 | 85.3 KiB | 1,701 | 1,416 |
| regcharclass.h | H A D | 29-Jan-2025 | 270.3 KiB | 3,859 | 3,093 |
| regcomp.c | H A D | 29-Jan-2025 | 653.2 KiB | 16,260 | 10,146 |
| regcomp.h | H A D | 29-Jan-2025 | 68.5 KiB | 1,564 | 680 |
| regcomp.sym | H A D | 08-Jul-2024 | 18.4 KiB | 348 | 287 |
| regcomp_debug.c | H A D | 29-Jan-2025 | 60.4 KiB | 1,671 | 1,260 |
| regcomp_internal.h | H A D | 29-Jan-2025 | 60.5 KiB | 1,262 | 675 |
| regcomp_invlist.c | H A D | 29-Jan-2025 | 56.1 KiB | 1,541 | 779 |
| regcomp_study.c | H A D | 29-Jan-2025 | 163.1 KiB | 3,822 | 2,506 |
| regcomp_trie.c | H A D | 29-Jan-2025 | 71.7 KiB | 1,718 | 1,074 |
| regen.pl | H A D | 29-Jan-2025 | 924 | 36 | 21 |
| regen_perly.pl | H A D | 08-Jul-2024 | 9.7 KiB | 359 | 216 |
| regexec.c | H A D | 29-Jan-2025 | 471.9 KiB | 12,383 | 8,432 |
| regexp.h | H A D | 29-Jan-2025 | 45.7 KiB | 1,045 | 603 |
| reginline.h | H A D | 08-Jul-2024 | 1.5 KiB | 65 | 42 |
| regnodes.h | H A D | 08-Jul-2024 | 127 KiB | 2,981 | 2,411 |
| run.c | H A D | 29-Jan-2025 | 4.9 KiB | 53 | 15 |
| runtests.SH | H A D | 08-Jul-2024 | 2.5 KiB | 105 | 69 |
| sbox32_hash.h | H A D | 08-Jul-2024 | 54.4 KiB | 1,737 | 1,702 |
| scope.c | H A D | 29-Jan-2025 | 57.3 KiB | 1,991 | 1,319 |
| scope.h | H A D | 29-Jan-2025 | 12.2 KiB | 322 | 185 |
| scope_types.h | H A D | 08-Jul-2024 | 5.1 KiB | 152 | 121 |
| shlib_version | H A D | 29-Jan-2025 | 17 | 3 | 2 |
| sv.c | H A D | 29-Jan-2025 | 569.6 KiB | 17,544 | 11,230 |
| sv.h | H A D | 29-Jan-2025 | 106 KiB | 2,717 | 1,255 |
| sv_inline.h | H A D | 29-Jan-2025 | 28.3 KiB | 1,003 | 645 |
| syscall_emulator.c | H A D | 08-Jul-2024 | 39.9 KiB | 1,421 | 1,268 |
| syscall_emulator.h | H A D | 08-Jul-2024 | 33 | 2 | 1 |
| taint.c | H A D | 08-Jul-2024 | 6.1 KiB | 213 | 140 |
| thread.h | H A D | 08-Jul-2024 | 19.5 KiB | 550 | 419 |
| time64.c | H A D | 08-Jul-2024 | 16.7 KiB | 584 | 345 |
| time64.h | H A D | 08-Jul-2024 | 900 | 49 | 32 |
| time64_config.h | H A D | 08-Jul-2024 | 2 KiB | 88 | 14 |
| toke.c | H A D | 29-Jan-2025 | 468.5 KiB | 13,874 | 9,873 |
| uni_keywords.h | H A D | 29-Jan-2025 | 557.4 KiB | 7,766 | 7,677 |
| unicode_constants.h | H A D | 29-Jan-2025 | 57.3 KiB | 246 | 141 |
| universal.c | H A D | 29-Jan-2025 | 39 KiB | 1,419 | 983 |
| unixish.h | H A D | 29-Jan-2025 | 5.4 KiB | 180 | 59 |
| utf8.c | H A D | 29-Jan-2025 | 172.5 KiB | 4,587 | 2,321 |
| utf8.h | H A D | 29-Jan-2025 | 60.1 KiB | 1,324 | 411 |
| utfebcdic.h | H A D | 08-Jul-2024 | 11.5 KiB | 209 | 13 |
| util.c | H A D | 29-Jan-2025 | 196.2 KiB | 6,707 | 4,446 |
| util.h | H A D | 08-Jul-2024 | 10.5 KiB | 286 | 128 |
| utils.lst | H A D | 13-Mar-2021 | 392 | 23 | 22 |
| vutil.c | H A D | 29-Jan-2025 | 36.4 KiB | 1,145 | 812 |
| vutil.h | H A D | 08-Jul-2024 | 4 KiB | 115 | 88 |
| vxs.inc | H A D | 08-Jul-2024 | 10.5 KiB | 450 | 404 |
| warnings.h | H A D | 29-Jan-2025 | 11.9 KiB | 363 | 142 |
| write_buildcustomize.pl | H A D | 29-Jan-2025 | 3.4 KiB | 121 | 75 |
| zaphod32_hash.h | H A D | 08-Jul-2024 | 9.5 KiB | 293 | 238 |
README.aix
1# vim: syntax=pod
2
3If you read this file _as_is_, just ignore the funny characters you see.
4It is written in the POD format (see pod/perlpod.pod) which is specially
5designed to be readable as is.
6
7=head1 NAME
8
9perlaix - Perl version 5 on IBM AIX (UNIX) systems
10
11=head1 DESCRIPTION
12
13This document describes various features of IBM's UNIX operating
14system AIX that will affect how Perl version 5 (hereafter just Perl)
15is compiled and/or runs.
16
17=head2 Compiling Perl 5 on AIX
18
19For information on compilers on older versions of AIX, see L</Compiling
20Perl 5 on older AIX versions up to 4.3.3>.
21
22When compiling Perl, you must use an ANSI C compiler. AIX does not ship
23an ANSI compliant C compiler with AIX by default, but binary builds of
24gcc for AIX are widely available. A version of gcc is also included in
25the AIX Toolbox which is shipped with AIX.
26
27=head2 Supported Compilers
28
29Currently all versions of IBM's "xlc", "xlc_r", "cc", "cc_r" or
30"vac" ANSI/C compiler will work for building Perl if that compiler
31works on your system.
32
33If you plan to link Perl to any module that requires thread-support,
34like DBD::Oracle, it is better to use the _r version of the compiler.
35This will not build a threaded Perl, but a thread-enabled Perl. See
36also L</Threaded Perl> later on.
37
38As of writing (2010-09) only the I<IBM XL C for AIX> or I<IBM XL C/C++
39for AIX> compiler is supported by IBM on AIX 5L/6.1/7.1.
40
41The following compiler versions are currently supported by IBM:
42
43 IBM XL C and IBM XL C/C++ V8, V9, V10, V11
44
45The XL C for AIX is integrated in the XL C/C++ for AIX compiler and
46therefore also supported.
47
48If you choose XL C/C++ V9 you need APAR IZ35785 installed
49otherwise the integrated SDBM_File do not compile correctly due
50to an optimization bug. You can circumvent this problem by
51adding -qipa to the optimization flags (-Doptimize='-O -qipa').
52The PTF for APAR IZ35785 which solves this problem is available
53from IBM (April 2009 PTF for XL C/C++ Enterprise Edition for AIX, V9.0).
54
55If you choose XL C/C++ V11 you need the April 2010 PTF (or newer)
56installed otherwise you will not get a working Perl version.
57
58Perl can be compiled with either IBM's ANSI C compiler or with gcc.
59The former is recommended, as not only it can compile Perl with no
60difficulty, but also can take advantage of features listed later
61that require the use of IBM compiler-specific command-line flags.
62
63If you decide to use gcc, make sure your installation is recent and
64complete, and be sure to read the Perl INSTALL file for more gcc-specific
65details. Please report any hoops you had to jump through to the
66development team.
67
68=head2 Incompatibility with AIX Toolbox lib gdbm
69
70If the AIX Toolbox version of lib gdbm < 1.8.3-5 is installed on your
71system then Perl will not work. This library contains the header files
72/opt/freeware/include/gdbm/dbm.h|ndbm.h which conflict with the AIX
73system versions. The lib gdbm will be automatically removed from the
74wanted libraries if the presence of one of these two header files is
75detected. If you want to build Perl with GDBM support then please install
76at least gdbm-devel-1.8.3-5 (or higher).
77
78=head2 Perl 5 was successfully compiled and tested on:
79
80 Perl | AIX Level | Compiler Level | w th | w/o th
81 -------+---------------------+-------------------------+------+-------
82 5.12.2 |5.1 TL9 32 bit | XL C/C++ V7 | OK | OK
83 5.12.2 |5.1 TL9 64 bit | XL C/C++ V7 | OK | OK
84 5.12.2 |5.2 TL10 SP8 32 bit | XL C/C++ V8 | OK | OK
85 5.12.2 |5.2 TL10 SP8 32 bit | gcc 3.2.2 | OK | OK
86 5.12.2 |5.2 TL10 SP8 64 bit | XL C/C++ V8 | OK | OK
87 5.12.2 |5.3 TL8 SP8 32 bit | XL C/C++ V9 + IZ35785 | OK | OK
88 5.12.2 |5.3 TL8 SP8 32 bit | gcc 4.2.4 | OK | OK
89 5.12.2 |5.3 TL8 SP8 64 bit | XL C/C++ V9 + IZ35785 | OK | OK
90 5.12.2 |5.3 TL10 SP3 32 bit | XL C/C++ V11 + Apr 2010 | OK | OK
91 5.12.2 |5.3 TL10 SP3 64 bit | XL C/C++ V11 + Apr 2010 | OK | OK
92 5.12.2 |6.1 TL1 SP7 32 bit | XL C/C++ V10 | OK | OK
93 5.12.2 |6.1 TL1 SP7 64 bit | XL C/C++ V10 | OK | OK
94 5.13 |7.1 TL0 SP1 32 bit | XL C/C++ V11 + Jul 2010 | OK | OK
95 5.13 |7.1 TL0 SP1 64 bit | XL C/C++ V11 + Jul 2010 | OK | OK
96
97 w th = with thread support
98 w/o th = without thread support
99 OK = tested
100
101Successfully tested means that all "make test" runs finish with a
102result of 100% OK. All tests were conducted with -Duseshrplib set.
103
104All tests were conducted on the oldest supported AIX technology level
105with the latest support package applied. If the tested AIX version is
106out of support (AIX 4.3.3, 5.1, 5.2) then the last available support
107level was used.
108
109=head2 Building Dynamic Extensions on AIX
110
111Starting from Perl 5.7.2 (and consequently 5.8.x / 5.10.x / 5.12.x)
112and AIX 4.3 or newer Perl uses the AIX native dynamic loading interface
113in the so called runtime linking mode instead of the emulated interface
114that was used in Perl releases 5.6.1 and earlier or, for AIX releases
1154.2 and earlier. This change does break backward compatibility with
116compiled modules from earlier Perl releases. The change was made to make
117Perl more compliant with other applications like Apache/mod_perl which are
118using the AIX native interface. This change also enables the use of
119C++ code with static constructors and destructors in Perl extensions,
120which was not possible using the emulated interface.
121
122It is highly recommended to use the new interface.
123
124=head2 Using Large Files with Perl
125
126Should yield no problems.
127
128=head2 Threaded Perl
129
130Should yield no problems with AIX 5.1 / 5.2 / 5.3 / 6.1 / 7.1.
131
132IBM uses the AIX system Perl (V5.6.0 on AIX 5.1 and V5.8.2 on
133AIX 5.2 / 5.3 and 6.1; V5.8.8 on AIX 5.3 TL11 and AIX 6.1 TL4; V5.10.1
134on AIX 7.1) for some AIX system scripts. If you switch the links in
135/usr/bin from the AIX system Perl (/usr/opt/perl5) to the newly build
136Perl then you get the same features as with the IBM AIX system Perl if
137the threaded options are used.
138
139The threaded Perl build works also on AIX 5.1 but the IBM Perl
140build (Perl v5.6.0) is not threaded on AIX 5.1.
141
142Perl 5.12 an newer is not compatible with the IBM fileset perl.libext.
143
144=head2 64-bit Perl
145
146If your AIX system is installed with 64-bit support, you can expect 64-bit
147configurations to work. If you want to use 64-bit Perl on AIX 6.1
148you need an APAR for a libc.a bug which affects (n)dbm_XXX functions.
149The APAR number for this problem is IZ39077.
150
151If you need more memory (larger data segment) for your Perl programs you
152can set:
153
154 /etc/security/limits
155 default: (or your user)
156 data = -1 (default is 262144 * 512 byte)
157
158With the default setting the size is limited to 128MB.
159The -1 removes this limit. If the "make test" fails please change
160your /etc/security/limits as stated above.
161
162=head2 Long doubles
163
164IBM calls its implementation of long doubles 128-bit, but it is not
165the IEEE 128-bit ("quadruple precision") which would give 116 bit of
166mantissa (nor it is implemented in hardware), instead it's a special
167software implementation called "double-double", which gives 106 bits
168of mantissa.
169
170There seem to be various problems in this long double implementation.
171If Configure detects this brokenness, it will disable the long double support.
172This can be overridden with explicit C<-Duselongdouble> (or C<-Dusemorebits>,
173which enables both long doubles and 64 bit integers). If you decide to
174enable long doubles, for most of the broken things Perl has implemented
175workarounds, but the handling of the special values infinity and NaN
176remains badly broken: for example infinity plus zero results in NaN.
177
178=head2 Recommended Options AIX 5.1/5.2/5.3/6.1 and 7.1 (threaded/32-bit)
179
180With the following options you get a threaded Perl version which
181passes all make tests in threaded 32-bit mode, which is the default
182configuration for the Perl builds that AIX ships with.
183
184 rm config.sh
185 ./Configure \
186 -d \
187 -Dcc=cc_r \
188 -Duseshrplib \
189 -Dusethreads \
190 -Dprefix=/usr/opt/perl5_32
191
192The -Dprefix option will install Perl in a directory parallel to the
193IBM AIX system Perl installation.
194
195=head2 Recommended Options AIX 5.1/5.2/5.3/6.1 and 7.1 (32-bit)
196
197With the following options you get a Perl version which passes
198all make tests in 32-bit mode.
199
200 rm config.sh
201 ./Configure \
202 -d \
203 -Dcc=cc_r \
204 -Duseshrplib \
205 -Dprefix=/usr/opt/perl5_32
206
207The -Dprefix option will install Perl in a directory parallel to the
208IBM AIX system Perl installation.
209
210=head2 Recommended Options AIX 5.1/5.2/5.3/6.1 and 7.1 (threaded/64-bit)
211
212With the following options you get a threaded Perl version which
213passes all make tests in 64-bit mode.
214
215 export OBJECT_MODE=64 / setenv OBJECT_MODE 64 (depending on your shell)
216
217 rm config.sh
218 ./Configure \
219 -d \
220 -Dcc=cc_r \
221 -Duseshrplib \
222 -Dusethreads \
223 -Duse64bitall \
224 -Dprefix=/usr/opt/perl5_64
225
226=head2 Recommended Options AIX 5.1/5.2/5.3/6.1 and 7.1 (64-bit)
227
228With the following options you get a Perl version which passes all
229make tests in 64-bit mode.
230
231 export OBJECT_MODE=64 / setenv OBJECT_MODE 64 (depending on your shell)
232
233 rm config.sh
234 ./Configure \
235 -d \
236 -Dcc=cc_r \
237 -Duseshrplib \
238 -Duse64bitall \
239 -Dprefix=/usr/opt/perl5_64
240
241The -Dprefix option will install Perl in a directory parallel to the
242IBM AIX system Perl installation.
243
244If you choose gcc to compile 64-bit Perl then you need to add the
245following option:
246
247 -Dcc='gcc -maix64'
248
249
250=head2 Compiling Perl 5 on AIX 7.1.0
251
252A regression in AIX 7 causes a failure in make test in Time::Piece during
253daylight savings time. APAR IV16514 provides the fix for this. A quick
254test to see if it's required, assuming it is currently daylight savings
255in Eastern Time, would be to run C< TZ=EST5 date +%Z >. This will come
256back with C<EST> normally, but nothing if you have the problem.
257
258
259=head2 Compiling Perl 5 on older AIX versions up to 4.3.3
260
261Due to the fact that AIX 4.3.3 reached end-of-service in December 31,
2622003 this information is provided as is. The Perl versions prior to
263Perl 5.8.9 could be compiled on AIX up to 4.3.3 with the following
264settings (your mileage may vary):
265
266When compiling Perl, you must use an ANSI C compiler. AIX does not ship
267an ANSI compliant C-compiler with AIX by default, but binary builds of
268gcc for AIX are widely available.
269
270At the moment of writing, AIX supports two different native C compilers,
271for which you have to pay: B<xlC> and B<vac>. If you decide to use either
272of these two (which is quite a lot easier than using gcc), be sure to
273upgrade to the latest available patch level. Currently:
274
275 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
276 vac.C 4.4.0.3 or 5.0.2.6 or 6.0.0.1
277
278note that xlC has the OS version in the name as of version 4.0.2.0, so
279you will find xlC.C for AIX-5.0 as package
280
281 xlC.aix50.rte 5.0.2.0 or 6.0.0.3
282
283subversions are not the same "latest" on all OS versions. For example,
284the latest xlC-5 on aix41 is 5.0.2.9, while on aix43, it is 5.0.2.7.
285
286Perl can be compiled with either IBM's ANSI C compiler or with gcc.
287The former is recommended, as not only can it compile Perl with no
288difficulty, but also can take advantage of features listed later that
289require the use of IBM compiler-specific command-line flags.
290
291The IBM's compiler patch levels 5.0.0.0 and 5.0.1.0 have compiler
292optimization bugs that affect compiling perl.c and regcomp.c,
293respectively. If Perl's configuration detects those compiler patch
294levels, optimization is turned off for the said source code files.
295Upgrading to at least 5.0.2.0 is recommended.
296
297If you decide to use gcc, make sure your installation is recent and
298complete, and be sure to read the Perl INSTALL file for more gcc-specific
299details. Please report any hoops you had to jump through to the development
300team.
301
302=head2 OS level
303
304Before installing the patches to the IBM C-compiler you need to know the
305level of patching for the Operating System. IBM's command 'oslevel' will
306show the base, but is not always complete (in this example oslevel shows
3074.3.NULL, whereas the system might run most of 4.3.THREE):
308
309 # oslevel
310 4.3.0.0
311 # lslpp -l | grep 'bos.rte '
312 bos.rte 4.3.3.75 COMMITTED Base Operating System Runtime
313 bos.rte 4.3.2.0 COMMITTED Base Operating System Runtime
314 #
315
316The same might happen to AIX 5.1 or other OS levels. As a side note, Perl
317cannot be built without bos.adt.syscalls and bos.adt.libm installed
318
319 # lslpp -l | egrep "syscalls|libm"
320 bos.adt.libm 5.1.0.25 COMMITTED Base Application Development
321 bos.adt.syscalls 5.1.0.36 COMMITTED System Calls Application
322 #
323
324=head2 Building Dynamic Extensions on AIX E<lt> 5L
325
326AIX supports dynamically loadable objects as well as shared libraries.
327Shared libraries by convention end with the suffix .a, which is a bit
328misleading, as an archive can contain static as well as dynamic members.
329For Perl dynamically loaded objects we use the .so suffix also used on
330many other platforms.
331
332Note that starting from Perl 5.7.2 (and consequently 5.8.0) and AIX 4.3
333or newer Perl uses the AIX native dynamic loading interface in the so
334called runtime linking mode instead of the emulated interface that was
335used in Perl releases 5.6.1 and earlier or, for AIX releases 4.2 and
336earlier. This change does break backward compatibility with compiled
337modules from earlier Perl releases. The change was made to make Perl
338more compliant with other applications like Apache/mod_perl which are
339using the AIX native interface. This change also enables the use of C++
340code with static constructors and destructors in Perl extensions, which
341was not possible using the emulated interface.
342
343=head2 The IBM ANSI C Compiler
344
345All defaults for Configure can be used.
346
347If you've chosen to use vac 4, be sure to run 4.4.0.3. Older versions
348will turn up nasty later on. For vac 5 be sure to run at least 5.0.1.0,
349but vac 5.0.2.6 or up is highly recommended. Note that since IBM has
350removed vac 5.0.2.1 through 5.0.2.5 from the software depot, these
351versions should be considered obsolete.
352
353Here's a brief lead of how to upgrade the compiler to the latest
354level. Of course this is subject to changes. You can only upgrade
355versions from ftp-available updates if the first three digit groups
356are the same (in where you can skip intermediate unlike the patches
357in the developer snapshots of Perl), or to one version up where the
358"base" is available. In other words, the AIX compiler patches are
359cumulative.
360
361 vac.C.4.4.0.1 => vac.C.4.4.0.3 is OK (vac.C.4.4.0.2 not needed)
362 xlC.C.3.1.3.3 => xlC.C.3.1.4.10 is NOT OK (xlC.C.3.1.4.0 is not
363 available)
364
365 # ftp ftp.software.ibm.com
366 Connected to service.boulder.ibm.com.
367 : welcome message ...
368 Name (ftp.software.ibm.com:merijn): anonymous
369 331 Guest login ok, send your complete e-mail address as password.
370 Password:
371 ... accepted login stuff
372 ftp> cd /aix/fixes/v4/
373 ftp> dir other other.ll
374 output to local-file: other.ll? y
375 200 PORT command successful.
376 150 Opening ASCII mode data connection for /bin/ls.
377 226 Transfer complete.
378 ftp> dir xlc xlc.ll
379 output to local-file: xlc.ll? y
380 200 PORT command successful.
381 150 Opening ASCII mode data connection for /bin/ls.
382 226 Transfer complete.
383 ftp> bye
384 ... goodbye messages
385 # ls -l *.ll
386 -rw-rw-rw- 1 merijn system 1169432 Nov 2 17:29 other.ll
387 -rw-rw-rw- 1 merijn system 29170 Nov 2 17:29 xlc.ll
388
389On AIX 4.2 using xlC, we continue:
390
391 # lslpp -l | fgrep 'xlC.C '
392 xlC.C 3.1.4.9 COMMITTED C for AIX Compiler
393 xlC.C 3.1.4.0 COMMITTED C for AIX Compiler
394 # grep 'xlC.C.3.1.4.*.bff' xlc.ll
395 -rw-r--r-- 1 45776101 1 6286336 Jul 22 1996 xlC.C.3.1.4.1.bff
396 -rw-rw-r-- 1 45776101 1 6173696 Aug 24 1998 xlC.C.3.1.4.10.bff
397 -rw-r--r-- 1 45776101 1 6319104 Aug 14 1996 xlC.C.3.1.4.2.bff
398 -rw-r--r-- 1 45776101 1 6316032 Oct 21 1996 xlC.C.3.1.4.3.bff
399 -rw-r--r-- 1 45776101 1 6315008 Dec 20 1996 xlC.C.3.1.4.4.bff
400 -rw-rw-r-- 1 45776101 1 6178816 Mar 28 1997 xlC.C.3.1.4.5.bff
401 -rw-rw-r-- 1 45776101 1 6188032 May 22 1997 xlC.C.3.1.4.6.bff
402 -rw-rw-r-- 1 45776101 1 6191104 Sep 5 1997 xlC.C.3.1.4.7.bff
403 -rw-rw-r-- 1 45776101 1 6185984 Jan 13 1998 xlC.C.3.1.4.8.bff
404 -rw-rw-r-- 1 45776101 1 6169600 May 27 1998 xlC.C.3.1.4.9.bff
405 # wget ftp://ftp.software.ibm.com/aix/fixes/v4/xlc/xlC.C.3.1.4.10.bff
406 #
407
408On AIX 4.3 using vac, we continue:
409
410 # lslpp -l | grep 'vac.C '
411 vac.C 5.0.2.2 COMMITTED C for AIX Compiler
412 vac.C 5.0.2.0 COMMITTED C for AIX Compiler
413 # grep 'vac.C.5.0.2.*.bff' other.ll
414 -rw-rw-r-- 1 45776101 1 13592576 Apr 16 2001 vac.C.5.0.2.0.bff
415 -rw-rw-r-- 1 45776101 1 14133248 Apr 9 2002 vac.C.5.0.2.3.bff
416 -rw-rw-r-- 1 45776101 1 14173184 May 20 2002 vac.C.5.0.2.4.bff
417 -rw-rw-r-- 1 45776101 1 14192640 Nov 22 2002 vac.C.5.0.2.6.bff
418 # wget ftp://ftp.software.ibm.com/aix/fixes/v4/other/vac.C.5.0.2.6.bff
419 #
420
421Likewise on all other OS levels. Then execute the following command, and
422fill in its choices
423
424 # smit install_update
425 -> Install and Update from LATEST Available Software
426 * INPUT device / directory for software [ vac.C.5.0.2.6.bff ]
427 [ OK ]
428 [ OK ]
429
430Follow the messages ... and you're done.
431
432If you like a more web-like approach, a good start point can be
433L<http://www14.software.ibm.com/webapp/download/downloadaz.jsp> and click
434"C for AIX", and follow the instructions.
435
436=head2 The usenm option
437
438If linking miniperl
439
440 cc -o miniperl ... miniperlmain.o opmini.o perl.o ... -lm -lc ...
441
442causes error like this
443
444 ld: 0711-317 ERROR: Undefined symbol: .aintl
445 ld: 0711-317 ERROR: Undefined symbol: .copysignl
446 ld: 0711-317 ERROR: Undefined symbol: .syscall
447 ld: 0711-317 ERROR: Undefined symbol: .eaccess
448 ld: 0711-317 ERROR: Undefined symbol: .setresuid
449 ld: 0711-317 ERROR: Undefined symbol: .setresgid
450 ld: 0711-317 ERROR: Undefined symbol: .setproctitle
451 ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
452 information.
453
454you could retry with
455
456 make realclean
457 rm config.sh
458 ./Configure -Dusenm ...
459
460which makes Configure to use the C<nm> tool when scanning for library
461symbols, which usually is not done in AIX.
462
463Related to this, you probably should not use the C<-r> option of
464Configure in AIX, because that affects of how the C<nm> tool is used.
465
466=head2 Using GNU's gcc for building Perl
467
468Using gcc-3.x (tested with 3.0.4, 3.1, and 3.2) now works out of the box,
469as do recent gcc-2.9 builds available directly from IBM as part of their
470Linux compatibility packages, available here:
471
472 http://www.ibm.com/servers/aix/products/aixos/linux/
473
474=head2 Using Large Files with Perl E<lt> 5L
475
476Should yield no problems.
477
478=head2 Threaded Perl E<lt> 5L
479
480Threads seem to work OK, though at the moment not all tests pass when
481threads are used in combination with 64-bit configurations.
482
483You may get a warning when doing a threaded build:
484
485 "pp_sys.c", line 4640.39: 1506-280 (W) Function argument assignment
486 between types "unsigned char*" and "const void*" is not allowed.
487
488The exact line number may vary, but if the warning (W) comes from a line
489line this
490
491 hent = PerlSock_gethostbyaddr(addr, (Netdb_hlen_t) addrlen, addrtype);
492
493in the "pp_ghostent" function, you may ignore it safely. The warning
494is caused by the reentrant variant of gethostbyaddr() having a slightly
495different prototype than its non-reentrant variant, but the difference
496is not really significant here.
497
498=head2 64-bit Perl E<lt> 5L
499
500If your AIX is installed with 64-bit support, you can expect 64-bit
501configurations to work. In combination with threads some tests might
502still fail.
503
504=head2 AIX 4.2 and extensions using C++ with statics
505
506In AIX 4.2 Perl extensions that use C++ functions that use statics
507may have problems in that the statics are not getting initialized.
508In newer AIX releases this has been solved by linking Perl with
509the libC_r library, but unfortunately in AIX 4.2 the said library
510has an obscure bug where the various functions related to time
511(such as time() and gettimeofday()) return broken values, and
512therefore in AIX 4.2 Perl is not linked against the libC_r.
513
514=head1 AUTHORS
515
516Rainer Tammer <tammer@tammer.net>
517
518=cut
519
README.amiga
1# vim: syntax=pod
2
3If you read this file _as_is_, just ignore the funny characters you
4see. It is written in the POD format (see perlpod manpage) which is
5specially designed to be readable as is.
6
7=head1 NAME
8
9perlamiga - Perl under AmigaOS 4.1
10
11=head1 NOTE
12
13This is a port of Perl 5.22.1, it is a fresh port and not in any way
14compatible with my previous ports of Perl 5.8 and 5.16.3. This means
15you will need to reinstall / rebuild any third party modules you have
16installed.
17
18newlib.library version 53.28 or greater is required.
19
20=head1 SYNOPSIS
21
22Once perl is installed you can read this document in the following way
23
24 sh -c "perldoc perlamiga"
25
26or you may read I<as is>: either as F<README.amiga>, or F<pod/perlamiga.pod>.
27
28=cut
29
30 NAME
31 SYNOPSIS
32 DESCRIPTION
33 - Prerequisites
34 - Starting Perl programs under AmigaOS
35 - Shortcomings of Perl under AmigaOS
36 INSTALLATION
37 CHANGES
38
39=head1 DESCRIPTION
40
41=head2 Prerequisites for running Perl 5.22.1 under AmigaOS 4.1
42
43=over 6
44
45=item B<AmigaOS 4.1 update 6 with all updates applied as of 9th October 2013>
46
47The most important of which is:
48
49=item B<newlib.library version 53.28 or greater>
50
51=item B<AmigaOS SDK>
52
53Perl installs into the SDK directory structure and expects many of the
54build tools present in the SDK to be available. So for the best results
55install the SDK first.
56
57=item B<abc-shell>
58
59If you do not have the SDK installed you must at least have abc-shell
60installed or some other suitable sh port. This is required to run
61external commands and should be available as 'sh' in your path.
62
63=back
64
65=head2 Starting Perl programs under AmigaOS 4.1
66
67Perl may be run from the AmigaOS shell but for best results should be
68run under abc-shell. (abc-shell handles file globbing, pattern
69expansion, and sets up environment variables in the UN*Xy way that
70Perl expects.)
71
72For example:
73
74 New Shell process 10
75 10.AmigaOS4:> sh
76 /AmigaOS4>perl path:to/myprog arg1 arrg2 arg3
77
78Abc-shell can also launch programs via the #! syntax at the start of
79the program file, it's best use the form #!SDK:Local/C/perl so that
80the AmigaOS shell may also find perl in the same way. AmigaOS requires
81the script bit to be set for this to work
82
83 10.AmigaOS4:> sh
84 /AmigaOS4>myprog arg1 arrg2 arg3
85
86=head2 Limitations of Perl under AmigaOS 4.1
87
88=over 6
89
90=item B<Nested Piped programs can crash when run from older abc-shells>
91
92abc-shell version 53.2 has a bug that can cause crashes in the
93subprocesses used to run piped programs, if a later version is
94available you should install it instead.
95
96=item B<Incorrect or unexpected command line unescaping>
97
98newlib.library 53.30 and earlier incorrectly unescape slashed escape
99sequences e.g. \" \n \t etc requiring unusual extra escaping.
100
101=item B<Starting subprocesses via open has limitations>
102
103 open FH, "command |"
104
105Subprocesses started with open use a minimal popen() routine and
106therefore they do not return pids usable with waitpid etc.
107
108=item If you find any other limitations or bugs then let me know.
109
110Please report bugs in this version of perl to andy@broad.ology.org.uk
111in the first instance.
112
113=back
114
115=head1 INSTALLATION
116
117This guide assumes you have obtained a prebuilt archive from os4depot.net.
118
119Unpack the main archive to a temporary location (RAM: is fine).
120
121Execute the provided install script from shell or via its icon.
122
123You B<must not> attempt to install by hand.
124
125Once installed you may delete the temporary archive.
126
127This approach will preserve links in the installation without creating
128duplicate binaries.
129
130If you have the earlier ports perl 5.16 or 5.8 installed you may like
131to rename your perl executable to perl516 or perl58 or something
132similar before the installation of 5.22.1, this will allow you to use
133both versions at the same time.
134
135=head1 Amiga Specific Modules
136
137=head2 Amiga::ARexx
138
139The Amiga::ARexx module allows you to easily create a perl based ARexx
140host or to send ARexx commands to other programs.
141
142Try C<perldoc Amiga::ARexx> for more info.
143
144=head2 Amiga::Exec
145
146The Amiga::Exec module introduces support for Wait().
147
148Try C<perldoc Amiga::Exec> for more info.
149
150=head1 BUILDING
151
152To build perl under AmigaOS from the patched sources you will need to
153have a recent version of the SDK. Version 53.29 is recommended,
154earlier versions will probably work too.
155
156With the help of Jarkko Hietaniemi the Configure system has been tweaked to
157run under abc-shell so the recommend build process is as follows.
158
159 stack 2000000
160 sh Configure -de
161 gmake
162
163This will build the default setup that installs under SDK:local/newlib/lib/
164
165=head1 CHANGES
166
167=over 6
168
169=item B<August 2015>
170
171=over 2
172
173=item Port to Perl 5.22
174
175=item Add handling of NIL: to afstat()
176
177=item Fix inheritance of environment variables by subprocesses.
178
179=item Fix exec, and exit in "forked" subprocesses.
180
181=item Fix issue with newlib's unlink, which could cause infinite loops.
182
183=item Add flock() emulation using IDOS->LockRecord thanks to Tony Cook
184for the suggestion.
185
186=item Fix issue where kill was using the wrong kind of process ID
187
188=back
189
190=item B<27th November 2013>
191
192=over 2
193
194=item Create new installation system based on installperl links
195and Amiga protection bits now set correctly.
196
197=item Pod now defaults to text.
198
199=item File::Spec should now recognise an Amiga style absolute path as well
200as an Unix style one. Relative paths must always be Unix style.
201
202=back
203
204=item B<20th November 2013>
205
206=over 2
207
208=item Configured to use SDK:Local/C/perl to start standard scripts
209
210=item Added Amiga::Exec module with support for Wait() and AmigaOS signal numbers.
211
212=back
213
214=item B<10th October 13>
215
216First release of port to 5.16.3.
217
218=back
219
220=head1 SEE ALSO
221
222You like this port? See L<http://www.broad.ology.org.uk/amiga/>
223for how you can help.
224
225=cut
226
README.android
1# vim: syntax=pod
2
3If you read this file _as_is_, just ignore the funny characters you
4see. It is written in the POD format (see pod/perlpod.pod) which is
5specially designed to be readable as is.
6
7=head1 NAME
8
9perlandroid - Perl under Android
10
11=head1 SYNOPSIS
12
13The first portions of this document contains instructions
14to cross-compile Perl for Android 2.0 and later, using the
15binaries provided by Google. The latter portions describe how to build
16perl native using one of the toolchains available on the Play Store.
17
18=head1 DESCRIPTION
19
20This document describes how to set up your host environment when
21attempting to build Perl for Android.
22
23=head1 Cross-compilation
24
25These instructions assume an Unixish build environment on your host system;
26they've been tested on Linux and OS X, and may work on Cygwin and MSYS.
27While Google also provides an NDK for Windows, these steps won't work
28native there, although it may be possible to cross-compile through different
29means.
30
31If your host system's architecture is 32 bits, remember to change the
32C<x86_64>'s below to C<x86>'s. On a similar vein, the examples below
33use the 4.8 toolchain; if you want to use something older or newer (for
34example, the 4.4.3 toolchain included in the 8th revision of the NDK), just
35change those to the relevant version.
36
37=head2 Get the Android Native Development Kit (NDK)
38
39You can download the NDK from L<https://developer.android.com/tools/sdk/ndk/index.html>.
40You'll want the normal, non-legacy version.
41
42=head2 Determine the architecture you'll be cross-compiling for
43
44There's three possible options: arm-linux-androideabi for ARM,
45mipsel-linux-android for MIPS, and simply x86 for x86.
46As of 2014, most Android devices run on ARM, so that is generally a safe bet.
47
48With those two in hand, you should add
49
50 $ANDROID_NDK/toolchains/$TARGETARCH-4.8/prebuilt/`uname | tr '[A-Z]' '[a-z]'`-x86_64/bin
51
52to your C<PATH>, where C<$ANDROID_NDK> is the location where you unpacked the
53NDK, and C<$TARGETARCH> is your target's architecture.
54
55=head2 Set up a standalone toolchain
56
57This creates a working sysroot that we can feed to Configure later.
58
59 $ export ANDROID_TOOLCHAIN=/tmp/my-toolchain-$TARGETARCH
60 $ export SYSROOT=$ANDROID_TOOLCHAIN/sysroot
61 $ $ANDROID_NDK/build/tools/make-standalone-toolchain.sh \
62 --platform=android-9 \
63 --install-dir=$ANDROID_TOOLCHAIN \
64 --system=`uname | tr '[A-Z]' '[a-z]'`-x86_64 \
65 --toolchain=$TARGETARCH-4.8
66
67=head2 adb or ssh?
68
69adb is the Android Debug Bridge. For our purposes, it's basically a way
70of establishing an ssh connection to an Android device without having to
71install anything on the device itself, as long as the device is either on
72the same local network as the host, or it is connected to the host through
73USB.
74
75Perl can be cross-compiled using either adb or a normal ssh connection;
76in general, if you can connect your device to the host using a USB port,
77or if you don't feel like installing an sshd app on your device,
78you may want to use adb, although you may be forced to switch to ssh if
79your device is not rooted and you're unlucky -- more on that later.
80Alternatively, if you're cross-compiling to an emulator, you'll have to
81use adb.
82
83=head3 adb
84
85To use adb, download the Android SDK from L<https://developer.android.com/sdk/index.html>.
86The "SDK Tools Only" version should suffice -- if you downloaded the ADT
87Bundle, you can find the sdk under F<$ADT_BUNDLE/sdk/>.
88
89Add F<$ANDROID_SDK/platform-tools> to your C<PATH>, which should give you access
90to adb. You'll now have to find your device's name using C<adb devices>,
91and later pass that to Configure through C<-Dtargethost=$DEVICE>.
92
93However, before calling Configure, you need to check if using adb is a
94viable choice in the first place. Because Android doesn't have a F</tmp>,
95nor does it allow executables in the sdcard, we need to find somewhere in
96the device for Configure to put some files in, as well as for the tests
97to run in. If your device is rooted, then you're good. Try running these:
98
99 $ export TARGETDIR=/mnt/asec/perl
100 $ adb -s $DEVICE shell "echo sh -c '\"mkdir $TARGETDIR\"' | su --"
101
102Which will create the directory we need, and you can move on to the next
103step. F</mnt/asec> is mounted as a tmpfs in Android, but it's only
104accessible to root.
105
106If your device is not rooted, you may still be in luck. Try running this:
107
108 $ export TARGETDIR=/data/local/tmp/perl
109 $ adb -s $DEVICE shell "mkdir $TARGETDIR"
110
111If the command works, you can move to the next step, but beware:
112B<You'll have to remove the directory from the device once you are done!
113Unlike F</mnt/asec>, F</data/local/tmp> may not get automatically garbage
114collected once you shut off the phone>.
115
116If neither of those work, then you can't use adb to cross-compile to your
117device. Either try rooting it, or go for the ssh route.
118
119=head3 ssh
120
121To use ssh, you'll need to install and run a sshd app and set it up
122properly. There are several paid and free apps that do this rather
123easily, so you should be able to spot one on the store.
124Remember that Perl requires a passwordless connection, so set up a
125public key.
126
127Note that several apps spew crap to stderr every time you
128connect, which can throw off Configure. You may need to monkeypatch
129the part of Configure that creates C<run-ssh> to have it discard stderr.
130
131Since you're using ssh, you'll have to pass some extra arguments to
132Configure:
133
134 -Dtargetrun=ssh -Dtargethost=$TARGETHOST -Dtargetuser=$TARGETUSER -Dtargetport=$TARGETPORT
135
136=head2 Configure and beyond
137
138With all of the previous done, you're now ready to call Configure.
139
140If using adb, a "basic" Configure line will look like this:
141
142 $ ./Configure -des -Dusedevel -Dusecrosscompile -Dtargetrun=adb \
143 -Dcc=$TARGETARCH-gcc \
144 -Dsysroot=$SYSROOT \
145 -Dtargetdir=$TARGETDIR \
146 -Dtargethost=$DEVICE
147
148If using ssh, it's not too different -- we just change targetrun to ssh,
149and pass in targetuser and targetport. It ends up looking like this:
150
151 $ ./Configure -des -Dusedevel -Dusecrosscompile -Dtargetrun=ssh \
152 -Dcc=$TARGETARCH-gcc \
153 -Dsysroot=$SYSROOT \
154 -Dtargetdir=$TARGETDIR \
155 -Dtargethost="$TARGETHOST" \
156 -Dtargetuser=$TARGETUSER \
157 -Dtargetport=$TARGETPORT
158
159Now you're ready to run C<make> and C<make test>!
160
161As a final word of warning, if you're using adb, C<make test> may appear to
162hang; this is because it doesn't output anything until it finishes
163running all tests. You can check its progress by logging into the
164device, moving to F<$TARGETDIR>, and looking at the file F<output.stdout>.
165
166=head3 Notes
167
168=over
169
170=item *
171
172If you are targetting x86 Android, you will have to change C<$TARGETARCH-gcc>
173to C<i686-linux-android-gcc>.
174
175=item *
176
177On some older low-end devices -- think early 2.2 era -- some tests,
178particularly F<t/re/uniprops.t>, may crash the phone, causing it to turn
179itself off once, and then back on again.
180
181=back
182
183=head1 Native Builds
184
185While Google doesn't provide a native toolchain for Android,
186you can still get one from the Play Store.
187
188=head2 CCTools
189
190You may be able to get the CCTools app, which is free.
191Keep in mind that you want a full toolchain;
192some apps tend to default to installing only a barebones
193version without some important utilities, like ar or nm.
194
195Once you have the toolchain set up properly, the only
196remaining hurdle is actually locating where in the device it was installed
197in. For example, CCTools installs its toolchain in
198F</data/data/com.pdaxrom.cctools/root/cctools>. With the path in hand,
199compiling perl is little more than:
200
201 export SYSROOT=<location of the native toolchain>
202 export LD_LIBRARY_PATH="$SYSROOT/lib:`pwd`:`pwd`/lib:`pwd`/lib/auto:$LD_LIBRARY_PATH"
203 sh Configure -des -Dsysroot=$SYSROOT -Alibpth="/system/lib /vendor/lib"
204
205=head2 Termux
206
207L<Termux|https://termux.com/> provides an Android terminal emulator and Linux environment.
208It comes with a cross-compiled perl already installed.
209
210Natively compiling perl 5.30 or later should be as straightforward as:
211
212 sh Configure -des -Alibpth="/system/lib /vendor/lib"
213
214This certainly works on Android 8.1 (Oreo) at least...
215
216=head1 AUTHOR
217
218Brian Fraser <fraserbn@gmail.com>
219
220=cut
221
README.bs2000
1# vim: syntax=pod
2
3This document is written in pod format hence there are punctuation
4characters in odd places. Do not worry, you've apparently got the
5ASCII->EBCDIC translation worked out correctly. You can read more
6about pod in pod/perlpod.pod or the short summary in the INSTALL file.
7
8=head1 NAME
9
10perlbs2000 - building and installing Perl for BS2000.
11
12B<This document needs to be updated, but we don't know what it should say.
13Please submit comments to L<https://github.com/Perl/perl5/issues>.>
14
15=head1 SYNOPSIS
16
17This document will help you Configure, build, test and install Perl
18on BS2000 in the POSIX subsystem.
19
20=head1 DESCRIPTION
21
22This is a ported perl for the POSIX subsystem in BS2000 VERSION OSD
23V3.1A or later. It may work on other versions, but we started porting
24and testing it with 3.1A and are currently using Version V4.0A.
25
26You may need the following GNU programs in order to install perl:
27
28=head2 gzip on BS2000
29
30We used version 1.2.4, which could be installed out of the box with
31one failure during 'make check'.
32
33=head2 bison on BS2000
34
35The yacc coming with BS2000 POSIX didn't work for us. So we had to
36use bison. We had to make a few changes to perl in order to use the
37pure (reentrant) parser of bison. We used version 1.25, but we had to
38add a few changes due to EBCDIC. See below for more details
39concerning yacc.
40
41=head2 Unpacking Perl Distribution on BS2000
42
43To extract an ASCII tar archive on BS2000 POSIX you need an ASCII
44filesystem (we used the mountpoint /usr/local/ascii for this). Now
45you extract the archive in the ASCII filesystem without
46I/O-conversion:
47
48cd /usr/local/ascii
49export IO_CONVERSION=NO
50gunzip < /usr/local/src/perl.tar.gz | pax -r
51
52You may ignore the error message for the first element of the archive
53(this doesn't look like a tar archive / skipping to next file...),
54it's only the directory which will be created automatically anyway.
55
56After extracting the archive you copy the whole directory tree to your
57EBCDIC filesystem. B<This time you use I/O-conversion>:
58
59cd /usr/local/src
60IO_CONVERSION=YES
61cp -r /usr/local/ascii/perl5.005_02 ./
62
63=head2 Compiling Perl on BS2000
64
65There is a "hints" file for BS2000 called hints.posix-bc (because
66posix-bc is the OS name given by `uname`) that specifies the correct
67values for most things. The major problem is (of course) the EBCDIC
68character set. We have german EBCDIC version.
69
70Because of our problems with the native yacc we used GNU bison to
71generate a pure (=reentrant) parser for perly.y. So our yacc is
72really the following script:
73
74-----8<-----/usr/local/bin/yacc-----8<-----
75#! /usr/bin/sh
76
77# Bison as a reentrant yacc:
78
79# save parameters:
80params=""
81while [[ $# -gt 1 ]]; do
82 params="$params $1"
83 shift
84done
85
86# add flag %pure_parser:
87
88tmpfile=/tmp/bison.$$.y
89echo %pure_parser > $tmpfile
90cat $1 >> $tmpfile
91
92# call bison:
93
94echo "/usr/local/bin/bison --yacc $params $1\t\t\t(Pure Parser)"
95/usr/local/bin/bison --yacc $params $tmpfile
96
97# cleanup:
98
99rm -f $tmpfile
100-----8<----------8<-----
101
102We still use the normal yacc for a2p.y though!!! We made a softlink
103called byacc to distinguish between the two versions:
104
105ln -s /usr/bin/yacc /usr/local/bin/byacc
106
107We build perl using GNU make. We tried the native make once and it
108worked too.
109
110=head2 Testing Perl on BS2000
111
112We still got a few errors during C<make test>. Some of them are the
113result of using bison. Bison prints I<parser error> instead of I<syntax
114error>, so we may ignore them. The following list shows
115our errors, your results may differ:
116
117op/numconvert.......FAILED tests 1409-1440
118op/regexp...........FAILED tests 483, 496
119op/regexp_noamp.....FAILED tests 483, 496
120pragma/overload.....FAILED tests 152-153, 170-171
121pragma/warnings.....FAILED tests 14, 82, 129, 155, 192, 205, 207
122lib/bigfloat........FAILED tests 351-352, 355
123lib/bigfltpm........FAILED tests 354-355, 358
124lib/complex.........FAILED tests 267, 487
125lib/dumper..........FAILED tests 43, 45
126Failed 11/231 test scripts, 95.24% okay. 57/10595 subtests failed, 99.46% okay.
127
128=head2 Installing Perl on BS2000
129
130We have no nroff on BS2000 POSIX (yet), so we ignored any errors while
131installing the documentation.
132
133
134=head2 Using Perl in the Posix-Shell of BS2000
135
136BS2000 POSIX doesn't support the shebang notation
137(C<#!/usr/local/bin/perl>), so you have to use the following lines
138instead:
139
140: # use perl
141 eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
142 if 0; # ^ Run only under a shell
143
144=head2 Using Perl in "native" BS2000
145
146We don't have much experience with this yet, but try the following:
147
148Copy your Perl executable to a BS2000 LLM using bs2cp:
149
150C<bs2cp /usr/local/bin/perl 'bs2:perl(perl,l)'>
151
152Now you can start it with the following (SDF) command:
153
154C</START-PROG FROM-FILE=*MODULE(PERL,PERL),PROG-MODE=*ANY,RUN-MODE=*ADV>
155
156First you get the BS2000 commandline prompt ('*'). Here you may enter
157your parameters, e.g. C<-e 'print "Hello World!\\n";'> (note the
158double backslash!) or C<-w> and the name of your Perl script.
159Filenames starting with C</> are searched in the Posix filesystem,
160others are searched in the BS2000 filesystem. You may even use
161wildcards if you put a C<%> in front of your filename (e.g. C<-w
162checkfiles.pl %*.c>). Read your C/C++ manual for additional
163possibilities of the commandline prompt (look for
164PARAMETER-PROMPTING).
165
166=head2 Floating point anomalies on BS2000
167
168There appears to be a bug in the floating point implementation on BS2000 POSIX
169systems such that calling int() on the product of a number and a small
170magnitude number is not the same as calling int() on the quotient of
171that number and a large magnitude number. For example, in the following
172Perl code:
173
174 my $x = 100000.0;
175 my $y = int($x * 1e-5) * 1e5; # '0'
176 my $z = int($x / 1e+5) * 1e5; # '100000'
177 print "\$y is $y and \$z is $z\n"; # $y is 0 and $z is 100000
178
179Although one would expect the quantities $y and $z to be the same and equal
180to 100000 they will differ and instead will be 0 and 100000 respectively.
181
182=head2 Using PerlIO and different encodings on ASCII and EBCDIC partitions
183
184Since version 5.8 Perl uses the new PerlIO on BS2000. This enables
185you using different encodings per IO channel. For example you may use
186
187 use Encode;
188 open($f, ">:encoding(ascii)", "test.ascii");
189 print $f "Hello World!\n";
190 open($f, ">:encoding(posix-bc)", "test.ebcdic");
191 print $f "Hello World!\n";
192 open($f, ">:encoding(latin1)", "test.latin1");
193 print $f "Hello World!\n";
194 open($f, ">:encoding(utf8)", "test.utf8");
195 print $f "Hello World!\n";
196
197to get two files containing "Hello World!\n" in ASCII, EBCDIC, ISO
198Latin-1 (in this example identical to ASCII) respective UTF-EBCDIC (in
199this example identical to normal EBCDIC). See the documentation of
200Encode::PerlIO for details.
201
202As the PerlIO layer uses raw IO internally, all this totally ignores
203the type of your filesystem (ASCII or EBCDIC) and the IO_CONVERSION
204environment variable. If you want to get the old behavior, that the
205BS2000 IO functions determine conversion depending on the filesystem
206PerlIO still is your friend. You use IO_CONVERSION as usual and tell
207Perl, that it should use the native IO layer:
208
209 export IO_CONVERSION=YES
210 export PERLIO=stdio
211
212Now your IO would be ASCII on ASCII partitions and EBCDIC on EBCDIC
213partitions. See the documentation of PerlIO (without C<Encode::>!)
214for further possibilities.
215
216=head1 AUTHORS
217
218Thomas Dorner
219
220=head1 SEE ALSO
221
222L<INSTALL>, L<perlport>.
223
224=head2 Mailing list
225
226If you are interested in the z/OS (formerly known as OS/390)
227and POSIX-BC (BS2000) ports of Perl then see the perl-mvs mailing list.
228To subscribe, send an empty message to perl-mvs-subscribe@perl.org.
229
230See also:
231
232 https://lists.perl.org/list/perl-mvs.html
233
234There are web archives of the mailing list at:
235
236 https://www.nntp.perl.org/group/perl.mvs/
237
238=head1 HISTORY
239
240This document was originally written by Thomas Dorner for the 5.005
241release of Perl.
242
243This document was podified for the 5.6 release of perl 11 July 2000.
244
245=cut
246
README.cn
1# vim: syntax=pod
2
3如果你用一般的文字编辑器阅览这份文件, 请忽略文中奇特的注记字符.
4这份文件是以 POD (简明文件格式) 写成; 这种格式是为了能让人直接阅读,
5而特别设计的. 关于此格式的进一步信息, 请参考 perlpod 在线文档.
6
7=encoding utf8
8
9=head1 NAME
10
11perlcn - 简体中文 Perl 指南
12
13=head1 DESCRIPTION
14
15欢迎来到 Perl 的天地!
16
17从 5.8.0 版开始, Perl 具备了完善的 Unicode (统一码) 支持,
18也连带支持了许多拉丁语系以外的编码方式; CJK (中日韩) 便是其中的一部分.
19Unicode 是国际性的标准, 试图涵盖世界上所有的字符: 西方世界, 东方世界,
20以及两者间的一切 (希腊文, 叙利亚文, 阿拉伯文, 希伯来文, 印度文,
21印地安文, 等等). 它也容纳了多种操作系统与平台 (如 PC 及麦金塔).
22
23Perl 本身以 Unicode 进行操作. 这表示 Perl 内部的字符串数据可用 Unicode
24表示; Perl 的函数与运算符 (例如正则表达式匹配) 也能对 Unicode 进行操作.
25在输入及输出时, 为了处理以 Unicode 之前的编码方式储存的数据, Perl
26提供了 Encode 这个模块, 可以让你轻易地读写使用旧有的编码格式的数据.
27
28Encode 扩展模块支持下列简体中文的编码方式 ('gb2312' 表示 'euc-cn'):
29
30 euc-cn Unix 扩展字符集, 也就是俗称的国标码
31 gb2312-raw 未经处理的 (低比特) GB2312 字符表
32 gb12345 未经处理的中国用繁体中文编码
33 iso-ir-165 GB2312 + GB6345 + GB8565 + 新增字符
34 cp936 字码页 936, 也可以用 'GBK' (扩充国标码) 指明
35 hz 7 比特逸出式 GB2312 编码
36
37举例来说, 将 EUC-CN 编码的文件转成 Unicode, 只需输入以下命令:
38
39 perl -Mencoding=euc-cn,STDOUT,utf8 -pe1 < file.euc-cn > file.utf8
40
41Perl 也内附了 "piconv", 一个完全以 Perl 写成的字符转换工具程序, 用法如下:
42
43 piconv -f euc-cn -t utf8 < file.euc-cn > file.utf8
44 piconv -f utf8 -t euc-cn < file.utf8 > file.euc-cn
45
46另外, 利用 encoding 模块, 你可以轻易写出以字符为单位的代码, 如下所示:
47
48 #!/usr/bin/env perl
49 # 启动 euc-cn 字串解析; 标准输出入及标准错误都设为 euc-cn 编码
50 use encoding 'euc-cn', STDIN => 'euc-cn', STDOUT => 'euc-cn';
51 print length("骆驼"); # 2 (双引号表示字符)
52 print length('骆驼'); # 4 (单引号表示字节)
53 print index("谆谆教诲", "蛔唤"); # -1 (不包含此子字符串)
54 print index('谆谆教诲', '蛔唤'); # 1 (从第二个字节开始)
55
56在最后一列例子里, "谆" 的第二个字节与 "谆" 的第一个字节结合成 EUC-CN
57码的 "蛔"; "谆" 的第二个字节则与 "教" 的第一个字节结合成 "唤".
58这解决了以前 EUC-CN 码匹配处理上常见的问题.
59
60=head2 额外的中文编码
61
62如果需要更多的中文编码, 可以从 CPAN (L<https://www.cpan.org/>) 下载
63Encode::HanExtra 模块. 它目前提供下列编码方式:
64
65 gb18030 扩充过的国标码, 包含繁体中文
66
67另外, Encode::HanConvert 模块则提供了简繁转换用的两种编码:
68
69 big5-simp Big5 繁体中文与 Unicode 简体中文互转
70 gbk-trad GBK 简体中文与 Unicode 繁体中文互转
71
72若想在 GBK 与 Big5 之间互转, 请参考该模块内附的 b2g.pl 与 g2b.pl 两个程序,
73或在程序内使用下列写法:
74
75 use Encode::HanConvert;
76 $euc_cn = big5_to_gb($big5); # 从 Big5 转为 GBK
77 $big5 = gb_to_big5($euc_cn); # 从 GBK 转为 Big5
78
79=head2 进一步的信息
80
81请参考 Perl 内附的大量说明文件 (不幸全是用英文写的), 来学习更多关于
82Perl 的知识, 以及 Unicode 的使用方式. 不过, 外部的资源相当丰富:
83
84=head2 提供 Perl 资源的网址
85
86=over 4
87
88=item L<https://www.perl.org/>
89
90=back
91
92Perl 的首页
93
94=over 4
95
96=item L<https://www.perl.com/>
97
98由 Perl 基金会运营的文章辑录
99
100=item L<https://www.cpan.org/>
101
102Perl 综合典藏网 (Comprehensive Perl Archive Network)
103
104=item L<https://lists.perl.org/>
105
106Perl 邮递论坛一览
107
108=back
109
110=head2 学习 Perl 的网址
111
112=over 4
113
114=item L<http://www.oreilly.com.cn/index.php?func=booklist&cat=68>
115
116简体中文版的欧莱礼 Perl 书藉
117
118=back
119
120=head2 Perl 使用者集会
121
122=over 4
123
124=item L<https://www.pm.org/groups/asia.html>
125
126中国 Perl 推广组一览
127
128=back
129
130=head2 Unicode 相关网址
131
132=over 4
133
134=item L<https://www.unicode.org/>
135
136Unicode 学术学会 (Unicode 标准的制定者)
137
138=item L<https://www.cl.cam.ac.uk/%7Emgk25/unicode.html>
139
140Unix/Linux 上的 UTF-8 及 Unicode 常见问题解答
141
142=back
143
144=head1 SEE ALSO
145
146L<Encode>, L<Encode::CN>, L<encoding>, L<perluniintro>, L<perlunicode>
147
148=head1 AUTHORS
149
150Jarkko Hietaniemi E<lt>jhi@iki.fiE<gt>
151
152Audrey Tang (唐凤) E<lt>audreyt@audreyt.orgE<gt>
153
154Sizhe Zhao E<lt>prc.zhao@outlook.comE<gt>
155
156=cut
157
README.cygwin
1# vim: syntax=pod
2
3If you read this file _as_is_, just ignore the funny characters you
4see. It is written in the POD format (see F<pod/perlpod.pod>) which is
5specially designed to be readable as is.
6
7=head1 NAME
8
9perlcygwin - Perl for Cygwin
10
11=head1 SYNOPSIS
12
13This document will help you configure, make, test and install Perl
14on Cygwin. This document also describes features of Cygwin that will
15affect how Perl behaves at runtime.
16
17B<NOTE:> There are pre-built Perl packages available for Cygwin and a
18version of Perl is provided in the normal Cygwin install. If you do
19not need to customize the configuration, consider using one of those
20packages.
21
22
23=head1 PREREQUISITES FOR COMPILING PERL ON CYGWIN
24
25=head2 Cygwin = GNU+Cygnus+Windows (Don't leave UNIX without it)
26
27The Cygwin tools are ports of the popular GNU development tools for Win32
28platforms. They run thanks to the Cygwin library which provides the UNIX
29system calls and environment these programs expect. More information
30about this project can be found at:
31
32L<https://www.cygwin.com/>
33
34A recent net or commercial release of Cygwin is required.
35
36At the time this document was last updated, Cygwin 3.0.7 was current.
37
38
39=head2 Cygwin Configuration
40
41While building Perl some changes may be necessary to your Cygwin setup so
42that Perl builds cleanly. These changes are B<not> required for normal
43Perl usage.
44
45B<NOTE:> The binaries that are built will run on all Win32 versions.
46They do not depend on your host system or your
47Cygwin configuration (binary/text mounts, cygserver).
48The only dependencies come from hard-coded pathnames like F</usr/local>.
49However, your host system and Cygwin configuration will affect Perl's
50runtime behavior (see L</"TEST">).
51
52=over 4
53
54=item * C<PATH>
55
56Set the C<PATH> environment variable so that Configure finds the Cygwin
57versions of programs. Any not-needed Windows directories should be removed or
58moved to the end of your C<PATH>.
59
60=item * I<nroff>
61
62If you do not have I<nroff> (which is part of the I<groff> package),
63Configure will B<not> prompt you to install I<man> pages.
64
65=back
66
67=head1 CONFIGURE PERL ON CYGWIN
68
69The default options gathered by Configure with the assistance of
70F<hints/cygwin.sh> will build a Perl that supports dynamic loading
71(which requires a shared F<cygperl5_16.dll>).
72
73This will run Configure and keep a record:
74
75 ./Configure 2>&1 | tee log.configure
76
77If you are willing to accept all the defaults run Configure with B<-de>.
78However, several useful customizations are available.
79
80=head2 Stripping Perl Binaries on Cygwin
81
82It is possible to strip the EXEs and DLLs created by the build process.
83The resulting binaries will be significantly smaller. If you want the
84binaries to be stripped, you can either add a B<-s> option when Configure
85prompts you,
86
87 Any additional ld flags (NOT including libraries)? [none] -s
88 Any special flags to pass to g++ to create a dynamically loaded
89 library?
90 [none] -s
91 Any special flags to pass to gcc to use dynamic linking? [none] -s
92
93or you can edit F<hints/cygwin.sh> and uncomment the relevant variables
94near the end of the file.
95
96=head2 Optional Libraries for Perl on Cygwin
97
98Several Perl functions and modules depend on the existence of
99some optional libraries. Configure will find them if they are
100installed in one of the directories listed as being used for library
101searches. Pre-built packages for most of these are available from
102the Cygwin installer.
103
104=over 4
105
106=item * C<-lcrypt>
107
108The crypt package distributed with Cygwin is a Linux compatible 56-bit
109DES crypt port by Corinna Vinschen.
110
111Alternatively, the crypt libraries in GNU libc have been ported to Cygwin.
112
113As of libcrypt 1.3 (March 2016), you will need to install the
114libcrypt-devel package for Configure to detect crypt().
115
116=item * C<-lgdbm_compat> (C<use GDBM_File>)
117
118GDBM is available for Cygwin.
119
120NOTE: The GDBM library only works on NTFS partitions.
121
122=item * C<-ldb> (C<use DB_File>)
123
124BerkeleyDB is available for Cygwin.
125
126NOTE: The BerkeleyDB library only completely works on NTFS partitions.
127
128=item * C<cygserver> (C<use IPC::SysV>)
129
130A port of SysV IPC is available for Cygwin.
131
132NOTE: This has B<not> been extensively tested. In particular,
133C<d_semctl_semun> is undefined because it fails a Configure test. It
134also creates a compile time dependency because F<perl.h> includes
135F<<sys/ipc.h>> and F<<sys/sem.h>> (which will be required in the
136future when compiling CPAN modules). CURRENTLY NOT SUPPORTED!
137
138=item * C<-lutil>
139
140Included with the standard Cygwin netrelease is the inetutils package
141which includes libutil.a.
142
143=back
144
145=head2 Configure-time Options for Perl on Cygwin
146
147The F<INSTALL> document describes several Configure-time options. Some of
148these will work with Cygwin, others are not yet possible. Also, some of
149these are experimental. You can either select an option when Configure
150prompts you or you can define (undefine) symbols on the command line.
151
152=over 4
153
154=item * C<-Uusedl>
155
156Undefining this symbol forces Perl to be compiled statically.
157
158=item * C<-Dusemymalloc>
159
160By default Perl does not use the C<malloc()> included with the Perl source,
161because it was slower and not entirely thread-safe. If you want to force
162Perl to build with the old -Dusemymalloc define this.
163
164=item * C<-Uuseperlio>
165
166Undefining this symbol disables the PerlIO abstraction. PerlIO is now the
167default; it is not recommended to disable PerlIO.
168
169=item * C<-Dusemultiplicity>
170
171Multiplicity is required when embedding Perl in a C program and using
172more than one interpreter instance. This is only required when you build
173a not-threaded perl with C<-Uuseithreads>.
174
175=item * C<-Uuse64bitint>
176
177By default Perl uses 64 bit integers. If you want to use smaller 32 bit
178integers, define this symbol.
179
180=item * C<-Duselongdouble>
181
182I<gcc> supports long doubles (12 bytes). However, several additional
183long double math functions are necessary to use them within Perl
184(I<{atan2, cos, exp, floor, fmod, frexp, isnan, log, modf, pow, sin, sqrt}l,
185strtold>).
186These are B<not> yet available with newlib, the Cygwin libc.
187
188=item * C<-Uuseithreads>
189
190Define this symbol if you want not-threaded faster perl.
191
192=item * C<-Duselargefiles>
193
194Cygwin uses 64-bit integers for internal size and position calculations,
195this will be correctly detected and defined by Configure.
196
197=item * C<-Dmksymlinks>
198
199Use this to build perl outside of the source tree. Details can be
200found in the F<INSTALL> document. This is the recommended way to
201build perl from sources.
202
203=back
204
205=head1 MAKE ON CYGWIN
206
207Simply run I<make> and wait:
208
209 make -jn 2>&1 | tee log.make
210
211where I<n> is the maximum number of simultaneous compilations you want;
212omitting this parameter is the same as specifying C<-j1>.
213
214=head1 TEST ON CYGWIN
215
216There are two steps to running the test suite:
217
218 make test 2>&1 | tee log.make-test
219
220 cd t; ./perl harness 2>&1 | tee ../log.harness
221
222The same tests are run both times, but more information is provided when
223running as C<./perl harness>, and you can run the tests in parallel by
224instead specifying
225
226 cd t; TEST_JOBS=n ./perl harness 2>&1 | tee ../log.harness
227
228where I<n> is the maximum number of tests to run simulataneously.
229
230Test results vary depending on your host system and your Cygwin
231configuration. If a test can pass in some Cygwin setup, it is always
232attempted and explainable test failures are documented. It is possible
233for Perl to pass all the tests, but it is more likely that some tests
234will fail for one of the reasons listed below.
235
236=head2 File Permissions on Cygwin
237
238UNIX file permissions are based on sets of mode bits for
239{read,write,execute} for each {user,group,other}. By default Cygwin
240only tracks the Win32 read-only attribute represented as the UNIX file
241user write bit (files are always readable, files are executable if they
242have a F<.{com,bat,exe}> extension or begin with C<#!>, directories are
243always readable and executable). On WinNT with the I<ntea> C<CYGWIN>
244setting, the additional mode bits are stored as extended file attributes.
245On WinNT with the default I<ntsec> C<CYGWIN> setting, permissions use the
246standard WinNT security descriptors and access control lists. Without one of
247these options, these tests will fail (listing not updated yet):
248
249 Failed Test List of failed
250 ------------------------------------
251 io/fs.t 5, 7, 9-10
252 lib/anydbm.t 2
253 lib/db-btree.t 20
254 lib/db-hash.t 16
255 lib/db-recno.t 18
256 lib/gdbm.t 2
257 lib/ndbm.t 2
258 lib/odbm.t 2
259 lib/sdbm.t 2
260 op/stat.t 9, 20 (.tmp not an executable extension)
261
262=head2 NDBM_File and ODBM_File do not work on FAT filesystems
263
264Do not use NDBM_File or ODBM_File on FAT filesystem. They can be
265built on a FAT filesystem, but many tests will fail:
266
267 ../ext/NDBM_File/ndbm.t 13 3328 71 59 83.10% 1-2 4 16-71
268 ../ext/ODBM_File/odbm.t 255 65280 ?? ?? % ??
269 ../lib/AnyDBM_File.t 2 512 12 2 16.67% 1 4
270 ../lib/Memoize/t/errors.t 0 139 11 5 45.45% 7-11
271 ../lib/Memoize/t/tie_ndbm.t 13 3328 4 4 100.00% 1-4
272 run/fresh_perl.t 97 1 1.03% 91
273
274If you intend to run only on FAT (or if using AnyDBM_File on FAT),
275run Configure with the -Ui_ndbm and -Ui_dbm options to prevent
276NDBM_File and ODBM_File being built.
277
278With NTFS (and no CYGWIN=nontsec), there should be no problems even if
279perl was built on FAT.
280
281=head2 C<fork()> failures in io_* tests
282
283A C<fork()> failure may result in the following tests failing:
284
285 ext/IO/lib/IO/t/io_multihomed.t
286 ext/IO/lib/IO/t/io_sock.t
287 ext/IO/lib/IO/t/io_unix.t
288
289See comment on fork in L</Miscellaneous> below.
290
291=head1 Specific features of the Cygwin port
292
293=head2 Script Portability on Cygwin
294
295Cygwin does an outstanding job of providing UNIX-like semantics on top of
296Win32 systems. However, in addition to the items noted above, there are
297some differences that you should know about. This is a very brief guide
298to portability, more information can be found in the Cygwin documentation.
299
300=over 4
301
302=item * Pathnames
303
304Cygwin pathnames are separated by forward (F</>) slashes, Universal
305Naming Codes (F<//UNC>) are also supported. Since cygwin-1.7 non-POSIX
306pathnames should not be used. Names may contain all printable
307characters.
308
309File names are case insensitive, but case preserving. A pathname that
310contains a backslash or drive letter is a Win32 pathname, and not
311subject to the translations applied to POSIX style pathnames, but
312cygwin will warn you, so better convert them to POSIX.
313
314For conversion we have C<Cygwin::win_to_posix_path()> and
315C<Cygwin::posix_to_win_path()>.
316
317Since cygwin-1.7 pathnames are UTF-8 encoded.
318
319=item * Text/Binary
320
321Since cygwin-1.7 textmounts are deprecated and strongly discouraged.
322
323When a file is opened it is in either text or binary mode. In text mode
324a file is subject to CR/LF/Ctrl-Z translations. With Cygwin, the default
325mode for an C<open()> is determined by the mode of the mount that underlies
326the file. See L</Cygwin::is_binmount>(). Perl provides a C<binmode()> function
327to set binary mode on files that otherwise would be treated as text.
328C<sysopen()> with the C<O_TEXT> flag sets text mode on files that otherwise
329would be treated as binary:
330
331 sysopen(FOO, "bar", O_WRONLY|O_CREAT|O_TEXT)
332
333C<lseek()>, C<tell()> and C<sysseek()> only work with files opened in binary
334mode.
335
336The text/binary issue is covered at length in the Cygwin documentation.
337
338=item * PerlIO
339
340PerlIO overrides the default Cygwin Text/Binary behaviour. A file will
341always be treated as binary, regardless of the mode of the mount it lives
342on, just like it is in UNIX. So CR/LF translation needs to be requested in
343either the C<open()> call like this:
344
345 open(FH, ">:crlf", "out.txt");
346
347which will do conversion from LF to CR/LF on the output, or in the
348environment settings (add this to your .bashrc):
349
350 export PERLIO=crlf
351
352which will pull in the crlf PerlIO layer which does LF -> CRLF conversion
353on every output generated by perl.
354
355=item * F<.exe>
356
357The Cygwin C<stat()>, C<lstat()> and C<readlink()> functions make the F<.exe>
358extension transparent by looking for F<foo.exe> when you ask for F<foo>
359(unless a F<foo> also exists). Cygwin does not require a F<.exe>
360extension, but I<gcc> adds it automatically when building a program.
361However, when accessing an executable as a normal file (e.g., I<cp>
362in a makefile) the F<.exe> is not transparent. The I<install> program
363included with Cygwin automatically appends a F<.exe> when necessary.
364
365=item * Cygwin vs. Windows process ids
366
367Cygwin processes have their own pid, which is different from the
368underlying windows pid. Most posix compliant Proc functions expect
369the cygwin pid, but several Win32::Process functions expect the
370winpid. E.g. C<$$> is the cygwin pid of F</usr/bin/perl>, which is not
371the winpid. Use C<Cygwin::pid_to_winpid()> and C<Cygwin::winpid_to_pid()>
372to translate between them.
373
374=item * Cygwin vs. Windows errors
375
376Under Cygwin, $^E is the same as $!. When using L<Win32 API Functions|Win32>,
377use C<Win32::GetLastError()> to get the last Windows error.
378
379=item * rebase errors on fork or system
380
381Using C<fork()> or C<system()> out to another perl after loading multiple dlls
382may result on a DLL baseaddress conflict. The internal cygwin error
383looks like like the following:
384
385 0 [main] perl 8916 child_info_fork::abort: data segment start:
386 parent (0xC1A000) != child(0xA6A000)
387
388or:
389
390 183 [main] perl 3588 C:\cygwin\bin\perl.exe: *** fatal error -
391 unable to remap C:\cygwin\bin\cygsvn_subr-1-0.dll to same address
392 as parent(0x6FB30000) != 0x6FE60000 46 [main] perl 3488 fork: child
393 3588 - died waiting for dll loading, errno11
394
395See L<https://cygwin.com/faq/faq.html#faq.using.fixing-fork-failures>
396It helps if not too many DLLs are loaded in memory so the available address space is larger,
397e.g. stopping the MS Internet Explorer might help.
398
399+Use the rebase utilities to resolve the conflicting dll addresses.
400The rebase package is included in the Cygwin setup. Use F<setup.exe>
401from L<https://cygwin.com/install.html> to install it.
402
4031. kill all perl processes and run
404 C<</bin/find <dir> -xdev -name \*.dll | /bin/rebase -OT ->> or
405
4062. kill all cygwin processes and services, and run setup.exe.
407
408=item * Miscellaneous
409
410File locking using the C<F_GETLK> command to C<fcntl()> is a stub that
411returns C<ENOSYS>.
412
413The Cygwin C<chroot()> implementation has holes (it can not restrict file
414access by native Win32 programs).
415
416Inplace editing C<perl -i> of files doesn't work without doing a backup
417of the file being edited C<perl -i.bak> because of windowish restrictions,
418therefore Perl adds the suffix C<.bak> automatically if you use C<perl -i>
419without specifying a backup extension.
420
421=back
422
423=head2 Prebuilt methods:
424
425=over 4
426
427=item C<Cwd::cwd>
428
429Returns the current working directory.
430
431=item C<Cygwin::pid_to_winpid>
432
433Translates a cygwin pid to the corresponding Windows pid (which may or
434may not be the same).
435
436=item C<Cygwin::winpid_to_pid>
437
438Translates a Windows pid to the corresponding cygwin pid (if any).
439
440=item C<Cygwin::win_to_posix_path>
441
442Translates a Windows path to the corresponding cygwin path respecting
443the current mount points. With a second non-null argument returns an
444absolute path. Double-byte characters will not be translated.
445
446=item C<Cygwin::posix_to_win_path>
447
448Translates a cygwin path to the corresponding cygwin path respecting
449the current mount points. With a second non-null argument returns an
450absolute path. Double-byte characters will not be translated.
451
452=item C<Cygwin::mount_table()>
453
454Returns an array of [mnt_dir, mnt_fsname, mnt_type, mnt_opts].
455
456 perl -e 'for $i (Cygwin::mount_table) {print join(" ",@$i),"\n";}'
457 /bin c:\cygwin\bin system binmode,cygexec
458 /usr/bin c:\cygwin\bin system binmode
459 /usr/lib c:\cygwin\lib system binmode
460 / c:\cygwin system binmode
461 /cygdrive/c c: system binmode,noumount
462 /cygdrive/d d: system binmode,noumount
463 /cygdrive/e e: system binmode,noumount
464
465=item C<Cygwin::mount_flags>
466
467Returns the mount type and flags for a specified mount point.
468A comma-separated string of mntent->mnt_type (always
469"system" or "user"), then the mntent->mnt_opts, where
470the first is always "binmode" or "textmode".
471
472 system|user,binmode|textmode,exec,cygexec,cygdrive,mixed,
473 notexec,managed,nosuid,devfs,proc,noumount
474
475If the argument is "/cygdrive", then just the volume mount settings,
476and the cygdrive mount prefix are returned.
477
478User mounts override system mounts.
479
480 $ perl -e 'print Cygwin::mount_flags "/usr/bin"'
481 system,binmode,cygexec
482 $ perl -e 'print Cygwin::mount_flags "/cygdrive"'
483 binmode,cygdrive,/cygdrive
484
485=item C<Cygwin::is_binmount>
486
487Returns true if the given cygwin path is binary mounted, false if the
488path is mounted in textmode.
489
490=item C<Cygwin::sync_winenv>
491
492Cygwin does not initialize all original Win32 environment variables.
493See the bottom of this page L<https://cygwin.com/cygwin-ug-net/setup-env.html>
494for "Restricted Win32 environment".
495
496Certain Win32 programs called from cygwin programs might need some environment
497variable, such as e.g. ADODB needs %COMMONPROGRAMFILES%.
498Call Cygwin::sync_winenv() to copy all Win32 environment variables to your
499process and note that cygwin will warn on every encounter of non-POSIX paths.
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.
524
525=over 4
526
527=item Documentation
528
529 INSTALL README.cygwin README.win32 MANIFEST
530 pod/perl.pod pod/perlport.pod pod/perlfaq3.pod
531 pod/perldelta.pod pod/perl5004delta.pod pod/perl56delta.pod
532 pod/perl561delta.pod pod/perl570delta.pod pod/perl572delta.pod
533 pod/perl573delta.pod pod/perl58delta.pod pod/perl581delta.pod
534 pod/perl590delta.pod pod/perlhist.pod pod/perlmodlib.pod
535 pod/perltoc.pod Porting/Glossary pod/perlgit.pod
536 Porting/updateAUTHORS.pl
537 dist/Cwd/Changes ext/Compress-Raw-Zlib/Changes
538 dist/Time-HiRes/Changes
539 ext/Compress-Raw-Zlib/README ext/Compress-Zlib/Changes
540 ext/DB_File/Changes ext/Encode/Changes ext/Sys-Syslog/Changes
541 ext/Win32API-File/Changes
542 lib/ExtUtils/CBuilder/Changes lib/ExtUtils/Changes
543 lib/ExtUtils/NOTES lib/ExtUtils/PATCHING lib/ExtUtils/README
544 lib/Net/Ping/Changes lib/Test/Harness/Changes
545 lib/Term/ANSIColor/ChangeLog lib/Term/ANSIColor/README
546
547=item Build, Configure, Make, Install
548
549 cygwin/Makefile.SHs
550 ext/IPC/SysV/hints/cygwin.pl
551 ext/NDBM_File/hints/cygwin.pl
552 ext/ODBM_File/hints/cygwin.pl
553 hints/cygwin.sh
554 Configure - help finding hints from uname,
555 shared libperl required for dynamic loading
556 Makefile.SH Cross/Makefile-cross-SH
557 - linklibperl
558 Porting/patchls - cygwin in port list
559 installman - man pages with :: translated to .
560 installperl - install dll, install to 'pods'
561 makedepend.SH - uwinfix
562 regen_lib.pl - file permissions
563
564 plan9/mkfile
565 vms/descrip_mms.template
566 win32/Makefile
567
568=item Tests
569
570 t/io/fs.t - no file mode checks if not ntsec
571 skip rename() check when not
572 check_case:relaxed
573 t/io/tell.t - binmode
574 t/lib/cygwin.t - builtin cygwin function tests
575 t/op/groups.t - basegroup has ID = 0
576 t/op/magic.t - $^X/symlink WORKAROUND, s/.exe//
577 t/op/stat.t - no /dev, skip Win32 ftCreationTime quirk
578 (cache manager sometimes preserves ctime of
579 file previously created and deleted), no -u
580 (setuid)
581 t/op/taint.t - can't use empty path under Cygwin Perl
582 t/op/time.t - no tzset()
583
584=item Compiled Perl Source
585
586 EXTERN.h - __declspec(dllimport)
587 XSUB.h - __declspec(dllexport)
588 cygwin/cygwin.c - os_extras (getcwd, spawn, and several
589 Cygwin:: functions)
590 perl.c - os_extras, -i.bak
591 perl.h - binmode
592 doio.c - win9x can not rename a file when it is open
593 pp_sys.c - do not define h_errno, init
594 _pwent_struct.pw_comment
595 util.c - use setenv
596 util.h - PERL_FILE_IS_ABSOLUTE macro
597 pp.c - Comment about Posix vs IEEE math under
598 Cygwin
599 perlio.c - CR/LF mode
600 perliol.c - Comment about EXTCONST under Cygwin
601
602=item Compiled Module Source
603
604 ext/Compress-Raw-Zlib/Makefile.PL
605 - Can't install via CPAN shell under Cygwin
606 ext/Compress-Raw-Zlib/zlib-src/zutil.h
607 - Cygwin is Unix-like and has vsnprintf
608 ext/Errno/Errno_pm.PL - Special handling for Win32 Perl under
609 Cygwin
610 ext/POSIX/POSIX.xs - tzname defined externally
611 ext/SDBM_File/sdbm/pair.c
612 - EXTCONST needs to be redefined from
613 EXTERN.h
614 ext/SDBM_File/sdbm/sdbm.c
615 - binary open
616 ext/Sys/Syslog/Syslog.xs
617 - Cygwin has syslog.h
618 ext/Sys/Syslog/win32/compile.pl
619 - Convert paths to Windows paths
620 ext/Time-HiRes/HiRes.xs
621 - Various timers not available
622 ext/Time-HiRes/Makefile.PL
623 - Find w32api/windows.h
624 ext/Win32/Makefile.PL - Use various libraries under Cygwin
625 ext/Win32/Win32.xs - Child dir and child env under Cygwin
626 ext/Win32API-File/File.xs
627 - _open_osfhandle not implemented under
628 Cygwin
629 ext/Win32CORE/Win32CORE.c
630 - __declspec(dllexport)
631
632=item Perl Modules/Scripts
633
634 ext/B/t/OptreeCheck.pm - Comment about stderr/stdout order under
635 Cygwin
636 ext/Digest-SHA/bin/shasum
637 - Use binary mode under Cygwin
638 ext/Sys/Syslog/win32/Win32.pm
639 - Convert paths to Windows paths
640 ext/Time-HiRes/HiRes.pm
641 - Comment about various timers not available
642 ext/Win32API-File/File.pm
643 - _open_osfhandle not implemented under
644 Cygwin
645 ext/Win32CORE/Win32CORE.pm
646 - History of Win32CORE under Cygwin
647 lib/Cwd.pm - hook to internal Cwd::cwd
648 lib/ExtUtils/CBuilder/Platform/cygwin.pm
649 - use gcc for ld, and link to libperl.dll.a
650 lib/ExtUtils/CBuilder.pm
651 - Cygwin is Unix-like
652 lib/ExtUtils/Install.pm - Install and rename issues under Cygwin
653 lib/ExtUtils/MM.pm - OS classifications
654 lib/ExtUtils/MM_Any.pm - Example for Cygwin
655 lib/ExtUtils/MakeMaker.pm
656 - require MM_Cygwin.pm
657 lib/ExtUtils/MM_Cygwin.pm
658 - canonpath, cflags, manifypods, perl_archive
659 lib/File/Fetch.pm - Comment about quotes using a Cygwin example
660 lib/File/Find.pm - on remote drives stat() always sets
661 st_nlink to 1
662 lib/File/Spec/Cygwin.pm - case_tolerant
663 lib/File/Spec/Unix.pm - preserve //unc
664 lib/File/Spec/Win32.pm - References a message on cygwin.com
665 lib/File/Spec.pm - Pulls in lib/File/Spec/Cygwin.pm
666 lib/File/Temp.pm - no directory sticky bit
667 lib/Module/CoreList.pm - List of all module files and versions
668 lib/Net/Domain.pm - No domainname command under Cygwin
669 lib/Net/Netrc.pm - Bypass using stat() under Cygwin
670 lib/Net/Ping.pm - ECONREFUSED is EAGAIN under Cygwin
671 lib/Pod/Find.pm - Set 'pods' dir
672 lib/Pod/Perldoc/ToMan.pm - '-c' switch for pod2man
673 lib/Pod/Perldoc.pm - Use 'less' pager, and use .exe extension
674 lib/Term/ANSIColor.pm - Cygwin terminal info
675 lib/perl5db.pl - use stdin not /dev/tty
676 utils/perlbug.PL - Add CYGWIN environment variable to report
677
678=item Perl Module Tests
679
680 dist/Cwd/t/cwd.t
681 ext/Compress-Zlib/t/14gzopen.t
682 ext/DB_File/t/db-btree.t
683 ext/DB_File/t/db-hash.t
684 ext/DB_File/t/db-recno.t
685 ext/DynaLoader/t/DynaLoader.t
686 ext/File-Glob/t/basic.t
687 ext/GDBM_File/t/gdbm.t
688 ext/POSIX/t/sysconf.t
689 ext/POSIX/t/time.t
690 ext/SDBM_File/t/sdbm.t
691 ext/Sys/Syslog/t/syslog.t
692 ext/Time-HiRes/t/HiRes.t
693 ext/Win32/t/Unicode.t
694 ext/Win32API-File/t/file.t
695 ext/Win32CORE/t/win32core.t
696 lib/AnyDBM_File.t
697 lib/Archive/Extract/t/01_Archive-Extract.t
698 lib/Archive/Tar/t/02_methods.t
699 lib/ExtUtils/t/Embed.t
700 lib/ExtUtils/t/eu_command.t
701 lib/ExtUtils/t/MM_Cygwin.t
702 lib/ExtUtils/t/MM_Unix.t
703 lib/File/Compare.t
704 lib/File/Copy.t
705 lib/File/Find/t/find.t
706 lib/File/Path.t
707 lib/File/Spec/t/crossplatform.t
708 lib/File/Spec/t/Spec.t
709 lib/Net/hostent.t
710 lib/Net/Ping/t/110_icmp_inst.t
711 lib/Net/Ping/t/500_ping_icmp.t
712 lib/Net/t/netrc.t
713 lib/Pod/Simple/t/perlcyg.pod
714 lib/Pod/Simple/t/perlcygo.txt
715 lib/Pod/Simple/t/perlfaq.pod
716 lib/Pod/Simple/t/perlfaqo.txt
717 lib/User/grent.t
718 lib/User/pwent.t
719
720=back
721
722=head1 BUGS ON CYGWIN
723
724Support for swapping real and effective user and group IDs is incomplete.
725On WinNT Cygwin provides C<setuid()>, C<seteuid()>, C<setgid()> and C<setegid()>.
726However, additional Cygwin calls for manipulating WinNT access tokens
727and security contexts are required.
728
729=head1 AUTHORS
730
731Charles Wilson <cwilson@ece.gatech.edu>,
732Eric Fifer <egf7@columbia.edu>,
733alexander smishlajev <als@turnhere.com>,
734Steven Morlock <newspost@morlock.net>,
735Sebastien Barre <Sebastien.Barre@utc.fr>,
736Teun Burgers <burgers@ecn.nl>,
737Gerrit P. Haase <gp@familiehaase.de>,
738Reini Urban <rurban@cpan.org>,
739Jan Dubois <jand@activestate.com>,
740Jerry D. Hedden <jdhedden@cpan.org>.
741
742=head1 HISTORY
743
744Last updated: 2019-11-14
745
README.freebsd
1# vim: syntax=pod
2
3If you read this file _as_is_, just ignore the funny characters you
4see. It is written in the POD format (see pod/perlpod.pod) which is
5specifically designed to be readable as is.
6
7=head1 NAME
8
9perlfreebsd - Perl version 5 on FreeBSD systems
10
11=head1 DESCRIPTION
12
13This document describes various features of FreeBSD that will affect how Perl
14version 5 (hereafter just Perl) is compiled and/or runs.
15
16=head2 FreeBSD core dumps from readdir_r with ithreads
17
18When perl is configured to use ithreads, it will use re-entrant library calls
19in preference to non-re-entrant versions. There is a bug in FreeBSD's
20C<readdir_r> function in versions 4.5 and earlier that can cause a SEGV when
21reading large directories. A patch for FreeBSD libc is available
22(see L<https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=30631>)
23which has been integrated into FreeBSD 4.6.
24
25=head2 C<$^X> doesn't always contain a full path in FreeBSD
26
27perl sets C<$^X> where possible to a full path by asking the operating
28system. On FreeBSD the full path of the perl interpreter is found by using
29C<sysctl> with C<KERN_PROC_PATHNAME> if that is supported, else by reading
30the symlink F</proc/curproc/file>. FreeBSD 7 and earlier has a bug where
31either approach sometimes returns an incorrect value
32(see L<https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=35703>).
33In these cases perl will fall back to the old behaviour of using C's
34C<argv[0]> value for C<$^X>.
35
36=head1 AUTHOR
37
38Nicholas Clark <nick@ccl4.org>, collating wisdom supplied by Slaven Rezic
39and Tim Bunce.
40
41Please report any errors, updates, or suggestions to
42L<https://github.com/Perl/perl5/issues>.
43
44
README.hpux
1# vim: syntax=pod
2
3If you read this file _as_is_, just ignore the funny characters you see.
4It is written in the POD format (see pod/perlpod.pod) which is specially
5designed to be readable as is.
6
7=head1 NAME
8
9perlhpux - Perl version 5 on Hewlett-Packard Unix (HP-UX) systems
10
11=head1 DESCRIPTION
12
13This document describes various features of HP's Unix operating system
14(HP-UX) that will affect how Perl version 5 (hereafter just Perl) is
15compiled and/or runs.
16
17=head2 Using perl as shipped with HP-UX
18
19Application release September 2001, HP-UX 11.00 is the first to ship
20with Perl. By the time it was perl-5.6.1 in /opt/perl. The first
21occurrence is on CD 5012-7954 and can be installed using
22
23 swinstall -s /cdrom perl
24
25assuming you have mounted that CD on /cdrom.
26
27That build was a portable hppa-1.1 multithread build that supports large
28files compiled with gcc-2.9-hppa-991112.
29
30If you perform a new installation, then (a newer) Perl will be installed
31automatically. Pre-installed HP-UX systems now have more recent versions
32of Perl and the updated modules.
33
34The official (threaded) builds from HP, as they are shipped on the
35Application DVD/CD's are available on
36L<http://www.software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=PERL>
37for both PA-RISC and IPF (Itanium Processor Family). They are built
38with the HP ANSI-C compiler. Up till 5.8.8 that was done by ActiveState.
39
40To see what version is included on the DVD (assumed here to be mounted
41on /cdrom), issue this command:
42
43 # swlist -s /cdrom perl
44 # perl D.5.8.8.B 5.8.8 Perl Programming Language
45 perl.Perl5-32 D.5.8.8.B 32-bit 5.8.8 Perl Programming Language
46 with Extensions
47 perl.Perl5-64 D.5.8.8.B 64-bit 5.8.8 Perl Programming Language
48 with Extensions
49
50To see what is installed on your system:
51
52 # swlist -R perl
53 # perl E.5.8.8.J Perl Programming Language
54 # perl.Perl5-32 E.5.8.8.J 32-bit Perl Programming Language
55 with Extensions
56 perl.Perl5-32.PERL-MAN E.5.8.8.J 32-bit Perl Man Pages for IA
57 perl.Perl5-32.PERL-RUN E.5.8.8.J 32-bit Perl Binaries for IA
58 # perl.Perl5-64 E.5.8.8.J 64-bit Perl Programming Language
59 with Extensions
60 perl.Perl5-64.PERL-MAN E.5.8.8.J 64-bit Perl Man Pages for IA
61 perl.Perl5-64.PERL-RUN E.5.8.8.J 64-bit Perl Binaries for IA
62
63=head2 Using perl from HP's porting centre
64
65HP porting centre tries to keep up with customer demand and release
66updates from the Open Source community. Having precompiled Perl binaries
67available is obvious, though "up-to-date" is something relative. At the
68moment of writing perl-5.10.1 and 5.28.0 were available.
69
70The HP porting centres are limited in what systems they are allowed
71to port to and they usually choose the two most recent OS versions
72available.
73
74HP has asked the porting centre to move Open Source binaries
75from /opt to /usr/local, so binaries produced since the start
76of July 2002 are located in /usr/local.
77
78One of HP porting centres URL's is L<http://hpux.connect.org.uk/>
79The port currently available is built with GNU gcc. As porting modern
80GNU gcc is extremely hard on HP-UX, they are stuck at version gcc-4.2.3.
81
82=head2 Other prebuilt perl binaries
83
84To get more perl depots for the whole range of HP-UX, visit
85H.Merijn Brand's site at L<http://mirrors.develooper.com/hpux/#Perl>.
86Carefully read the notes to see if the available versions suit your needs.
87
88=head2 Compiling Perl 5 on HP-UX
89
90When compiling Perl, you must use an ANSI C compiler. The C compiler
91that ships with all HP-UX systems is a K&R compiler that should only be
92used to build new kernels.
93
94Perl can be compiled with either HP's ANSI C compiler or with gcc. The
95former is recommended, as not only can it compile Perl with no
96difficulty, but also can take advantage of features listed later that
97require the use of HP compiler-specific command-line flags.
98
99If you decide to use gcc, make sure your installation is recent and
100complete, and be sure to read the Perl INSTALL file for more gcc-specific
101details.
102
103=head2 PA-RISC
104
105The last and final version of PA-RISC is 2.0, HP no longer sells any
106system with these CPU's.
107
108HP's HP9000 Unix systems run on HP's own Precision Architecture
109(PA-RISC) chip. HP-UX used to run on the Motorola MC68000 family of
110chips, but any machine with this chip in it is quite obsolete and this
111document will not attempt to address issues for compiling Perl on the
112Motorola chipset. Even though PA-RISC hardware is not sold anymore, a
113lot of machines still running on these CPU's can be found in the wild.
114
115The last order date for HP 9000 systems was December 31, 2008.
116
117HP PA-RISC systems are usually referred to with model description "HP 9000".
118The last CPU in this series is the PA-8900. Support for PA-RISC
119architectured machines officially ended as shown in the following table:
120
121 PA-RISC End-of-Life Roadmap
122 +--------+----------------+----------------+-----------------+
123 | HP9000 | Superdome | PA-8700 | Spring 2011 |
124 | 4-128 | | PA-8800/sx1000 | Summer 2012 |
125 | cores | | PA-8900/sx1000 | 2014 |
126 | | | PA-8900/sx2000 | 2015 |
127 +--------+----------------+----------------+-----------------+
128 | HP9000 | rp7410, rp8400 | PA-8700 | Spring 2011 |
129 | 2-32 | rp7420, rp8420 | PA-8800/sx1000 | 2012 |
130 | cores | rp7440, rp8440 | PA-8900/sx1000 | Autumn 2013 |
131 | | | PA-8900/sx2000 | 2015 |
132 +--------+----------------+----------------+-----------------+
133 | HP9000 | rp44x0 | PA-8700 | Spring 2011 |
134 | 1-8 | | PA-8800/rp44x0 | 2012 |
135 | cores | | PA-8900/rp44x0 | 2014 |
136 +--------+----------------+----------------+-----------------+
137 | HP9000 | rp34x0 | PA-8700 | Spring 2011 |
138 | 1-4 | | PA-8800/rp34x0 | 2012 |
139 | cores | | PA-8900/rp34x0 | 2014 |
140 +--------+----------------+----------------+-----------------+
141
142A complete list of models at the time the OS was built is in the file
143/usr/sam/lib/mo/sched.models. The first column corresponds to the last
144part of the output of the "model" command. The second column is the
145PA-RISC version and the third column is the exact chip type used.
146(Start browsing at the bottom to prevent confusion ;-)
147
148 # model
149 9000/800/L1000-44
150 # grep L1000-44 /usr/sam/lib/mo/sched.models
151 L1000-44 2.0 PA8500
152
153=head2 PA-RISC 1.0
154
155The original version of PA-RISC, HP no longer sells any system with this chip.
156
157The following systems contained PA-RISC 1.0 chips:
158
159 600, 635, 645, 808, 815, 822, 825, 832, 834, 835, 840, 842, 845, 850,
160 852, 855, 860, 865, 870, 890
161
162=head2 PA-RISC 1.1
163
164An upgrade to the PA-RISC design, it shipped for many years in many different
165system.
166
167The following systems contain with PA-RISC 1.1 chips:
168
169 705, 710, 712, 715, 720, 722, 725, 728, 730, 735, 742, 743, 744, 745,
170 747, 750, 755, 770, 777, 778, 779, 800, 801, 803, 806, 807, 809, 811,
171 813, 816, 817, 819, 821, 826, 827, 829, 831, 837, 839, 841, 847, 849,
172 851, 856, 857, 859, 867, 869, 877, 887, 891, 892, 897, A180, A180C,
173 B115, B120, B132L, B132L+, B160L, B180L, C100, C110, C115, C120,
174 C160L, D200, D210, D220, D230, D250, D260, D310, D320, D330, D350,
175 D360, D410, DX0, DX5, DXO, E25, E35, E45, E55, F10, F20, F30, G30,
176 G40, G50, G60, G70, H20, H30, H40, H50, H60, H70, I30, I40, I50, I60,
177 I70, J200, J210, J210XC, K100, K200, K210, K220, K230, K400, K410,
178 K420, S700i, S715, S744, S760, T500, T520
179
180=head2 PA-RISC 2.0
181
182The most recent upgrade to the PA-RISC design, it added support for
18364-bit integer data.
184
185As of the date of this document's last update, the following systems
186contain PA-RISC 2.0 chips:
187
188 700, 780, 781, 782, 783, 785, 802, 804, 810, 820, 861, 871, 879, 889,
189 893, 895, 896, 898, 899, A400, A500, B1000, B2000, C130, C140, C160,
190 C180, C180+, C180-XP, C200+, C400+, C3000, C360, C3600, CB260, D270,
191 D280, D370, D380, D390, D650, J220, J2240, J280, J282, J400, J410,
192 J5000, J5500XM, J5600, J7000, J7600, K250, K260, K260-EG, K270, K360,
193 K370, K380, K450, K460, K460-EG, K460-XP, K470, K570, K580, L1000,
194 L2000, L3000, N4000, R380, R390, SD16000, SD32000, SD64000, T540,
195 T600, V2000, V2200, V2250, V2500, V2600
196
197Just before HP took over Compaq, some systems were renamed. the link
198that contained the explanation is dead, so here's a short summary:
199
200 HP 9000 A-Class servers, now renamed HP Server rp2400 series.
201 HP 9000 L-Class servers, now renamed HP Server rp5400 series.
202 HP 9000 N-Class servers, now renamed HP Server rp7400.
203
204 rp2400, rp2405, rp2430, rp2450, rp2470, rp3410, rp3440, rp4410,
205 rp4440, rp5400, rp5405, rp5430, rp5450, rp5470, rp7400, rp7405,
206 rp7410, rp7420, rp7440, rp8400, rp8420, rp8440, Superdome
207
208The current naming convention is:
209
210 aadddd
211 ||||`+- 00 - 99 relative capacity & newness (upgrades, etc.)
212 |||`--- unique number for each architecture to ensure different
213 ||| systems do not have the same numbering across
214 ||| architectures
215 ||`---- 1 - 9 identifies family and/or relative positioning
216 ||
217 |`----- c = ia32 (cisc)
218 | p = pa-risc
219 | x = ia-64 (Itanium & Itanium 2)
220 | h = housing
221 `------ t = tower
222 r = rack optimized
223 s = super scalable
224 b = blade
225 sa = appliance
226
227=head2 Portability Between PA-RISC Versions
228
229An executable compiled on a PA-RISC 2.0 platform will not execute on a
230PA-RISC 1.1 platform, even if they are running the same version of
231HP-UX. If you are building Perl on a PA-RISC 2.0 platform and want that
232Perl to also run on a PA-RISC 1.1, the compiler flags +DAportable and
233+DS32 should be used.
234
235It is no longer possible to compile PA-RISC 1.0 executables on either
236the PA-RISC 1.1 or 2.0 platforms. The command-line flags are accepted,
237but the resulting executable will not run when transferred to a PA-RISC
2381.0 system.
239
240=head2 Itanium Processor Family (IPF) and HP-UX
241
242HP-UX also runs on the newer Itanium processor. This requires the use
243of HP-UX version 11.23 (11i v2) or 11.31 (11i v3), and with the exception
244of a few differences detailed below and in later sections, Perl should
245compile with no problems.
246
247Although PA-RISC binaries can run on Itanium systems, you should not
248attempt to use a PA-RISC version of Perl on an Itanium system. This is
249because shared libraries created on an Itanium system cannot be loaded
250while running a PA-RISC executable.
251
252HP Itanium 2 systems are usually referred to with model description
253"HP Integrity".
254
255=head2 Itanium, Itanium 2 & Madison 6
256
257HP also ships servers with the 128-bit Itanium processor(s). The cx26x0
258is told to have Madison 6. As of the date of this document's last update,
259the following systems contain Itanium or Itanium 2 chips (this is likely
260to be out of date):
261
262 BL60p, BL860c, BL870c, BL890c, cx2600, cx2620, rx1600, rx1620, rx2600,
263 rx2600hptc, rx2620, rx2660, rx2800, rx3600, rx4610, rx4640, rx5670,
264 rx6600, rx7420, rx7620, rx7640, rx8420, rx8620, rx8640, rx9610,
265 sx1000, sx2000
266
267To see all about your machine, type
268
269 # model
270 ia64 hp server rx2600
271 # /usr/contrib/bin/machinfo
272
273=head2 HP-UX versions
274
275Not all architectures (PA = PA-RISC, IPF = Itanium Processor Family)
276support all versions of HP-UX, here is a short list
277
278 HP-UX version Kernel Architecture End-of-factory support
279 ------------- ------ ------------ ----------------------------------
280 10.20 32 bit PA 30-Jun-2003
281 11.00 32/64 PA 31-Dec-2006
282 11.11 11i v1 32/64 PA 31-Dec-2015
283 11.22 11i v2 64 IPF 30-Apr-2004
284 11.23 11i v2 64 PA & IPF 31-Dec-2015
285 11.31 11i v3 64 PA & IPF 31-Dec-2020 (PA) 31-Dec-2025 (IPF)
286
287See for the full list of hardware/OS support and expected end-of-life
288L<https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>
289
290=head2 Building Dynamic Extensions on HP-UX
291
292HP-UX supports dynamically loadable libraries (shared libraries).
293Shared libraries end with the suffix .sl. On Itanium systems,
294they end with the suffix .so.
295
296Shared libraries created on a platform using a particular PA-RISC
297version are not usable on platforms using an earlier PA-RISC version by
298default. However, this backwards compatibility may be enabled using the
299same +DAportable compiler flag (with the same PA-RISC 1.0 caveat
300mentioned above).
301
302Shared libraries created on an Itanium platform cannot be loaded on
303a PA-RISC platform. Shared libraries created on a PA-RISC platform
304can only be loaded on an Itanium platform if it is a PA-RISC executable
305that is attempting to load the PA-RISC library. A PA-RISC shared
306library cannot be loaded into an Itanium executable nor vice-versa.
307
308To create a shared library, the following steps must be performed:
309
310 1. Compile source modules with +z or +Z flag to create a .o module
311 which contains Position-Independent Code (PIC). The linker will
312 tell you in the next step if +Z was needed.
313 (For gcc, the appropriate flag is -fpic or -fPIC.)
314
315 2. Link the shared library using the -b flag. If the code calls
316 any functions in other system libraries (e.g., libm), it must
317 be included on this line.
318
319(Note that these steps are usually handled automatically by the extension's
320Makefile).
321
322If these dependent libraries are not listed at shared library creation
323time, you will get fatal "Unresolved symbol" errors at run time when the
324library is loaded.
325
326You may create a shared library that refers to another library, which
327may be either an archive library or a shared library. If this second
328library is a shared library, this is called a "dependent library". The
329dependent library's name is recorded in the main shared library, but it
330is not linked into the shared library. Instead, it is loaded when the
331main shared library is loaded. This can cause problems if you build an
332extension on one system and move it to another system where the
333libraries may not be located in the same place as on the first system.
334
335If the referred library is an archive library, then it is treated as a
336simple collection of .o modules (all of which must contain PIC). These
337modules are then linked into the shared library.
338
339Note that it is okay to create a library which contains a dependent
340library that is already linked into perl.
341
342Some extensions, like DB_File and Compress::Zlib use/require prebuilt
343libraries for the perl extensions/modules to work. If these libraries
344are built using the default configuration, it might happen that you
345run into an error like "invalid loader fixup" during load phase.
346HP is aware of this problem. Search the HP-UX cxx-dev forums for
347discussions about the subject. The short answer is that B<everything>
348(all libraries, everything) must be compiled with C<+z> or C<+Z> to be
349PIC (position independent code). (For gcc, that would be
350C<-fpic> or C<-fPIC>). In HP-UX 11.00 or newer the linker
351error message should tell the name of the offending object file.
352
353A more general approach is to intervene manually, as with an example for
354the DB_File module, which requires SleepyCat's libdb.sl:
355
356 # cd .../db-3.2.9/build_unix
357 # vi Makefile
358 ... add +Z to all cflags to create shared objects
359 CFLAGS= -c $(CPPFLAGS) +Z -Ae +O2 +Onolimit \
360 -I/usr/local/include -I/usr/include/X11R6
361 CXXFLAGS= -c $(CPPFLAGS) +Z -Ae +O2 +Onolimit \
362 -I/usr/local/include -I/usr/include/X11R6
363
364 # make clean
365 # make
366 # mkdir tmp
367 # cd tmp
368 # ar x ../libdb.a
369 # ld -b -o libdb-3.2.sl *.o
370 # mv libdb-3.2.sl /usr/local/lib
371 # rm *.o
372 # cd /usr/local/lib
373 # rm -f libdb.sl
374 # ln -s libdb-3.2.sl libdb.sl
375
376 # cd .../DB_File-1.76
377 # make distclean
378 # perl Makefile.PL
379 # make
380 # make test
381 # make install
382
383As of db-4.2.x it is no longer needed to do this by hand. Sleepycat
384has changed the configuration process to add +z on HP-UX automatically.
385
386 # cd .../db-4.2.25/build_unix
387 # env CFLAGS=+DD64 LDFLAGS=+DD64 ../dist/configure
388
389should work to generate 64bit shared libraries for HP-UX 11.00 and 11i.
390
391It is no longer possible to link PA-RISC 1.0 shared libraries (even
392though the command-line flags are still present).
393
394PA-RISC and Itanium object files are not interchangeable. Although
395you may be able to use ar to create an archive library of PA-RISC
396object files on an Itanium system, you cannot link against it using
397an Itanium link editor.
398
399=head2 The HP ANSI C Compiler
400
401When using this compiler to build Perl, you should make sure that the
402flag -Aa is added to the cpprun and cppstdin variables in the config.sh
403file (though see the section on 64-bit perl below). If you are using a
404recent version of the Perl distribution, these flags are set automatically.
405
406Even though HP-UX 10.20 and 11.00 are not actively maintained by HP
407anymore, updates for the HP ANSI C compiler are still available from
408time to time, and it might be advisable to see if updates are applicable.
409At the moment of writing, the latests available patches for 11.00 that
410should be applied are PHSS_35098, PHSS_35175, PHSS_35100, PHSS_33036,
411and PHSS_33902). If you have a SUM account, you can use it to search
412for updates/patches. Enter "ANSI" as keyword.
413
414=head2 The GNU C Compiler
415
416When you are going to use the GNU C compiler (gcc), and you don't have
417gcc yet, you can either build it yourself (if you feel masochistic enough)
418from the sources (available from e.g. L<http://gcc.gnu.org/mirrors.html>)
419or fetch a prebuilt binary from the HP porting center at
420L<http://hpux.connect.org.uk/hppd/cgi-bin/search?term=gcc&Search=Search>
421or from the DSPP (you need to be a member) at
422L<http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=2a08725cc2f02110725cc2f02110275d6e10RCRD&jumpid=reg_r1002_usen_c-001_title_r0001>
423(Browse through the list, because there are often multiple versions of
424the same package available).
425
426Most mentioned distributions are depots. H.Merijn Brand has made prebuilt
427gcc binaries available on L<http://mirrors.develooper.com/hpux/> and/or
428L<http://www.cmve.net/~merijn/> for HP-UX 10.20 (only 32bit), HP-UX 11.00,
429HP-UX 11.11 (HP-UX 11i v1), and HP-UX 11.23 (HP-UX 11i v2 PA-RISC) in both
43032- and 64-bit versions. For HP-UX 11.23 IPF and HP-UX 11.31 IPF depots are
431available too. The IPF versions do not need two versions of GNU gcc.
432
433On PA-RISC you need a different compiler for 32-bit applications and for
43464-bit applications. On PA-RISC, 32-bit objects and 64-bit objects do
435not mix. Period. There is no different behaviour for HP C-ANSI-C or GNU
436gcc. So if you require your perl binary to use 64-bit libraries, like
437Oracle-64bit, you MUST build a 64-bit perl.
438
439Building a 64-bit capable gcc on PA-RISC from source is possible only when
440you have the HP C-ANSI C compiler or an already working 64-bit binary of
441gcc available. Best performance for perl is achieved with HP's native
442compiler.
443
444=head2 Using Large Files with Perl on HP-UX
445
446Beginning with HP-UX version 10.20, files larger than 2GB (2^31 bytes)
447may be created and manipulated. Three separate methods of doing this
448are available. Of these methods, the best method for Perl is to compile
449using the -Duselargefiles flag to Configure. This causes Perl to be
450compiled using structures and functions in which these are 64 bits wide,
451rather than 32 bits wide. (Note that this will only work with HP's ANSI
452C compiler. If you want to compile Perl using gcc, you will have to get
453a version of the compiler that supports 64-bit operations. See above for
454where to find it.)
455
456There are some drawbacks to this approach. One is that any extension
457which calls any file-manipulating C function will need to be recompiled
458(just follow the usual "perl Makefile.PL; make; make test; make install"
459procedure).
460
461The list of functions that will need to recompiled is:
462 creat, fgetpos, fopen,
463 freopen, fsetpos, fstat,
464 fstatvfs, fstatvfsdev, ftruncate,
465 ftw, lockf, lseek,
466 lstat, mmap, nftw,
467 open, prealloc, stat,
468 statvfs, statvfsdev, tmpfile,
469 truncate, getrlimit, setrlimit
470
471Another drawback is only valid for Perl versions before 5.6.0. This
472drawback is that the seek and tell functions (both the builtin version
473and POSIX module version) will not perform correctly.
474
475It is strongly recommended that you use this flag when you run
476Configure. If you do not do this, but later answer the question about
477large files when Configure asks you, you may get a configuration that
478cannot be compiled, or that does not function as expected.
479
480=head2 Threaded Perl on HP-UX
481
482It is possible to compile a version of threaded Perl on any version of
483HP-UX before 10.30, but it is strongly suggested that you be running on
484HP-UX 11.00 at least.
485
486To compile Perl with threads, add -Dusethreads to the arguments of
487Configure. Verify that the -D_POSIX_C_SOURCE=199506L compiler flag is
488automatically added to the list of flags. Also make sure that -lpthread
489is listed before -lc in the list of libraries to link Perl with. The
490hints provided for HP-UX during Configure will try very hard to get
491this right for you.
492
493HP-UX versions before 10.30 require a separate installation of a POSIX
494threads library package. Two examples are the HP DCE package, available
495on "HP-UX Hardware Extensions 3.0, Install and Core OS, Release 10.20,
496April 1999 (B3920-13941)" or the Freely available PTH package, available
497on H.Merijn's site (L<http://mirrors.develooper.com/hpux/>). The use of PTH
498will be unsupported in perl-5.12 and up and is rather buggy in 5.11.x.
499
500If you are going to use the HP DCE package, the library used for threading
501is /usr/lib/libcma.sl, but there have been multiple updates of that
502library over time. Perl will build with the first version, but it
503will not pass the test suite. Older Oracle versions might be a compelling
504reason not to update that library, otherwise please find a newer version
505in one of the following patches: PHSS_19739, PHSS_20608, or PHSS_23672
506
507reformatted output:
508
509 d3:/usr/lib 106 > what libcma-*.1
510 libcma-00000.1:
511 HP DCE/9000 1.5 Module: libcma.sl (Export)
512 Date: Apr 29 1996 22:11:24
513 libcma-19739.1:
514 HP DCE/9000 1.5 PHSS_19739-40 Module: libcma.sl (Export)
515 Date: Sep 4 1999 01:59:07
516 libcma-20608.1:
517 HP DCE/9000 1.5 PHSS_20608 Module: libcma.1 (Export)
518 Date: Dec 8 1999 18:41:23
519 libcma-23672.1:
520 HP DCE/9000 1.5 PHSS_23672 Module: libcma.1 (Export)
521 Date: Apr 9 2001 10:01:06
522 d3:/usr/lib 107 >
523
524If you choose for the PTH package, use swinstall to install pth in
525the default location (/opt/pth), and then make symbolic links to the
526libraries from /usr/lib
527
528 # cd /usr/lib
529 # ln -s /opt/pth/lib/libpth* .
530
531For building perl to support Oracle, it needs to be linked with libcl
532and libpthread. So even if your perl is an unthreaded build, these
533libraries might be required. See "Oracle on HP-UX" below.
534
535=head2 64-bit Perl on HP-UX
536
537Beginning with HP-UX 11.00, programs compiled under HP-UX can take
538advantage of the LP64 programming environment (LP64 means Longs and
539Pointers are 64 bits wide), in which scalar variables will be able
540to hold numbers larger than 2^32 with complete precision. Perl has
541proven to be consistent and reliable in 64bit mode since 5.8.1 on
542all HP-UX 11.xx.
543
544As of the date of this document, Perl is fully 64-bit compliant on
545HP-UX 11.00 and up for both cc- and gcc builds. If you are about to
546build a 64-bit perl with GNU gcc, please read the gcc section carefully.
547
548Should a user have the need for compiling Perl in the LP64 environment,
549use the -Duse64bitall flag to Configure. This will force Perl to be
550compiled in a pure LP64 environment (with the +DD64 flag for HP C-ANSI-C,
551with no additional options for GNU gcc 64-bit on PA-RISC, and with
552-mlp64 for GNU gcc on Itanium).
553If you want to compile Perl using gcc, you will have to get a version of
554the compiler that supports 64-bit operations.)
555
556You can also use the -Duse64bitint flag to Configure. Although there
557are some minor differences between compiling Perl with this flag versus
558the -Duse64bitall flag, they should not be noticeable from a Perl user's
559perspective. When configuring -Duse64bitint using a 64bit gcc on a
560pa-risc architecture, -Duse64bitint is silently promoted to -Duse64bitall.
561
562In both cases, it is strongly recommended that you use these flags when
563you run Configure. If you do not use do this, but later answer the
564questions about 64-bit numbers when Configure asks you, you may get a
565configuration that cannot be compiled, or that does not function as
566expected.
567
568=head2 Oracle on HP-UX
569
570Using perl to connect to Oracle databases through DBI and DBD::Oracle
571has caused a lot of people many headaches. Read README.hpux in the
572DBD::Oracle for much more information. The reason to mention it here
573is that Oracle requires a perl built with libcl and libpthread, the
574latter even when perl is build without threads. Building perl using
575all defaults, but still enabling to build DBD::Oracle later on can be
576achieved using
577
578 Configure -A prepend:libswanted='cl pthread ' ...
579
580Do not forget the space before the trailing quote.
581
582Also note that this does not (yet) work with all configurations,
583it is known to fail with 64-bit versions of GCC.
584
585=head2 GDBM and Threads on HP-UX
586
587If you attempt to compile Perl with (POSIX) threads on an 11.X system
588and also link in the GDBM library, then Perl will immediately core dump
589when it starts up. The only workaround at this point is to relink the
590GDBM library under 11.X, then relink it into Perl.
591
592the error might show something like:
593
594Pthread internal error: message: __libc_reinit() failed, file: ../pthreads/pthread.c, line: 1096
595Return Pointer is 0xc082bf33
596sh: 5345 Quit(coredump)
597
598and Configure will give up.
599
600=head2 NFS filesystems and utime(2) on HP-UX
601
602If you are compiling Perl on a remotely-mounted NFS filesystem, the test
603io/fs.t may fail on test #18. This appears to be a bug in HP-UX and no
604fix is currently available.
605
606=head2 HP-UX Kernel Parameters (maxdsiz) for Compiling Perl
607
608By default, HP-UX comes configured with a maximum data segment size of
60964MB. This is too small to correctly compile Perl with the maximum
610optimization levels. You can increase the size of the maxdsiz kernel
611parameter through the use of SAM.
612
613When using the GUI version of SAM, click on the Kernel Configuration
614icon, then the Configurable Parameters icon. Scroll down and select
615the maxdsiz line. From the Actions menu, select the Modify Configurable
616Parameter item. Insert the new formula into the Formula/Value box.
617Then follow the instructions to rebuild your kernel and reboot your
618system.
619
620In general, a value of 256MB (or "256*1024*1024") is sufficient for
621Perl to compile at maximum optimization.
622
623=head1 nss_delete core dump from op/pwent or op/grent
624
625You may get a bus error core dump from the op/pwent or op/grent
626tests. If compiled with -g you will see a stack trace much like
627the following:
628
629 #0 0xc004216c in () from /usr/lib/libc.2
630 #1 0xc00d7550 in __nss_src_state_destr () from /usr/lib/libc.2
631 #2 0xc00d7768 in __nss_src_state_destr () from /usr/lib/libc.2
632 #3 0xc00d78a8 in nss_delete () from /usr/lib/libc.2
633 #4 0xc01126d8 in endpwent () from /usr/lib/libc.2
634 #5 0xd1950 in Perl_pp_epwent () from ./perl
635 #6 0x94d3c in Perl_runops_standard () from ./perl
636 #7 0x23728 in S_run_body () from ./perl
637 #8 0x23428 in perl_run () from ./perl
638 #9 0x2005c in main () from ./perl
639
640The key here is the C<nss_delete> call. One workaround for this
641bug seems to be to create add to the file F</etc/nsswitch.conf>
642(at least) the following lines
643
644 group: files
645 passwd: files
646
647Whether you are using NIS does not matter. Amazingly enough,
648the same bug also affects Solaris.
649
650=head1 error: pasting ")" and "l" does not give a valid preprocessing token
651
652There seems to be a broken system header file in HP-UX 11.00 that
653breaks perl building in 32bit mode with GNU gcc-4.x causing this
654error. The same file for HP-UX 11.11 (even though the file is older)
655does not show this failure, and has the correct definition, so the
656best fix is to patch the header to match:
657
658 --- /usr/include/inttypes.h 2001-04-20 18:42:14 +0200
659 +++ /usr/include/inttypes.h 2000-11-14 09:00:00 +0200
660 @@ -72,7 +72,7 @@
661 #define UINT32_C(__c) __CONCAT_U__(__c)
662 #else /* __LP64 */
663 #define INT32_C(__c) __CONCAT__(__c,l)
664 -#define UINT32_C(__c) __CONCAT__(__CONCAT_U__(__c),l)
665 +#define UINT32_C(__c) __CONCAT__(__c,ul)
666 #endif /* __LP64 */
667
668 #define INT64_C(__c) __CONCAT_L__(__c,l)
669
670=head1 Redeclaration of "sendpath" with a different storage class specifier
671
672The following compilation warnings may happen in HP-UX releases
673earlier than 11.31 but are harmless:
674
675 cc: "/usr/include/sys/socket.h", line 535: warning 562:
676 Redeclaration of "sendfile" with a different storage class
677 specifier: "sendfile" will have internal linkage.
678 cc: "/usr/include/sys/socket.h", line 536: warning 562:
679 Redeclaration of "sendpath" with a different storage class
680 specifier: "sendpath" will have internal linkage.
681
682They seem to be caused by broken system header files, and also other
683open source projects are seeing them. The following HP-UX patches
684should make the warnings go away:
685
686 CR JAGae12001: PHNE_27063
687 Warning 562 on sys/socket.h due to redeclaration of prototypes
688
689 CR JAGae16787:
690 Warning 562 from socket.h sendpath/sendfile -D_FILEFFSET_BITS=64
691
692 CR JAGae73470 (11.23)
693 ER: Compiling socket.h with cc -D_FILEFFSET_BITS=64 warning 267/562
694
695=head1 Miscellaneous
696
697HP-UX 11 Y2K patch "Y2K-1100 B.11.00.B0125 HP-UX Core OS Year 2000
698Patch Bundle" has been reported to break the io/fs test #18 which
699tests whether utime() can change timestamps. The Y2K patch seems to
700break utime() so that over NFS the timestamps do not get changed
701(on local filesystems utime() still works). This has probably been
702fixed on your system by now.
703
704=head1 AUTHOR
705
706H.Merijn Brand <h.m.brand@xs4all.nl>
707Jeff Okamoto <okamoto@corp.hp.com>
708
709With much assistance regarding shared libraries from Marc Sabatella.
710
711=cut
712
README.hurd
1# vim: syntax=pod
2
3If you read this file _as_is_, just ignore the funny characters you see.
4It is written in the POD format (see pod/perlpod.pod) which is specially
5designed to be readable as is.
6
7=head1 NAME
8
9perlhurd - Perl version 5 on Hurd
10
11=head1 DESCRIPTION
12
13If you want to use Perl on the Hurd, I recommend using the Debian
14GNU/Hurd distribution ( see L<https://www.debian.org/> ), even if an
15official, stable release has not yet been made. The old "gnu-0.2"
16binary distribution will most certainly have additional problems.
17
18=head2 Known Problems with Perl on Hurd
19
20The Perl test suite may still report some errors on the Hurd. The
21"lib/anydbm" and "pragma/warnings" tests will almost certainly fail.
22Both failures are not really specific to the Hurd, as indicated by the
23test suite output.
24
25The socket tests may fail if the network is not configured. You have
26to make "/hurd/pfinet" the translator for "/servers/socket/2", giving
27it the right arguments. Try "/hurd/pfinet --help" for more
28information.
29
30Here are the statistics for Perl 5.005_62 on my system:
31
32 Failed Test Status Wstat Total Fail Failed List of failed
33 -----------------------------------------------------------------------
34 lib/anydbm.t 12 1 8.33% 12
35 pragma/warnings 333 1 0.30% 215
36
37 8 tests and 24 subtests skipped.
38 Failed 2/229 test scripts, 99.13% okay. 2/10850 subtests failed,
39 99.98% okay.
40
41There are quite a few systems out there that do worse!
42
43However, since I am running a very recent Hurd snapshot, in which a lot of
44bugs that were exposed by the Perl test suite have been fixed, you may
45encounter more failures. Likely candidates are: "op/stat", "lib/io_pipe",
46"lib/io_sock", "lib/io_udp" and "lib/time".
47
48In any way, if you're seeing failures beyond those mentioned in this
49document, please consider upgrading to the latest Hurd before reporting
50the failure as a bug.
51
52=head1 AUTHOR
53
54Mark Kettenis <kettenis@gnu.org>
55
56Last Updated: Fri, 29 Oct 1999 22:50:30 +0200
57
58
README.irix
1# vim: syntax=pod
2
3If you read this file _as_is_, just ignore the funny characters you
4see. It is written in the POD format (see pod/perlpod.pod) which is
5specifically designed to be readable as is.
6
7=head1 NAME
8
9perlirix - Perl version 5 on Irix systems
10
11=head1 DESCRIPTION
12
13This document describes various features of Irix that will affect how Perl
14version 5 (hereafter just Perl) is compiled and/or runs.
15
16=head2 Building 32-bit Perl in Irix
17
18Use
19
20 sh Configure -Dcc='cc -n32'
21
22to compile Perl 32-bit. Don't bother with -n32 unless you have 7.1
23or later compilers (use cc -version to check).
24
25(Building 'cc -n32' is the default.)
26
27=head2 Building 64-bit Perl in Irix
28
29Use
30
31 sh Configure -Dcc='cc -64' -Duse64bitint
32
33This requires require a 64-bit MIPS CPU (R8000, R10000, ...)
34
35You can also use
36
37 sh Configure -Dcc='cc -64' -Duse64bitall
38
39but that makes no difference compared with the -Duse64bitint because
40of the C<cc -64>.
41
42You can also do
43
44 sh Configure -Dcc='cc -n32' -Duse64bitint
45
46to use long longs for the 64-bit integer type, in case you don't
47have a 64-bit CPU.
48
49If you are using gcc, just
50
51 sh Configure -Dcc=gcc -Duse64bitint
52
53should be enough, the Configure should automatically probe for the
54correct 64-bit settings.
55
56=head2 About Compiler Versions of Irix
57
58Some Irix cc versions, e.g. 7.3.1.1m (try cc -version) have been known
59to have issues (coredumps) when compiling perl.c. If you've used
60-OPT:fast_io=ON and this happens, try removing it. If that fails, or
61you didn't use that, then try adjusting other optimization options
62(-LNO, -INLINE, -O3 to -O2, et cetera). The compiler bug has been
63reported to SGI. (Allen Smith <easmith@beatrice.rutgers.edu>)
64
65=head2 Linker Problems in Irix
66
67If you get complaints about so_locations then search in the file
68hints/irix_6.sh for "lddflags" and do the suggested adjustments.
69(David Billinghurst <David.Billinghurst@riotinto.com.au>)
70
71=head2 Malloc in Irix
72
73Do not try to use Perl's malloc, this will lead into very mysterious
74errors (especially with -Duse64bitall).
75
76=head2 Building with threads in Irix
77
78Run Configure with -Duseithreads which will configure Perl with
79the Perl 5.8.0 "interpreter threads", see L<threads>.
80
81For Irix 6.2 with perl threads, you have to have the following
82patches installed:
83
84 1404 Irix 6.2 Posix 1003.1b man pages
85 1645 Irix 6.2 & 6.3 POSIX header file updates
86 2000 Irix 6.2 Posix 1003.1b support modules
87 2254 Pthread library fixes
88 2401 6.2 all platform kernel rollup
89
90B<IMPORTANT>: Without patch 2401, a kernel bug in Irix 6.2 will cause
91your machine to panic and crash when running threaded perl. Irix 6.3
92and later are okay.
93
94 Thanks to Hannu Napari <Hannu.Napari@hut.fi> for the IRIX
95 pthreads patches information.
96
97=head2 Irix 5.3
98
99While running Configure and when building, you are likely to get
100quite a few of these warnings:
101
102 ld:
103 The shared object /usr/lib/libm.so did not resolve any symbols.
104 You may want to remove it from your link line.
105
106Ignore them: in IRIX 5.3 there is no way to quieten ld about this.
107
108During compilation you will see this warning from toke.c:
109
110 uopt: Warning: Perl_yylex: this procedure not optimized because it
111 exceeds size threshold; to optimize this procedure, use -Olimit
112 option with value >= 4252.
113
114Ignore the warning.
115
116In IRIX 5.3 and with Perl 5.8.1 (Perl 5.8.0 didn't compile in IRIX 5.3)
117the following failures are known.
118
119 Failed Test Stat Wstat Total Fail Failed|Failing List
120 -----------------------------------------------------------------------
121 ../ext/List/Util/t/shuffle.t 0 139 ?? ?? % ??
122 ../lib/Math/Trig.t 255 65280 29 12 41.38% 24-29
123 ../lib/sort.t 0 138 119 72 60.50% 48-119
124 56 tests and 474 subtests skipped.
125 Failed 3/811 test scripts, 99.63% okay. 78/75813 subtests failed,
126 99.90% okay.
127
128They are suspected to be compiler errors (at least the shuffle.t
129failure is known from some IRIX 6 setups) and math library errors
130(the Trig.t failure), but since IRIX 5 is long since end-of-lifed,
131further fixes for the IRIX are unlikely. If you can get gcc for 5.3,
132you could try that, too, since gcc in IRIX 6 is a known workaround for
133at least the shuffle.t and sort.t failures.
134
135=head1 AUTHOR
136
137Jarkko Hietaniemi <jhi@iki.fi>
138
139Please report any errors, updates, or suggestions to
140L<https://github.com/Perl/perl5/issues>.
141
142
README.jp
README.ko
1# vim: syntax=pod
2
3이 파일을 내용 그대로 읽고 있다면 우스꽝스러운 문자는 무시해주세요.
4이 문서는 POD로 읽을 수 있도록 POD 형식(F<pod/perlpod.pod> 문서를
5확인하세요)으로 작성되어 있습니다.
6
7=encoding utf8
8
9=head1 NAME
10
11perlko - 한국어 Perl 안내서
12
13=head1 DESCRIPTION
14
15Perl의 세계에 오신 것을 환영합니다!
16
17Perl은 가끔 B<'Practical Extraction and Report Language'>라고 하기도 합니다만
18다른 널리 알려진 것들 중에서 B<'Pathologically Eclectic Rubbish Lister'>라고
19하기도 합니다. 사실 이것은 끼워 맞춘 것이며 Perl이 이것들의 첫 글자를
20가져와서 이름을 붙인 것은 아닙니다. Perl의 창시자 Larry가 첫 번째 이름을
21먼저 생각했고 널리 알려진 것을 나중에 지었기 때문입니다. 그렇기 때문에
22B<'Perl'>은 모두 대문자가 아닙니다. 널리 알려진 어떤 것을 가지고 논쟁하는
23것은 의미가 없습니다. Larry는 두 개 다 지지합니다.
24
25가끔 p가 소문자로 작성된 B<'perl'>을 볼 것입니다. P가 대문자로 되어 있는
26B<'Perl'>은 언어를 참조할 때 쓰이며 B<'perl'>처럼 p가 소문자인 경우는 여러분의
27프로그램을 컴파일하고 돌릴 때 사용되는 해석기를 지칭할 때 사용됩니다.
28
29
30=head1 Perl에 관하여
31
32Perl은 본래 문자열 생성을 위해 만들졌지만 지금은 시스템 관리와 웹 개발,
33네트워크 프로그래밍, GUI 개발 등을 포함한 여러 분야에서 널리 사용되는
34범용 프로그래밍 언어입니다.
35
36이 언어는 아름다움(아주 작고, 우아하고, 아주 적고)보다
37실용적(사용하기 쉽고, 효율적이며, 가능한 최대한)인 것을 지향하고 있습니다.
38사용하기 쉽고, 절차적 프로그래밍과 객체 지향 프로그래밍을 모두 지원하고,
39강력한 문자열 처리 기능을 내장하고, 세상에서 가장 인상적인 제 3자의 모듈
40모음처를 가지고 있다는 것은 Perl의 가장 중요한 특징입니다.
41
42Perl의 언어적 특징은 F<pod/perlintro.pod> 문서에서 소개합니다.
43
44이번 릴리스에서 가장 중요한 변화는 F<pod/perldelta.pod>에서 논의합니다.
45
46또한 다양한 출판사가 출판한 많은 Perl 책은 다양한 주제를 다루고 있습니다.
47자세한 정보는 F<pod/perlbook.pod> 문서를 확인하세요.
48
49
50=head1 설치
51
52여러분이 비교적 현대의 운영체제를 사용하고 있고 현재 버전의 Perl을
53지역적으로 설치하고 싶다면 다음 명령을 실행하세요.
54
55 ./Configure -des -Dprefix=$HOME/localperl
56 make test
57 make install
58
59앞의 명령은 여러분의 플랫폼에 맞게 환경을 설정하고 컴파일을 수행한 후,
60회기 테스트를 수행한뒤, 홈 디렉터리 하부의 F<localperl> 디렉터리에 perl을
61설치합니다.
62
63여러분이 어떠한 문제든 겪게 되거나 사용자 정의 버전 Perl을 설치할 필요가 있다면
64현재 배포판에 들어있는 F<INSTALL> 파일 안의 자세한 설명을 읽어야 합니다.
65추가적으로 일반적이지 않은 다양한 플랫폼에서 Perl을 빌드하고 사용하는
66방법에 대한 도움말과 귀띔이 적혀있는 많은 수의 F<README> 파일이 있습니다.
67
68일단 Perl을 설치하고 나면 C<perldoc> 도구를 이용해 풍부한 문서를 사용할
69수 있습니다. 시작하기 위해서 다음 명령을 실행하세요.
70
71 perldoc perl
72
73
74=head1 실행에 어려움을 겪는다면
75
76Perl은 뜨개질에서 부터 로켓 과학까지 모든 분야에서 사용할 수 있는 크고
77복잡한 시스템입니다. 여러분이 어려움에 부딪혔을때 그 문제는 이미 다른
78사람이 해결했을 가능성이 높습니다. 문서를 모두 확인했는데도 버그가
79확실하다면 C<perlbug> 도구를 이용해서 저희에게 버그를 보고해주세요.
80C<perlbug>에 대한 더 자세한 정보는 C<perldoc perlbug> 또는 C<perlbug>를
81명령줄에서 실행해서 확인할 수 있습니다.
82
83Perl을 사용 가능하게 만들었다 하더라도 Perl은 계속해서 진화하기 때문에
84여러분이 맞닥뜨린 버그를 수정했거나 여러분이 유용하다고 생각할법한
85새로운 기능이 추가된 좀 더 최신 버전이 있을 수 있습니다.
86
87여러분은 항상 최신 버전의 perl을 CPAN (Comprehensive Perl Archive Network)
88사이트 L<http://www.cpan.org/src/> 에서 찾을 수 있습니다.
89
90perl 소스에 간단한 패치를 등록하고 싶다면 F<pod/perlhack.pod> 문서의
91B<"SUPER QUICK PATCH GUIDE">를 살펴보세요.
92
93그냥 개인적으로 참고하세요.
94제가 이것처럼 멋진 물건을 만든다는 것을 여러분이 알기를 바랍니다.
95그것은 제 이야기의 B<"저자(Author)">를 기쁘게하기 때문입니다.
96이것이 여러분을 귀찮게 한다면 여러분의 B<"저작(Authorship)">에
97대한 생각을 정정해야 할 수도 있습니다. 하지만 어쨌거나 여러분은
98Perl을 사용하는데는 문제가 없답니다. :-)
99
100- B<"저자">로부터.
101
102
103=head1 인코딩
104
105Perl은 5.8.0판부터 유니코드/ISO 10646에 대해 광범위하게 지원합니다.
106유니코드 지원의 일환으로 한중일을 비롯한 세계 각국에서
107유니코드 이전에 쓰고 있었고 지금도 널리 쓰이고 있는 수많은 인코딩을
108지원합니다. 유니코드는 전 세계에서 쓰이는 모든 언어를 위한
109표기 체계(유럽의 라틴 알파벳, 키릴 알파벳, 그리스 알파벳, 인도와 동남 아시아의
110브라미 계열 스크립트, 아랍 문자, 히브리 문자, 한중일의 한자, 한국어의 한글,
111일본어의 가나, 북미 인디안의 표기 체계 등)를 수용하는 것을 목표로 하고
112있기 때문에 기존에 쓰이던 각 언어 및 국가 그리고 운영 체계에 고유한
113문자 집합과 인코딩에 쓸 수 있는 모든 글자는 물론이고 기존 문자 집합에서
114지원하고 있지 않던 아주 많은 글자를 포함하고 있습니다.
115
116Perl은 내부적으로 유니코드를 문자 표현을 위해 사용합니다.
117보다 구체적으로 말하면 Perl 스크립트 안에서 UTF-8 문자열을 쓸 수 있고,
118각종 함수와 연산자(예를 들어, 정규식, index, substr)가 바이트 단위
119대신 유니코드 글자 단위로 동작합니다.
120더 자세한 것은 F<pod/perlunicode.pod> 문서를 참고하세요.
121유니코드가 널리 보급되기 전에 널리 쓰이고 있었고, 여전히 널리 쓰이고 있는
122각국/각 언어별 인코딩으로 입출력을 하고 이들 인코딩으로 된 데이터와 문서를
123다루는 것을 돕기 위해 L<Encode> 모듈이 쓰이고 있습니다.
124무엇보다 L<Encode> 모듈을 사용하면 수많은 인코딩 사이의 변환을 쉽게 할 수 있습니다.
125
126
127=head2 Encode 모듈
128
129=head3 지원 인코딩
130
131L<Encode> 모듈은 다음과 같은 한국어 인코딩을 지원합니다.
132
133=over 4
134
135=item * C<euc-kr>
136
137US-ASCII와 KS X 1001을 같이 쓰는 멀티바이트 인코딩으로 흔히
138완성형이라고 불림. KS X 2901과 RFC 1557 참고.
139
140=item * C<cp949>
141
142MS-Windows 9x/ME에서 쓰이는 확장 완성형. euc-kr에 8,822자의
143한글 음절을 더한 것임. alias는 uhc, windows-949, x-windows-949,
144ks_c_5601-1987. 맨 마지막 이름은 적절하지 않은 이름이지만, Microsoft
145제품에서 CP949의 의미로 쓰이고 있음.
146
147=item * C<johab>
148
149KS X 1001:1998 부록 3에서 규정한 조합형. 문자 레퍼토리는 cp949와 마찬가지로
150US-ASCII와 KS X 1001에 8,822자의 한글 음절을 더한 것으로 인코딩 방식은 전혀 다름.
151
152=item * C<iso-2022-kr>
153
154RFC 1557에서 규정한 한국어 인터넷 메일 교환용 인코딩으로 US-ASCII와
155KS X 1001을 레퍼토리로 하는 점에서 euc-kr과 같지만 인코딩 방식이 다름.
1561997-8년 경까지 쓰였으나 더 이상 메일 교환에 쓰이지 않음.
157
158=item * C<ksc5601-raw>
159
160KS X 1001(KS C 5601)을 GL(즉, MSB를 0으로 한 경우)에 놓았을 때의 인코딩.
161US-ASCII와 결합하지 않고 단독으로 쓰이는 일은 X11 등에서 글꼴
162인코딩(ksc5601.1987-0. '0'은 GL을 의미함)으로 쓰이는 것을 제외하고는
163거의 없음. KS C 5601은 1997년 KS X 1001로 이름을 바꾸었음. 1998년에는 두
164글자(유로화 부호와 등록 상표 부호)가 더해졌음.
165
166=back
167
168=head3 변환 예제
169
170예를 들어, euc-kr 인코딩으로 된 파일을 UTF-8로 변환하려면
171명령줄에서 다음처럼 실행합니다.
172
173 perl -Mencoding=euc-kr,STDOUT,utf8 -pe1 < file.euc-kr > file.utf8
174
175반대로 변환할 경우 다음처럼 실행합니다.
176
177 perl -Mencoding=utf8,STDOUT,euc-kr -pe1 < file.utf8 > file.euc-kr
178
179이런 변환을 좀더 편리하게 할 수 있도록 도와주는 F<piconv>가 Perl에
180기본으로 들어있습니다. 이 유틸리티는 L<Encode> 모듈을 이용한 순수 Perl
181유틸리티로 이름에서 알 수 있듯이 Unix의 C<iconv>를 모델로 한 것입니다.
182사용법은 다음과 같습니다.
183
184 piconv -f euc-kr -t utf8 < file.euc-kr > file.utf8
185 piconv -f utf8 -t euc-kr < file.utf8 > file.euc-kr
186
187=head3 모범 사례
188
189Perl은 기본적으로 내부에서 UTF-8을 사용하며 Encode 모듈을 통해
190다양한 인코딩을 지원하지만 항상 다음 규칙을 지킴으로써 인코딩과
191관련한 다양하게 발생할 수 있는 문제의 가능성을 줄이는 것을 추천합니다.
192
193=over 4
194
195=item * 소스 코드는 항상 UTF-8 인코딩으로 저장
196
197=item * 소스 코드 상단에 C<use utf8;> 프라그마 사용
198
199=item * 소스 코드, 터미널, 운영체제, 데이터 인코딩을 분리해서 이해
200
201=item * 입출력 파일 핸들에 명시적인 인코딩을 사용
202
203=item * 중복(double) 인코딩을 주의
204
205=back
206
207
208=head3 유니코드 및 한국어 인코딩 관련 자료
209
210=over 4
211
212=item * L<perluniintro>
213
214=item * L<perlunicode>
215
216=item * L<Encode>
217
218=item * L<Encode::KR>
219
220=item * L<encoding>
221
222=item * L<https://www.unicode.org/>
223
224유니코드 컨소시엄
225
226=item * L<http://std.dkuug.dk/JTC1/SC2/WG2>
227
228기본적으로 Unicode와 같은 ISO 표준인 ISO/IEC 10646 UCS(Universal
229Character Set)을 만드는 ISO/IEC JTC1/SC2/WG2의 웹 페이지
230
231=item * L<https://www.cl.cam.ac.uk/~mgk25/unicode.html>
232
233유닉스/리눅스 사용자를 위한 UTF-8 및 유니코드 관련 FAQ
234
235=item * L<http://wiki.kldp.org/Translations/html/UTF8-Unicode-KLDP/UTF8-Unicode-KLDP.html>
236
237유닉스/리눅스 사용자를 위한 UTF-8 및 유니코드 관련 FAQ의 한국어 번역
238
239=back
240
241
242=head1 Perl 관련 자료
243
244다음은 공식적인 Perl 관련 자료중 일부입니다.
245
246=over 4
247
248=item * L<https://www.perl.org/>
249
250Perl 공식 홈페이지
251
252=item * L<https://www.perl.com/>
253
254O'Reilly의 Perl 웹 페이지
255
256=item * L<https://www.cpan.org/>
257
258CPAN - Comprehensive Perl Archive Network, 통합적 Perl 파일 보관 네트워크
259
260=item * L<https://metacpan.org>
261
262메타 CPAN
263
264=item * L<https://lists.perl.org/>
265
266Perl 메일링 리스트
267
268=item * L<http://blogs.perl.org/>
269
270Perl 메타 블로그
271
272=item * L<https://www.perlmonks.org/>
273
274Perl 수도승들을 위한 수도원
275
276=item * L<https://www.pm.org/groups/asia.html>
277
278아시아 지역 Perl 몽거스 모임
279
280=item * L<http://www.perladvent.org/>
281
282Perl 크리스마스 달력
283
284=back
285
286
287다음은 Perl을 더 깊게 공부하는데 도움을 줄 수 있는 한국어 관련 사이트입니다.
288
289=over 4
290
291=item * L<https://perl.kr/>
292
293한국 Perl 커뮤니티 공식 포털
294
295=item * L<https://doc.perl.kr/>
296
297Perl 문서 한글화 프로젝트
298
299=item * L<https://cafe.naver.com/perlstudy.cafe>
300
301네이버 Perl 카페
302
303=item * L<http://www.perl.or.kr/>
304
305한국 Perl 사용자 모임
306
307=item * L<https://advent.perl.kr>
308
309Seoul.pm Perl 크리스마스 달력 (2010 ~ 2012)
310
311=item * L<http://gypark.pe.kr/wiki/Perl>
312
313GYPARK(Geunyoung Park)의 Perl 관련 한글 문서 저장소
314
315=back
316
317
318=head1 라이센스
319
320F<README> 파일의 B<'LICENSING'> 항목을 참고하세요.
321
322
323=head1 AUTHORS
324
325=over
326
327=item * Jarkko Hietaniemi E<lt>jhi@iki.fiE<gt>
328
329=item * 신정식 E<lt>jshin@mailaps.orgE<gt>
330
331=item * 김도형 E<lt>keedi@cpan.orgE<gt>
332
333=back
334
335
336=cut
337
README.linux
1# vim: syntax=pod
2
3If you read this file _as_is_, just ignore the funny characters you
4see. It is written in the POD format (see pod/perlpod.pod) which is
5specifically designed to be readable as is.
6
7=head1 NAME
8
9perllinux - Perl version 5 on Linux systems
10
11=head1 DESCRIPTION
12
13This document describes various features of Linux that will affect how Perl
14version 5 (hereafter just Perl) is compiled and/or runs.
15
16=head2 Deploying Perl on Linux
17
18Normally one can install F</usr/bin/perl> on Linux using your distribution's
19package manager (e.g: C<sudo apt-get install perl>, or
20C<sudo dnf install perl>). Note that sometimes one needs to install some
21extra system packages in order to be able to use CPAN frontends, and that
22messing with the system's perl is not always recommended. One can use
23L<perlbrew|https://perlbrew.pl/> to avoid such issues.
24
25Otherwise, perl should build fine on Linux using the mainstream compilers
26GCC and clang, while following the usual instructions.
27
28=head2 Experimental Support for Sun Studio Compilers for Linux OS
29
30Sun Microsystems has released a port of their Sun Studio compilers for
31Linux. As of May 2019, the last stable release took place on 2017, and one can
32buy support contracts for them.
33
34There are some special instructions for building Perl with Sun Studio on
35Linux. Following the normal C<Configure>, you have to run make as follows:
36
37 LDLOADLIBS=-lc make
38
39C<LDLOADLIBS> is an environment variable used by the linker to link
40C</ext> modules to glibc. Currently, that environment variable is not getting
41populated by a combination of C<Config> entries and C<ExtUtil::MakeMaker>.
42While there may be a bug somewhere in Perl's configuration or
43C<ExtUtil::MakeMaker> causing the problem, the most likely cause is an
44incomplete understanding of Sun Studio by this author. Further investigation
45is needed to get this working better.
46
47=head1 AUTHOR
48
49Steve Peters <steve@fisharerojo.org>
50
51Please report any errors, updates, or suggestions to
52L<https://github.com/Perl/perl5/issues>.
53
54
README.openbsd
1# vim: syntax=pod
2
3If you read this file _as_is_, just ignore the funny characters you
4see. It is written in the POD format (see pod/perlpod.pod) which is
5specifically designed to be readable as is.
6
7=head1 NAME
8
9perlopenbsd - Perl version 5 on OpenBSD systems
10
11=head1 DESCRIPTION
12
13This document describes various features of OpenBSD that will affect how Perl
14version 5 (hereafter just Perl) is compiled and/or runs.
15
16=head2 OpenBSD core dumps from getprotobyname_r and getservbyname_r with ithreads
17
18When Perl is configured to use ithreads, it will use re-entrant library calls
19in preference to non-re-entrant versions. There is an incompatibility in
20OpenBSD's C<getprotobyname_r> and C<getservbyname_r> function in versions 3.7
21and later that will cause a SEGV when called without doing a C<bzero> on
22their return structs prior to calling these functions. Current Perl's
23should handle this problem correctly. Older threaded Perls (5.8.6 or earlier)
24will run into this problem. If you want to run a threaded Perl on OpenBSD
253.7 or higher, you will need to upgrade to at least Perl 5.8.7.
26
27=head1 AUTHOR
28
29Steve Peters <steve@fisharerojo.org>
30
31Please report any errors, updates, or suggestions to
32L<https://github.com/Perl/perl5/issues>.
33
34
README.os390
1# vim: syntax=pod
2
3This document is written in pod format hence there are punctuation
4characters in odd places. You can read more
5about pod in pod/perlpod.pod or the short summary in the INSTALL file.
6
7=head1 NAME
8
9perlos390 - building and installing Perl for z/OS (previously called OS/390)
10
11=head1 SYNOPSIS
12
13This document will help you Configure, build, test and install Perl
14on z/OS Unix System Services.
15
16=head1 DESCRIPTION
17
18This is a ported Perl for z/OS. It has been tested on z/OS 2.4 and
19should work fine with z/OS 2.5.
20It may work on other versions or releases, but those are
21the ones it has been tested on.
22
23The native character set for z/OS is EBCDIC, but it can also run in ASCII mode.
24Perl can support either, but you have to compile it explicitly for one or the
25other. You could have both an ASCII perl, and an EBCDIC perl on the same
26machine. If you use ASCII mode and an ASCII perl, the Encode module shipped
27with perl can be used to translate files from various EBCDIC code pages for
28handling by perl, and then back on output
29
30This document describes how to build a 64-bit Dynamic Perl, either ASCII or
31EBCDIC. You can interactively choose other configurations, as well as many
32other options in the Configure script that is run as part of the build
33process. You may need to carry out some system configuration tasks before
34running Configure, as detailed below.
35
36=head2 Tools
37
38You will want to get GNU make 4.1 or later. GNU make can be downloaded from a
39port that Rocket Software provides. You will need the z/OS c99 compiler from
40IBM (though xlc in c99 mode without optimization turned on works in EBCDIC).
41
42If you want the latest development version of Perl, you will need git.
43You can use git on another platform and transfer the result via sftp or ftp to
44z/OS. But there is a z/OS native git client port available through Rocket
45Software.
46
47You may also need the gunzip client port that Rocket Software provides to unzip
48any zipped tarball you upload to z/OS.
49
50=head2 Building a 64-bit Dynamic ASCII Perl
51
52For building from an official stable release of Perl, go to
53L<https://www.perl.org/get.html> and choose any one of the
54"Download latest stable source" buttons. This will get you a tarball. The
55name of that tarball will be something like 'perl-V.R.M,tar,gz', where V.R.M is
56the version/release/modification of the perl you are downloading. Do
57
58 gunzip perl-V.R.M.tar.gz
59
60Then one of:
61
62 tar -xvf perl-V.R.M.tar
63
64 pax -r -f perl-V.R.M.tar
65
66Either of these will create the source directory. You can rename it to
67whatever you like; for these instructions, 'perl' is assumed to be the name.
68
69If instead you want the latest unstable development release, using the native
70git on z/OS, clone Perl:
71
72 git clone https://github.com/Perl/perl5.git perl
73
74Either way, once you have a 'perl' directory containing the source, cd into it,
75and tag all the code as ASCII:
76
77 cd perl
78 chtag -R -h -t -cISO8859-1 *
79
80Configure the build environment as 64-bit, Dynamic, ASCII, development,
81deploying it to F</usr/local/perl/ascii>:
82
83 export PATH=$PWD:$PATH
84 export LIBPATH=$PWD:$PATH
85 ./Configure -Dprefix=/usr/local/perl/ascii -des -Dusedevel \
86 -Duse64bitall -Dusedl
87
88If you are building from a stable source, you don't need "-Dusedevel".
89(If you run Configure without options, it will interactively ask you about
90every possible option based on its probing of what's available on your
91particular machine, so you can choose as you go along.)
92
93Run GNU make to build Perl
94
95 make
96
97Run tests to ensure Perl is working correctly. Currently, there are about a
98dozen failing tests out of nearly 2500
99
100 make test_harness
101
102Install Perl into F</usr/local/perl/ascii>:
103
104 make install
105
106=head2 Building a 64-bit Dynamic EBCDIC Perl
107
108You will need a working perl on some box with connectivity to the destination
109machine. On z/OS, it could be an ASCII perl, or a previous EBCDIC one.
110Many machines will already have a pre-built perl already running, or one can
111easily be downloaded from L<https://www.perl.org/get.html>.
112
113Follow the directions above in "Building a 64-bit Dynamic ASCII Perl" as far as
114getting a populated 'perl' directory. Then come back here to proceed.
115
116The downloaded perl will need to be converted to 1047 EBCDIC. To do this:
117
118 cd perl
119 Porting/makerel -e
120
121If the Porting/makerel step fails with an error that it can not issue the tar
122command, proceed to issue the command interactively, where V.R.M is the
123version/release/modification of Perl you are uploading:
124
125 cd ../
126 tar cf - --format=ustar perl-V.R.M | gzip --best > perl-V.R.M.tar.gz
127
128Use sftp to upload the zipped tar file to z/OS:
129
130 sftp <your system>
131 cd /tmp
132 put perl-V.R.M.tar.gz
133
134Unzip and untar the zipped tar file on z/OS:
135
136 cd /tmp
137 gunzip perl-V.R.M.tar.gz
138
139Then one of:
140
141 tar -xvf perl-V.R.M.tar
142
143 pax -r -f perl-V.R.M.tar
144
145You now have the source code for the EBCDIC Perl on z/OS and can proceed to
146build it. This is analagous to how you would build the code for ASCII, but
147note: you B<should not> tag the code but instead leave it untagged.
148
149Configure the build environment as 64-bit, Dynamic, native, development,
150deploying it to F</usr/local/perl/ebcdic>:
151
152 export PATH=$PWD:$PATH
153 export LIBPATH=$PWD:$PATH
154 ./Configure -Dprefix=/usr/local/perl/ebcdic -des -Dusedevel \
155 -Duse64bitall -Dusedl
156
157If you are building from a stable source, you don't need "-Dusedevel".
158(If you run Configure without options, it will interactively ask you about
159every possible option based on its probing of what's available on your
160particular machine, so you can choose as you go along.)
161
162Run GNU make to build Perl
163
164 make
165
166Run tests to ensure Perl is working correctly.
167
168 make test_harness
169
170You might also want to have GNU groff for OS/390 installed before
171running the "make install" step for Perl.
172
173Install Perl into F</usr/local/perl/ebcdic>:
174
175 make install
176
177EBCDIC Perl is still a work in progress. All the core code works as far as we
178know, but various modules you might want to download from CPAN do not. The
179failures range from very minor to catastrophic. Many of them are simply bugs
180in the tests, with the module actually working properly. This happens because,
181for example, the test is coded to expect a certain character ASCII code point;
182when it gets the EBCDIC value back instead, it complains. But the code
183actually worked. Other potential failures that aren't really failures stem
184from checksums coming out differently, since C<A>, for example, has a different
185bit representation between the character sets. A test that is expecting the
186ASCII value will show failure, even if the module is working perfectly. Also
187in sorting, uppercase letters come before lowercase letters on ASCII systems;
188the reverse on EBCDIC.
189
190Some CPAN modules come bundled with the downloaded perl. And a few of those
191have yet to be fixed to pass on EBCDIC platforms. As a result they are skipped
192when you run 'make test'. The current list is:
193
194 Archive::Tar
195 Config::Perl::V
196 CPAN::Meta
197 CPAN::Meta::YAML
198 Digest::MD5
199 Digest::SHA
200 Encode
201 ExtUtils::MakeMaker
202 ExtUtils::Manifest
203 HTTP::Tiny
204 IO::Compress
205 IPC::Cmd
206 JSON::PP
207 libnet
208 MIME::Base64
209 Module::Metadata
210 PerlIO::via-QuotedPrint
211 Pod::Checker
212 podlators
213 Pod::Simple
214 Socket
215 Test::Harness
216
217See also F<hints/os390.sh> for other potential gotchas.
218
219=head2 Setup and utilities for Perl on OS/390
220
221This may also be a good time to ensure that your F</etc/protocol> file
222and either your F</etc/resolv.conf> or F</etc/hosts> files are in place.
223The IBM document that describes such USS system setup issues is
224"z/OS UNIX System Services Planning"
225
226For successful testing you may need to turn on the sticky bit for your
227world readable /tmp directory if you have not already done so (see man chmod).
228
229=head2 Useful files for trouble-shooting
230
231If your configuration is failing, read hints/os390.sh
232This file provides z/OS specific options to direct the build process.
233
234=head3 Shell
235
236A message of the form:
237
238 (I see you are using the Korn shell. Some ksh's blow up on Configure,
239 mainly on older exotic systems. If yours does, try the Bourne shell
240 instead.)
241
242is nothing to worry about at all.
243
244=head3 Dynamic loading
245
246Dynamic loading is required if you want to use XS modules from CPAN (like
247DBI (and DBD's), JSON::XS, and Text::CSV_XS) or update CORE modules from
248CPAN with newer versions (like Encode) without rebuilding all of the perl
249binary.
250
251The instructions above will create a dynamic Perl. If you do not want to
252use dynamic loading, remove the -Dusedl option.
253See the comments in hints/os390.sh for more information on dynamic loading.
254
255=head3 Optimizing
256
257Optimization has not been turned on yet. There may be issues if Perl
258is optimized.
259
260=head2 Build Anomalies with Perl on OS/390
261
262"Out of memory!" messages during the build of Perl are most often fixed
263by re building the GNU make utility for OS/390 from a source code kit.
264
265Within USS your F</etc/profile> or F<$HOME/.profile> may limit your ulimit
266settings. Check that the following command returns reasonable values:
267
268 ulimit -a
269
270To conserve memory you should have your compiler modules loaded into the
271Link Pack Area (LPA/ELPA) rather than in a link list or step lib.
272
273If the compiler complains of syntax errors during the build of the
274Socket extension then be sure to fix the syntax error in the system
275header /usr/include/sys/socket.h.
276
277=head2 Testing Anomalies with Perl on OS/390
278
279The "make test" step runs a Perl Verification Procedure, usually before
280installation. You might encounter STDERR messages even during a successful
281run of "make test". Here is a guide to some of the more commonly seen
282anomalies:
283
284=head3 Out of Memory (31-bit only)
285
286Out of memory problems should not be an issue, unless you are attempting to build
287a 31-bit Perl.
288
289If you _are_ building a 31-bit Perl, the constrained environment may mean you
290need to change memory options for Perl.
291In addition to the comments
292above on memory limitations it is also worth checking for _CEE_RUNOPTS
293in your environment. Perl now has (in miniperlmain.c) a C #pragma for 31-bit only
294to set CEE run options, but the environment variable wins.
295
296The 31-bit C code asks for:
297
298 #pragma runopts(HEAP(2M,500K,ANYWHERE,KEEP,8K,4K) STACK(,,ANY,) ALL31(ON))
299
300The important parts of that are the second argument (the increment) to HEAP,
301and allowing the stack to be "Above the (16M) line". If the heap
302increment is too small then when perl (for example loading unicode/Name.pl) tries
303to create a "big" (400K+) string it cannot fit in a single segment
304and you get "Out of Memory!" - even if there is still plenty of memory
305available.
306
307A related issue is use with perl's malloc. Perl's malloc uses C<sbrk()>
308to get memory, and C<sbrk()> is limited to the first allocation so in this
309case something like:
310
311 HEAP(8M,500K,ANYWHERE,KEEP,8K,4K)
312
313is needed to get through the test suite.
314
315=head2 Usage Hints for Perl on z/OS
316
317When using Perl on z/OS please keep in mind that the EBCDIC and ASCII
318character sets are different. See L<perlebcdic> for more on such character
319set issues. Perl builtin functions that may behave differently under
320EBCDIC are also mentioned in the perlport.pod document.
321
322If you are having trouble with square brackets then consider switching your
323rlogin or telnet client. Try to avoid older 3270 emulators and ISHELL for
324working with Perl on USS.
325
326=head2 Modules and Extensions for Perl on z/OS (Static Only)
327
328Pure Perl (that is non XS) modules may be installed via the usual:
329
330 perl Makefile.PL
331 make
332 make test
333 make install
334
335If you built perl with dynamic loading capability then that would also
336be the way to build XS based extensions. However, if you built perl with
337static linking you can still build XS based extensions for z/OS
338but you will need to follow the instructions in ExtUtils::MakeMaker for
339building statically linked perl binaries. In the simplest configurations
340building a static perl + XS extension boils down to:
341
342 perl Makefile.PL
343 make
344 make perl
345 make test
346 make install
347 make -f Makefile.aperl inst_perl MAP_TARGET=perl
348
349=head2 Running Perl on z/OS
350
351To run the 64-bit Dynamic Perl environment, update your PATH and LIBPATH
352to include the location you installed Perl into, and then run the perl you
353installed as perlV.R.M where V/R/M is the Version/Release/Modification level
354of the current development level.
355If you are running the ASCII/EBCDIC Bi-Modal Perl environment, you also need to
356set up your ASCII/EBCDIC Bi-Modal environment variables, and ensure any Perl
357source code you run is tagged appropriately as ASCII or EBCDIC using
358"chtag -t -c<CCSID>":
359
360=over
361
362=item For ASCII Only:
363
364 export _BPXK_AUTOCVT=ON
365 export _CEE_RUNOPTS="FILETAG(AUTOCVT,AUTOTAG),POSIX(ON)"
366 export _TAG_REDIR_ERR="txt"
367 export _TAG_REDIR_IN="txt"
368 export _TAG_REDIR_OUT="txt"
369
370=item For ASCII or EBCDIC:
371
372 export PATH=/usr/local/perl/ascii:$PATH
373 export LIBPATH=/usr/local/perl/ascii/lib:$LIBPATH
374 perlV.R.M args
375
376=back
377
378If tcsh is your login shell then use the setenv command.
379
380=head1 AUTHORS
381
382David Fiander and Peter Prymmer with thanks to Dennis Longnecker
383and William Raffloer for valuable reports, LPAR and PTF feedback.
384Thanks to Mike MacIsaac and Egon Terwedow for SG24-5944-00.
385Thanks to Ignasi Roca for pointing out the floating point problems.
386Thanks to John Goodyear for dynamic loading help.
387
388Mike Fulton and Karl Williamson have provided updates for UTF8, DLL, 64-bit and
389ASCII/EBCDIC Bi-Modal support
390
391=head1 OTHER SITES
392
393L<https://github.com/ZOSOpenTools/perlport/> provides documentation and tools
394for building various z/OS Perl configurations and has some useful tools in the
395'bin' directory you may want to use for building z/OS Perl yourself.
396
397=head1 HISTORY
398
399Updated 24 December 2021 to enable initial ASCII support
400
401Updated 03 October 2019 for perl-5.33.3+
402
403Updated 28 November 2001 for broken URLs.
404
405Updated 12 March 2001 to mention //'SYS1.TCPPARMS(TCPDATA)'.
406
407Updated 24 January 2001 to mention dynamic loading.
408
409Updated 15 January 2001 for the 5.7.1 release of Perl.
410
411Updated 12 November 2000 for the 5.7.1 release of Perl.
412
413This document was podified for the 5.005_03 release of Perl 11 March 1999.
414
415This document was originally written by David Fiander for the 5.005
416release of Perl.
417
418=cut
419
420
README.os400
1# vim: syntax=pod
2
3If you read this file _as_is_, just ignore the funny characters you see.
4It is written in the POD format (see pod/perlpod.pod) which is specially
5designed to be readable as is.
6
7=head1 NAME
8
9perlos400 - Perl version 5 on OS/400
10
11B<This document needs to be updated, but we don't know what it should say.
12Please submit comments to L<https://github.com/Perl/perl5/issues>.>
13
14=head1 DESCRIPTION
15
16This document describes various features of IBM's OS/400 operating
17system that will affect how Perl version 5 (hereafter just Perl) is
18compiled and/or runs.
19
20By far the easiest way to build Perl for OS/400 is to use the PASE
21(Portable Application Solutions Environment), for more information see
22L<http://www.iseries.ibm.com/developer/factory/pase/index.html>
23This environment allows one to use AIX APIs while programming, and it
24provides a runtime that allows AIX binaries to execute directly on the
25PowerPC iSeries.
26
27=head2 Compiling Perl for OS/400 PASE
28
29The recommended way to build Perl for the OS/400 PASE is to build the
30Perl 5 source code (release 5.8.1 or later) under AIX.
31
32The trick is to give a special parameter to the Configure shell script
33when running it on AIX:
34
35 sh Configure -DPASE ...
36
37The default installation directory of Perl under PASE is /QOpenSys/perl.
38This can be modified if needed with Configure parameter -Dprefix=/some/dir.
39
40Starting from OS/400 V5R2 the IBM Visual Age compiler is supported
41on OS/400 PASE, so it is possible to build Perl natively on OS/400.
42The easier way, however, is to compile in AIX, as just described.
43
44If you don't want to install the compiled Perl in AIX into /QOpenSys
45(for packaging it before copying it to PASE), you can use a Configure
46parameter: -Dinstallprefix=/tmp/QOpenSys/perl. This will cause the
47"make install" to install everything into that directory, while the
48installed files still think they are (will be) in /QOpenSys/perl.
49
50If building natively on PASE, please do the build under the /QOpenSys
51directory, since Perl is happier when built on a case sensitive filesystem.
52
53=head2 Installing Perl in OS/400 PASE
54
55If you are compiling on AIX, simply do a "make install" on the AIX box.
56Once the install finishes, tar up the /QOpenSys/perl directory. Transfer
57the tarball to the OS/400 using FTP with the following commands:
58
59 > binary
60 > site namefmt 1
61 > put perl.tar /QOpenSys
62
63Once you have it on, simply bring up a PASE shell and extract the tarball.
64
65If you are compiling in PASE, then "make install" is the only thing you
66will need to do.
67
68The default path for perl binary is /QOpenSys/perl/bin/perl. You'll
69want to symlink /QOpenSys/usr/bin/perl to this file so you don't have
70to modify your path.
71
72=head2 Using Perl in OS/400 PASE
73
74Perl in PASE may be used in the same manner as you would use Perl on AIX.
75
76Scripts starting with #!/usr/bin/perl should work if you have
77/QOpenSys/usr/bin/perl symlinked to your perl binary. This will not
78work if you've done a setuid/setgid or have environment variable
79PASE_EXEC_QOPENSYS="N". If you have V5R1, you'll need to get the
80latest PTFs to have this feature. Scripts starting with
81#!/QOpenSys/perl/bin/perl should always work.
82
83=head2 Known Problems
84
85When compiling in PASE, there is no "oslevel" command. Therefore,
86you may want to create a script called "oslevel" that echoes the
87level of AIX that your version of PASE runtime supports. If you're
88unsure, consult your documentation or use "4.3.3.0".
89
90If you have test cases that fail, check for the existence of spool files.
91The test case may be trying to use a syscall that is not implemented
92in PASE. To avoid the SIGILL, try setting the PASE_SYSCALL_NOSIGILL
93environment variable or have a handler for the SIGILL. If you can
94compile programs for PASE, run the config script and edit config.sh
95when it gives you the option. If you want to remove fchdir(), which
96isn't implement in V5R1, simply change the line that says:
97
98d_fchdir='define'
99
100to
101
102d_fchdir='undef'
103
104and then compile Perl. The places where fchdir() is used have
105alternatives for systems that do not have fchdir() available.
106
107=head2 Perl on ILE
108
109There exists a port of Perl to the ILE environment. This port, however,
110is based quite an old release of Perl, Perl 5.00502 (August 1998).
111(As of July 2002 the latest release of Perl is 5.8.0, and even 5.6.1
112has been out since April 2001.) If you need to run Perl on ILE, though,
113you may need this older port: L<http://www.cpan.org/ports/#os400>
114Note that any Perl release later than 5.00502 has not been ported to ILE.
115
116If you need to use Perl in the ILE environment, you may want to consider
117using Qp2RunPase() to call the PASE version of Perl.
118
119=head1 AUTHORS
120
121Jarkko Hietaniemi <jhi@iki.fi>
122Bryan Logan <bryanlog@us.ibm.com>
123David Larson <larson1@us.ibm.com>
124
125=cut
126
README.plan9
1# vim: syntax=pod
2
3If you read this file _as_is_, just ignore the funny characters you see.
4It is written in the POD format (see pod/perlpod.pod) which is specially
5designed to be readable as is.
6
7=head1 NAME
8
9perlplan9 - Plan 9-specific documentation for Perl
10
11=head1 DESCRIPTION
12
13These are a few notes describing features peculiar to
14Plan 9 Perl. As such, it is not intended to be a replacement
15for the rest of the Perl 5 documentation (which is both
16copious and excellent). If you have any questions to
17which you can't find answers in these man pages, contact
18Luther Huffman at lutherh@stratcom.com and we'll try to
19answer them.
20
21=head2 Invoking Perl
22
23Perl is invoked from the command line as described in
24L<perl>. Most perl scripts, however, do have a first line
25such as "#!/usr/local/bin/perl". This is known as a shebang
26(shell-bang) statement and tells the OS shell where to find
27the perl interpreter. In Plan 9 Perl this statement should be
28"#!/bin/perl" if you wish to be able to directly invoke the
29script by its name.
30 Alternatively, you may invoke perl with the command "Perl"
31instead of "perl". This will produce Acme-friendly error
32messages of the form "filename:18".
33
34Some scripts, usually identified with a *.PL extension, are
35self-configuring and are able to correctly create their own
36shebang path from config information located in Plan 9
37Perl. These you won't need to be worried about.
38
39=head2 What's in Plan 9 Perl
40
41Although Plan 9 Perl currently only provides static
42loading, it is built with a number of useful extensions.
43These include Opcode, FileHandle, Fcntl, and POSIX. Expect
44to see others (and DynaLoading!) in the future.
45
46=head2 What's not in Plan 9 Perl
47
48As mentioned previously, dynamic loading isn't currently
49available nor is MakeMaker. Both are high-priority items.
50
51=head2 Perl5 Functions not currently supported in Plan 9 Perl
52
53Some, such as C<chown> and C<umask> aren't provided
54because the concept does not exist within Plan 9. Others,
55such as some of the socket-related functions, simply
56haven't been written yet. Many in the latter category
57may be supported in the future.
58
59The functions not currently implemented include:
60
61 chown, chroot, dbmclose, dbmopen, getsockopt,
62 setsockopt, recvmsg, sendmsg, getnetbyname,
63 getnetbyaddr, getnetent, getprotoent, getservent,
64 sethostent, setnetent, setprotoent, setservent,
65 endservent, endnetent, endprotoent, umask
66
67There may be several other functions that have undefined
68behavior so this list shouldn't be considered complete.
69
70=head2 Signals in Plan 9 Perl
71
72For compatibility with perl scripts written for the Unix
73environment, Plan 9 Perl uses the POSIX signal emulation
74provided in Plan 9's ANSI POSIX Environment (APE). Signal stacking
75isn't supported. The signals provided are:
76
77 SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGABRT,
78 SIGFPE, SIGKILL, SIGSEGV, SIGPIPE, SIGPIPE, SIGALRM,
79 SIGTERM, SIGUSR1, SIGUSR2, SIGCHLD, SIGCONT,
80 SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU
81
82=head1 COMPILING AND INSTALLING PERL ON PLAN 9
83
84WELCOME to Plan 9 Perl, brave soul!
85
86 This is a preliminary alpha version of Plan 9 Perl. Still to be
87implemented are MakeMaker and DynaLoader. Many perl commands are
88missing or currently behave in an inscrutable manner. These gaps will,
89with perseverance and a modicum of luck, be remedied in the near
90future.To install this software:
91
921. Create the source directories and libraries for perl by running the
93plan9/setup.rc command (i.e., located in the plan9 subdirectory).
94Note: the setup routine assumes that you haven't dearchived these
95files into /sys/src/cmd/perl. After running setup.rc you may delete
96the copy of the source you originally detarred, as source code has now
97been installed in /sys/src/cmd/perl. If you plan on installing perl
98binaries for all architectures, run "setup.rc -a".
99
1002. After making sure that you have adequate privileges to build system
101software, from /sys/src/cmd/perl/5.00301 (adjust version
102appropriately) run:
103
104 mk install
105
106If you wish to install perl versions for all architectures (68020,
107mips, sparc and 386) run:
108
109 mk installall
110
1113. Wait. The build process will take a *long* time because perl
112bootstraps itself. A 75MHz Pentium, 16MB RAM machine takes roughly 30
113minutes to build the distribution from scratch.
114
115=head2 Installing Perl Documentation on Plan 9
116
117This perl distribution comes with a tremendous amount of
118documentation. To add these to the built-in manuals that come with
119Plan 9, from /sys/src/cmd/perl/5.00301 (adjust version appropriately)
120run:
121
122 mk man
123
124To begin your reading, start with:
125
126 man perl
127
128This is a good introduction and will direct you towards other man
129pages that may interest you.
130
131(Note: "mk man" may produce some extraneous noise. Fear not.)
132
133=head1 BUGS
134
135"As many as there are grains of sand on all the beaches of the
136world . . ." - Carl Sagan
137
138=head1 Revision date
139
140This document was revised 09-October-1996 for Perl 5.003_7.
141
142=head1 AUTHOR
143
144Direct questions, comments, and the unlikely bug report (ahem) direct
145comments toward:
146
147Luther Huffman, lutherh@stratcom.com,
148Strategic Computer Solutions, Inc.
149
README.qnx
1# vim: syntax=pod
2
3If you read this file _as_is_, just ignore the funny characters you see.
4It is written in the POD format (see pod/perlpod.pod) which is specially
5designed to be readable as is.
6
7=head1 NAME
8
9perlqnx - Perl version 5 on QNX
10
11=head1 DESCRIPTION
12
13As of perl5.7.2 all tests pass under:
14
15 QNX 4.24G
16 Watcom 10.6 with Beta/970211.wcc.update.tar.F
17 socket3r.lib Nov21 1996.
18
19As of perl5.8.1 there is at least one test still failing.
20
21Some tests may complain under known circumstances.
22
23See below and hints/qnx.sh for more information.
24
25Under QNX 6.2.0 there are still a few tests which fail.
26See below and hints/qnx.sh for more information.
27
28=head2 Required Software for Compiling Perl on QNX4
29
30As with many unix ports, this one depends on a few "standard"
31unix utilities which are not necessarily standard for QNX4.
32
33=over 4
34
35=item /bin/sh
36
37This is used heavily by Configure and then by
38perl itself. QNX4's version is fine, but Configure
39will choke on the 16-bit version, so if you are
40running QNX 4.22, link /bin/sh to /bin32/ksh
41
42=item ar
43
44This is the standard unix library builder.
45We use wlib. With Watcom 10.6, when wlib is
46linked as "ar", it behaves like ar and all is
47fine. Under 9.5, a cover is required. One is
48included in ../qnx
49
50=item nm
51
52This is used (optionally) by configure to list
53the contents of libraries. I will generate
54a cover function on the fly in the UU directory.
55
56=item cpp
57
58Configure and perl need a way to invoke a C
59preprocessor. I have created a simple cover
60for cc which does the right thing. Without this,
61Configure will create its own wrapper which works,
62but it doesn't handle some of the command line arguments
63that perl will throw at it.
64
65=item make
66
67You really need GNU make to compile this. GNU make
68ships by default with QNX 4.23, but you can get it
69from quics for earlier versions.
70
71=back
72
73=head2 Outstanding Issues with Perl on QNX4
74
75There is no support for dynamically linked libraries in QNX4.
76
77If you wish to compile with the Socket extension, you need
78to have the TCP/IP toolkit, and you need to make sure that
79-lsocket locates the correct copy of socket3r.lib. Beware
80that the Watcom compiler ships with a stub version of
81socket3r.lib which has very little functionality. Also
82beware the order in which wlink searches directories for
83libraries. You may have /usr/lib/socket3r.lib pointing to
84the correct library, but wlink may pick up
85/usr/watcom/10.6/usr/lib/socket3r.lib instead. Make sure
86they both point to the correct library, that is,
87/usr/tcptk/current/usr/lib/socket3r.lib.
88
89The following tests may report errors under QNX4:
90
91dist/Cwd/Cwd.t will complain if `pwd` and cwd don't give
92the same results. cwd calls `fullpath -t`, so if you
93cd `fullpath -t` before running the test, it will
94pass.
95
96lib/File/Find/taint.t will complain if '.' is in your
97PATH. The PATH test is triggered because cwd calls
98`fullpath -t`.
99
100ext/IO/lib/IO/t/io_sock.t: Subtests 14 and 22 are skipped due to
101the fact that the functionality to read back the non-blocking
102status of a socket is not implemented in QNX's TCP/IP. This has
103been reported to QNX and it may work with later versions of
104TCP/IP.
105
106t/io/tell.t: Subtest 27 is failing. We are still investigating.
107
108=head2 QNX auxiliary files
109
110The files in the "qnx" directory are:
111
112=over 4
113
114=item qnx/ar
115
116A script that emulates the standard unix archive (aka library)
117utility. Under Watcom 10.6, ar is linked to wlib and provides the
118expected interface. With Watcom 9.5, a cover function is
119required. This one is fairly crude but has proved adequate for
120compiling perl.
121
122=item qnx/cpp
123
124A script that provides C preprocessing functionality. Configure can
125generate a similar cover, but it doesn't handle all the command-line
126options that perl throws at it. This might be reasonably placed in
127/usr/local/bin.
128
129=back
130
131=head2 Outstanding issues with perl under QNX6
132
133The following tests are still failing for Perl 5.8.1 under QNX 6.2.0:
134
135 op/sprintf.........................FAILED at test 91
136 lib/Benchmark......................FAILED at test 26
137
138This is due to a bug in the C library's printf routine.
139printf("'%e'", 0. ) produces '0.000000e+0', but ANSI requires
140'0.000000e+00'. QNX has acknowledged the bug.
141
142=head2 Cross-compilation
143
144Perl supports cross-compiling to QNX NTO through the
145Native Development Kit (NDK) for the Blackberry 10. This means that you
146can cross-compile for both ARM and x86 versions of the platform.
147
148=head3 Setting up a cross-compilation environment
149
150You can download the NDK from
151L<http://developer.blackberry.com/native/downloads/>.
152
153See
154L<http://developer.blackberry.com/native/documentation/cascades/getting_started/setting_up.html>
155for instructions to set up your device prior to attempting anything else.
156
157Once you've installed the NDK and set up your device, all that's
158left to do is setting up the device and the cross-compilation
159environment. Blackberry provides a script, C<bbndk-env.sh> (occasionally
160named something like C<bbndk-env_10_1_0_4828.sh>) which can be used
161to do this. However, there's a bit of a snag that we have to work through:
162The script modifies PATH so that 'gcc' or 'ar' point to their
163cross-compilation equivalents, which screws over the build process.
164
165So instead you'll want to do something like this:
166
167 $ orig_path=$PATH
168 $ source $location_of_bbndk/bbndk-env*.sh
169 $ export PATH="$orig_path:$PATH"
170
171Besides putting the cross-compiler and the rest of the toolchain in your
172PATH, this will also provide the QNX_TARGET variable, which
173we will pass to Configure through -Dsysroot.
174
175=head3 Preparing the target system
176
177It's quite possible that the target system doesn't have a readily
178available /tmp, so it's generally safer to do something like this:
179
180 $ ssh $TARGETUSER@$TARGETHOST 'rm -rf perl; mkdir perl; mkdir perl/tmp'
181 $ export TARGETDIR=`ssh $TARGETUSER@$TARGETHOST pwd`/perl
182 $ export TARGETENV="export TMPDIR=$TARGETDIR/tmp; "
183
184Later on, we'll pass this to Configure through -Dtargetenv
185
186=head3 Calling Configure
187
188If you are targetting an ARM device -- which currently includes the vast
189majority of phones and tablets -- you'll want to pass
190-Dcc=arm-unknown-nto-qnx8.0.0eabi-gcc to Configure. Alternatively, if you
191are targetting an x86 device, or using the simulator provided with the NDK,
192you should specify -Dcc=ntox86-gcc instead.
193
194A sample Configure invocation looks something like this:
195
196 ./Configure -des -Dusecrosscompile \
197 -Dsysroot=$QNX_TARGET \
198 -Dtargetdir=$TARGETDIR \
199 -Dtargetenv="$TARGETENV" \
200 -Dcc=ntox86-gcc \
201 -Dtarghost=... # Usual cross-compilation options
202
203=head1 AUTHOR
204
205Norton T. Allen (allen@huarp.harvard.edu)
206
207
README.synology
1# vim: syntax=pod
2
3If you read this file _as_is_, just ignore the funny characters you see.
4It is written in the POD format (see pod/perlpod.pod) which is specially
5designed to be readable as is. But if you have been into Perl you
6probably already know this.
7
8=head1 NAME
9
10perlsynology - Perl 5 on Synology DSM systems
11
12=head1 DESCRIPTION
13
14Synology manufactures a vast number of Network Attached Storage (NAS)
15devices that are very popular in large organisations as well as small
16businesses and homes.
17
18The NAS systems are equipped with Synology Disk Storage Manager (DSM),
19which is a trimmed-down Linux system enhanced with several tools for
20managing the NAS. There are several flavours of hardware: Marvell
21Armada (ARMv5tel, ARMv7l), Intel Atom (i686, x86_64), Freescale QorIQ
22(PPC), and more. For a full list see the
23L<Synology FAQ|https://kb.synology.com/en-global/DSM/tutorial/What_kind_of_CPU_does_my_NAS_have>.
24
25Since it is based on Linux, the NAS can run many popular Linux
26software packages, including Perl. In fact, Synology provides a
27ready-to-install package for Perl, depending on the version of DSM
28the installed perl ranges from 5.8.6 on DSM-4.3 to 5.28.1 on DSM-7.1.
29
30There is an active user community that provides many software packages
31for the Synology DSM systems; at the time of writing this document
32they provide Perl version 5.28.1.
33
34This document describes various features of Synology DSM operating
35system that will affect how Perl 5 (hereafter just Perl) is
36configured, compiled and/or runs. It has been compiled and verified by
37Johan Vromans for the Synology DS413 (QorIQ), with feedback from
38H.Merijn Brand (DS213: ARMv5tel, RS815: Intel Atom x64, and DS218+:
39Celeron J3355).
40
41=head2 Setting up the build environment
42
43=head3 DSM 7
44
45For a comfortable development environment, Entware is currently the only
46viable solution. Just follow the detailed instructions on
47L<Install Entware on Synology NAS|https://github.com/Entware/Entware/wiki/Install-on-Synology-NAS>.
48supported architectures are armv5, armv7, mipsel, wl500g, x86_32, and x86_64.
49Check L<here|https://pkg.entware.net/binaries/> for supported platforms.
50
51That github link also shows what environments should be supported.
52
53It was tested on DSM-7.1 by H.Merijn Brand on a DS218+ and a DS220+ (both
54Intel x64).
55
56Entware comes with a precompiled 5.26.1 (Jan 2018) that allowes
57building shared XS code. Note that this installation does B<not> use
58a site_perl folder. The available C<cpan> works. If all required
59development packages are installed too, also for XS.
60
61Installing perl from the Community package center:
62
63=over 4
64
65=item *
66
67Using your favourite browser open the DSM management page and start
68the Package Center.
69
70=item *
71
72In Settings, add the following Package Sources:
73
74 Name: Community
75 Location: https://synopackage.com/repository/spk/All
76
77=item *
78
79Still in Settings, in Channel Update, select Beta Channel.
80
81=back
82
83To complete the development environment, install make and gcc
84
85 ds220# opkg install make gcc
86
87Then, optionally, make sure you use the more recent bash and gawk.
88
89 ds220# opkg install bash gawk
90 ds220# cd /usr/bin
91 ds220# mv bash bash.syno
92 ds220# ln -s /opt/bin/bash .
93
94In order to have Configure find the required libraries
95
96 ds220# cd /opt/lib
97 ds220# ln -s libcrypt.so.? libcrypt.so
98 ds220# ln -s libdl.so.? libdl.so
99 ds220# ln -s libgdbm.so.? libgdbm.so
100 ds220# ln -s libgdbm_compat.so.? libgdbm_compat.so
101 ds220# ln -s libm.so.? libm.so
102 ds220# ln -s libpthread.so.? libpthread.so
103 ds220# ln -s libutil.so.? libutil.so
104
105=head3 DSM 6
106
107Using iPkg has been deprecated on DSM 6, but an alternative is available
108for DSM 6: entware/opkg. For instructions on how to use that, please read
109L<Install Entware-ng on Synology NAS|https://github.com/Entware-ng/Entware-ng/wiki/Install-on-Synology-NAS>
110
111That sadly does not (yet) work on QorIQ. At the moment of writing, the
112supported architectures are armv5, armv7, mipsel, wl500g, x86_32, and x86_64.
113Check L<here|https://pkg.entware.net/binaries/> for supported platforms.
114
115Entware-ng comes with a precompiled 5.24.1 (June 2017) that allowes
116building shared XS code. Note that this installation does B<not> use
117a site_perl folder. The available C<cpan> works. If all required
118development packages are installed too, also for XS.
119
120=head3 DSM 5
121
122As DSM is a trimmed-down Linux system, it lacks many of the tools and
123libraries commonly found on Linux. The basic tools like sh, cp, rm,
124etc. are implemented using
125L<BusyBox|https://en.wikipedia.org/wiki/BusyBox>.
126
127=over 4
128
129=item *
130
131Using your favourite browser open the DSM management page and start
132the Package Center.
133
134=item *
135
136If you want to smoke test Perl, install C<Perl>.
137
138=item *
139
140In Settings, add the following Package Sources:
141
142 https://www.cphub.net
143 http://packages.quadrat4.de
144
145As these two are both discontinued, it is unlikely you will be able
146to set up a build environment on DSM 5.
147
148=item *
149
150Still in Settings, in Channel Update, select Beta Channel.
151
152=item *
153
154Press Refresh. In the left panel the item "Community" will appear.
155Click it. Select "Bootstrap Installer Beta" and install it.
156
157=item *
158
159Likewise, install "iPKGui Beta".
160
161The application window should now show an icon for iPKGui.
162
163=item *
164
165Start iPKGui. Install the packages C<make>, C<gcc> and C<coreutils>.
166
167If you want to smoke test Perl, install C<patch>.
168
169=back
170
171The next step is to add some symlinks to system libraries. For
172example, the development software expect a library C<libm.so> that
173normally is a symlink to C<libm.so.6>. Synology only provides the
174latter and not the symlink.
175
176Here the actual architecture of the Synology system matters. You have
177to find out where the gcc libraries have been installed. Look in /opt
178for a directory similar to arm-none-linux-gnueab or
179powerpc-linux-gnuspe. In the instructions below I'll use
180powerpc-linux-gnuspe as an example.
181
182=over 4
183
184=item *
185
186On the DSM management page start the Control Panel.
187
188=item *
189
190Click Terminal, and enable SSH service.
191
192=item *
193
194Close Terminal and the Control Panel.
195
196=item *
197
198Open a shell on the Synology using ssh and become root.
199
200=item *
201
202Execute the following commands:
203
204 cd /lib
205 ln -s libm.so.6 libm.so
206 ln -s libcrypt.so.1 libcrypt.so
207 ln -s libdl.so.2 libdl.so
208 cd /opt/powerpc-linux-gnuspe/lib (or
209 /opt/arm-none-linux-gnueabi/lib)
210 ln -s /lib/libdl.so.2 libdl.so
211
212=back
213
214B<WARNING:> When you perform a system software upgrade, these links
215will disappear and need to be re-established.
216
217=head2 Compiling Perl 5
218
219When the build environment has been set up, building and testing Perl
220is straightforward. The only thing you need to do is download the
221sources as usual, and add a file Policy.sh as follows:
222
223 # Administrivia.
224 perladmin="your.email@goes.here"
225
226 # Install Perl in a tree in /opt/perl instead of /opt/bin.
227 prefix=/opt/perl
228
229 # Select the compiler. Note that there is no 'cc' alias or link
230 # on older DSM versions
231 cc=gcc
232 awk=/opt/bin/gawk
233
234 # Build flags. Optional
235 ccflags="-DDEBUGGING"
236
237 # Library and include paths.
238 locincpth="/opt/include"
239 loclibpth="/opt/lib /usr/local/lib /usr/lib"
240 libpth="/opt/lib /usr/local/lib /usr/lib"
241
242You may want to create the destination directory and give it the right
243permissions before installing, thus eliminating the need to build Perl
244as a super user.
245
246In the directory where you unpacked the sources, issue the familiar
247commands:
248
249 $ bash ./Configure -Dusedevel -Duseshrplib -Duse64bitall -des
250 $ make -j2
251 $ env TEST_JOBS=2 make test_harness
252 $ make install
253
254=head2 Known problems
255
256=head3 Configure
257
258The GNU C-compiler might spit out unexpected stuff under -v, which
259causes the analysis of cppsymbols to fail because of unmatched quotes.
260
261You'll note if config.sh fails with a syntax error.
262
263=head3 Build
264
265=over 4
266
267=item Error message "No error definitions found".
268
269This error is generated when it is not possible to find the local
270definitions for error codes, due to the uncommon structure of the
271Synology file system.
272
273This error was fixed in the Perl development git for version 5.19,
274commit 7a8f1212e5482613c8a5b0402528e3105b26ff24.
275
276=back
277
278=head3 Failing tests
279
280=over 4
281
282=item F<ext/DynaLoader/t/DynaLoader.t>
283
284One subtest fails due to the uncommon structure of the Synology file
285system. The file F</lib/glibc.so> is missing.
286
287B<WARNING:> Do not symlink F</lib/glibc.so.6> to F</lib/glibc.so> or
288some system components will start to fail.
289
290=back
291
292=head2 Smoke testing Perl
293
294If building completes successfully, you can set up smoke testing as
295described in the Test::Smoke documentation.
296
297For smoke testing you need a running Perl. You can either install the
298Synology supplied package for Perl 5.8.6, or build and install your
299own, much more recent version.
300
301Note that I could not run successful smokes when initiated by the
302Synology Task Scheduler. I resorted to initiating the smokes via a
303cron job run on another system, using ssh:
304
305 ssh nas1 wrk/Test-Smoke/smoke/smokecurrent.sh
306
307=head3 Local patches
308
309When local patches are applied with smoke testing, the test driver
310will automatically request regeneration of certain tables after the
311patches are applied. The Synology supplied Perl 5.8.6 (at least on the
312DS413) B<is NOT capable> of generating these tables. It will generate
313opcodes with bogus values, causing the build to fail.
314
315You can prevent regeneration by adding the setting
316
317 'flags' => 0,
318
319to the smoke config, or by adding another patch that inserts
320
321 exit 0 if $] == 5.008006;
322
323in the beginning of the C<regen.pl> program.
324
325=head2 Adding libraries
326
327The above procedure describes a basic environment and hence results in
328a basic Perl. If you want to add additional libraries to Perl, you may
329need some extra settings.
330
331For example, the basic Perl does not have any of the DB libraries (db,
332dbm, ndbm, gdsm). You can add these using iPKGui, however, you need to
333set environment variable LD_LIBRARY_PATH to the appropriate value:
334
335 LD_LIBRARY_PATH=/lib:/opt/lib
336 export LD_LIBRARY_PATH
337
338This setting needs to be in effect while Perl is built, but also when
339the programs are run.
340
341=head1 REVISION
342
343July 2022, for DSM 5.1.5022 and DSM 6.1-15101-4, and DSM-7.1-42661-3.
344
345=head1 AUTHOR
346
347Johan Vromans <jvromans@squirrel.nl>
348H. Merijn Brand <cpan@tux.freedom.nl>
349
350=cut
351
README.tru64
1# vim: syntax=pod
2
3If you read this file _as_is_, just ignore the funny characters you see.
4It is written in the POD format (see pod/perlpod.pod) which is specially
5designed to be readable as is.
6
7=head1 NAME
8
9perltru64 - Perl version 5 on Tru64 (formerly known as Digital UNIX formerly known as DEC OSF/1) systems
10
11=head1 DESCRIPTION
12
13This document describes various features of HP's (formerly Compaq's,
14formerly Digital's) Unix operating system (Tru64) that will affect
15how Perl version 5 (hereafter just Perl) is configured, compiled
16and/or runs.
17
18=head2 Compiling Perl 5 on Tru64
19
20The recommended compiler to use in Tru64 is the native C compiler.
21The native compiler produces much faster code (the speed difference is
22noticeable: several dozen percentages) and also more correct code: if
23you are considering using the GNU C compiler you should use at the
24very least the release of 2.95.3 since all older gcc releases are
25known to produce broken code when compiling Perl. One manifestation
26of this brokenness is the lib/sdbm test dumping core; another is many
27of the op/regexp and op/pat, or ext/Storable tests dumping core
28(the exact pattern of failures depending on the GCC release and
29optimization flags).
30
31Both the native cc and gcc seem to consume lots of memory when
32building Perl. toke.c is a known trouble spot when optimizing:
33256 megabytes of data section seems to be enough. Another known
34trouble spot is the mktables script which builds the Unicode support
35tables. The default setting of the process data section in Tru64
36should be one gigabyte, but some sites/setups might have lowered that.
37The configuration process of Perl checks for too low process limits,
38and lowers the optimization for the toke.c if necessary, and also
39gives advice on how to raise the process limits
40(for example: C<ulimit -d 262144>)
41
42Also, Configure might abort with
43
44 Build a threading Perl? [n]
45 Configure[2437]: Syntax error at line 1 : 'config.sh' is not expected.
46
47This indicates that Configure is being run with a broken Korn shell
48(even though you think you are using a Bourne shell by using
49"sh Configure" or "./Configure"). The Korn shell bug has been reported
50to Compaq as of February 1999 but in the meanwhile, the reason ksh is
51being used is that you have the environment variable BIN_SH set to
52'xpg4'. This causes /bin/sh to delegate its duties to /bin/posix/sh
53(a ksh). Unset the environment variable and rerun Configure.
54
55=head2 Using Large Files with Perl on Tru64
56
57In Tru64 Perl is automatically able to use large files, that is,
58files larger than 2 gigabytes, there is no need to use the Configure
59-Duselargefiles option as described in INSTALL (though using the option
60is harmless).
61
62=head2 Threaded Perl on Tru64
63
64If you want to use threads, you should primarily use the Perl
655.8.0 threads model by running Configure with -Duseithreads.
66
67Perl threading is going to work only in Tru64 4.0 and newer releases,
68older operating releases like 3.2 aren't probably going to work
69properly with threads.
70
71In Tru64 V5 (at least V5.1A, V5.1B) you cannot build threaded Perl with gcc
72because the system header <pthread.h> explicitly checks for supported
73C compilers, gcc (at least 3.2.2) not being one of them. But the
74system C compiler should work just fine.
75
76=head2 Long Doubles on Tru64
77
78You cannot Configure Perl to use long doubles unless you have at least
79Tru64 V5.0, the long double support simply wasn't functional enough
80before that. Perl's Configure will override attempts to use the long
81doubles (you can notice this by Configure finding out that the modfl()
82function does not work as it should).
83
84At the time of this writing (June 2002), there is a known bug in the
85Tru64 libc printing of long doubles when not using "e" notation.
86The values are correct and usable, but you only get a limited number
87of digits displayed unless you force the issue by using C<printf
88"%.33e",$num> or the like. For Tru64 versions V5.0A through V5.1A, a
89patch is expected sometime after perl 5.8.0 is released. If your libc
90has not yet been patched, you'll get a warning from Configure when
91selecting long doubles.
92
93=head2 DB_File tests failing on Tru64
94
95The DB_File tests (db-btree.t, db-hash.t, db-recno.t) may fail you
96have installed a newer version of Berkeley DB into the system and the
97-I and -L compiler and linker flags introduce version conflicts with
98the DB 1.85 headers and libraries that came with the Tru64. For example,
99mixing a DB v2 library with the DB v1 headers is a bad idea. Watch
100out for Configure options -Dlocincpth and -Dloclibpth, and check your
101/usr/local/include and /usr/local/lib since they are included by default.
102
103The second option is to explicitly instruct Configure to detect the
104newer Berkeley DB installation, by supplying the right directories with
105C<-Dlocincpth=/some/include> and C<-Dloclibpth=/some/lib> B<and> before
106running "make test" setting your LD_LIBRARY_PATH to F</some/lib>.
107
108The third option is to work around the problem by disabling the
109DB_File completely when build Perl by specifying -Ui_db to Configure,
110and then using the BerkeleyDB module from CPAN instead of DB_File.
111The BerkeleyDB works with Berkeley DB versions 2.* or greater.
112
113The Berkeley DB 4.1.25 has been tested with Tru64 V5.1A and found
114to work. The latest Berkeley DB can be found from L<http://www.sleepycat.com>.
115
116=head2 64-bit Perl on Tru64
117
118In Tru64 Perl's integers are automatically 64-bit wide, there is
119no need to use the Configure -Duse64bitint option as described
120in INSTALL. Similarly, there is no need for -Duse64bitall
121since pointers are automatically 64-bit wide.
122
123=head2 Warnings about floating-point overflow when compiling Perl on Tru64
124
125When compiling Perl in Tru64 you may (depending on the compiler
126release) see two warnings like this
127
128 cc: Warning: numeric.c, line 104: In this statement, floating-point
129 overflow occurs in evaluating the expression "1.8e308". (floatoverfl)
130 return HUGE_VAL;
131 -----------^
132
133and when compiling the POSIX extension
134
135 cc: Warning: const-c.inc, line 2007: In this statement, floating-point
136 overflow occurs in evaluating the expression "1.8e308". (floatoverfl)
137 return HUGE_VAL;
138 -------------------^
139
140The exact line numbers may vary between Perl releases. The warnings
141are benign and can be ignored: in later C compiler releases the warnings
142should be gone.
143
144When the file F<pp_sys.c> is being compiled you may (depending on the
145operating system release) see an additional compiler flag being used:
146C<-DNO_EFF_ONLY_OK>. This is normal and refers to a feature that is
147relevant only if you use the C<filetest> pragma. In older releases of
148the operating system the feature was broken and the NO_EFF_ONLY_OK
149instructs Perl not to use the feature.
150
151=head1 Testing Perl on Tru64
152
153During "make test" the C<comp>/C<cpp> will be skipped because on Tru64 it
154cannot be tested before Perl has been installed. The test refers to
155the use of the C<-P> option of Perl.
156
157=head1 ext/ODBM_File/odbm Test Failing With Static Builds
158
159The ext/ODBM_File/odbm is known to fail with static builds
160(Configure -Uusedl) due to a known bug in Tru64's static libdbm
161library. The good news is that you very probably don't need to ever
162use the ODBM_File extension since more advanced NDBM_File works fine,
163not to mention the even more advanced DB_File.
164
165=head1 Perl Fails Because Of Unresolved Symbol sockatmark
166
167If you get an error like
168
169 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.
170
171you need to either recompile your Perl in Tru64 4.0D or upgrade your
172Tru64 4.0D to at least 4.0F: the sockatmark() system call was
173added in Tru64 4.0F, and the IO extension refers that symbol.
174
175=head1 read_cur_obj_info: bad file magic number
176
177You may be mixing the Tru64 cc/ar/ld with the GNU gcc/ar/ld.
178That may work, but sometimes it doesn't (your gcc or GNU utils
179may have been compiled for an incompatible OS release).
180
181Try 'which ld' and 'which ld' (or try 'ar --version' and 'ld --version',
182which work only for the GNU tools, and will announce themselves to be such),
183and adjust your PATH so that you are consistently using either
184the native tools or the GNU tools. After fixing your PATH, you should
185do 'make distclean' and start all the way from running the Configure
186since you may have quite a confused situation.
187
188=head1 AUTHOR
189
190Jarkko Hietaniemi <jhi@iki.fi>
191
192=cut
193
README.tw
1# vim: syntax=pod
2
3如果你用一般的文字編輯器閱覽這份文件, 請忽略文中奇特的註記字符.
4這份文件是以 POD (簡明文件格式) 寫成; 這種格式是為了能讓人直接讀取,
5而特別設計的. 關於此格式的進一步資訊, 請參考 perlpod 線上文件.
6
7=encoding utf8
8
9=head1 NAME
10
11perltw - 正體中文 Perl 指南
12
13=head1 DESCRIPTION
14
15歡迎來到 Perl 的天地!
16
17從 5.8.0 版開始, Perl 具備了完善的 Unicode (萬國碼) 支援,
18也連帶支援了許多拉丁語系以外的編碼方式; CJK (中日韓) 便是其中的一部份.
19Unicode 是國際性的標準, 試圖涵蓋世界上所有的字符: 西方世界, 東方世界,
20以及兩者間的一切 (希臘文, 敘利亞文, 阿拉伯文, 希伯來文, 印度文,
21印地安文, 等等). 它也容納了多種作業系統與平臺 (如 PC 及麥金塔).
22
23Perl 本身以 Unicode 進行操作. 這表示 Perl 內部的字串資料可用 Unicode
24表示; Perl 的函式與算符 (例如正規表示式比對) 也能對 Unicode 進行操作.
25在輸入及輸出時, 為了處理以 Unicode 之前的編碼方式儲存的資料, Perl
26提供了 Encode 這個模組, 可以讓你輕易地讀取及寫入舊有的編碼資料.
27
28Encode 延伸模組支援下列正體中文的編碼方式 ('big5' 表示 'big5-eten'):
29
30 big5-eten Big5 編碼 (含倚天延伸字形)
31 big5-hkscs Big5 + 香港外字集, 2001 年版
32 cp950 字碼頁 950 (Big5 + 微軟添加的字符)
33
34舉例來說, 將 Big5 編碼的檔案轉成 Unicode, 祗需鍵入下列指令:
35
36 perl -MEncode -pe '$_= encode( utf8 => decode( big5 => $_ ) )' \
37 < file.big5 > file.utf8
38
39Perl 也內附了 "piconv", 一支完全以 Perl 寫成的字符轉換工具程式, 用法如下:
40
41 piconv -f big5 -t utf8 < file.big5 > file.utf8
42 piconv -f utf8 -t big5 < file.utf8 > file.big5
43
44另外,若程式碼本身以 utf8 編碼儲存,配合使用 utf8 模組,可讓程式碼中字串以及其運
45算皆以字符為單位,而不以位元為單位,如下所示:
46
47 #!/usr/bin/env perl
48 use utf8;
49 print length("駱駝"); # 2 (不是 6)
50 print index("諄諄教誨", "教誨"); # 2 (從 0 起算第 2 個字符)
51
52
53=head2 額外的中文編碼
54
55如果需要更多的中文編碼, 可以從 CPAN (L<https://www.cpan.org/>) 下載
56Encode::HanExtra 模組. 它目前提供下列編碼方式:
57
58 cccii 1980 年文建會的中文資訊交換碼
59 euc-tw Unix 延伸字符集, 包含 CNS11643 平面 1-7
60 big5plus 中文數位化技術推廣基金會的 Big5+
61 big5ext 中文數位化技術推廣基金會的 Big5e
62
63另外, Encode::HanConvert 模組則提供了簡繁轉換用的兩種編碼:
64
65 big5-simp Big5 正體中文與 Unicode 簡體中文互轉
66 gbk-trad GBK 簡體中文與 Unicode 正體中文互轉
67
68若想在 GBK 與 Big5 之間互轉, 請參考該模組內附的 b2g.pl 與 g2b.pl 兩支程式,
69或在程式內使用下列寫法:
70
71 use Encode::HanConvert;
72 $euc_cn = big5_to_gb($big5); # 從 Big5 轉為 GBK
73 $big5 = gb_to_big5($euc_cn); # 從 GBK 轉為 Big5
74
75=head2 進一步的資訊
76
77請參考 Perl 內附的大量說明文件 (不幸全是用英文寫的), 來學習更多關於
78Perl 的知識, 以及 Unicode 的使用方式. 不過, 外部的資源相當豐富:
79
80=head2 提供 Perl 資源的網址
81
82=over 4
83
84=item L<https://www.perl.org/>
85
86Perl 的首頁
87
88=item L<https://www.perl.com/>
89
90由 Perl 基金會所營運的文章輯錄
91
92=item L<https://www.cpan.org/>
93
94Perl 綜合典藏網 (Comprehensive Perl Archive Network)
95
96=item L<https://lists.perl.org/>
97
98Perl 郵遞論壇一覽
99
100=back
101
102=head2 學習 Perl 的網址
103
104=over 4
105
106=item L<http://www.oreilly.com.cn/index.php?func=booklist&cat=68>
107
108正體中文版的歐萊禮 Perl 書藉
109
110=back
111
112=head2 Perl 使用者集會
113
114=over 4
115
116=item L<https://www.pm.org/groups/taiwan.html>
117
118臺灣 Perl 推廣組一覽
119
120=item L<irc://chat.freenode.org/#perl.tw>
121
122Perl.tw 線上聊天室
123
124=back
125
126=head2 Unicode 相關網址
127
128=over 4
129
130=item L<https://www.unicode.org/>
131
132Unicode 學術學會 (Unicode 標準的制定者)
133
134=item L<http://www.cl.cam.ac.uk/%7Emgk25/unicode.html>
135
136Unix/Linux 上的 UTF-8 及 Unicode 答客問
137
138=back
139
140=head2 中文化資訊
141
142=over 4
143
144=item 中文化軟體聯盟
145
146L<http://www.cpatch.org/>
147
148=back
149
150=head1 SEE ALSO
151
152L<Encode>, L<Encode::TW>, L<perluniintro>, L<perlunicode>
153
154=head1 AUTHORS
155
156Jarkko Hietaniemi E<lt>jhi@iki.fiE<gt>
157
158Audrey Tang (唐鳳) E<lt>audreyt@audreyt.orgE<gt>
159
160=cut
161
README.vos
1# vim: syntax=pod
2
3If you read this file _as_is_, just ignore the funny characters you
4see. It is written in the POD format (see pod/perlpod.pod) which is
5specially designed to be readable as is.
6
7=head1 NAME
8
9perlvos - Perl for Stratus OpenVOS
10
11=head1 SYNOPSIS
12
13This file contains notes for building perl on the Stratus OpenVOS
14operating system. Perl is a scripting or macro language that is
15popular on many systems. See L<perlbook> for a number of good books
16on Perl.
17
18These are instructions for building Perl from source. This version of
19Perl requires the dynamic linking support that is found in OpenVOS
20Release 17.1 and thus is not supported on OpenVOS Release 17.0 or
21earlier releases.
22
23If you are running VOS Release 14.4.1 or later, you can obtain a
24pre-compiled, supported copy of perl by purchasing the GNU Tools
25product from Stratus Technologies.
26
27=head1 BUILDING PERL FOR OPENVOS
28
29To build perl from its source code on the Stratus V Series platform
30you must have OpenVOS Release 17.1.0 or later, GNU Tools Release
313.5 or later, and the C/POSIX Runtime Libraries.
32
33Follow the normal instructions for building perl; e.g, enter bash, run
34the Configure script, then use "gmake" to build perl.
35
36=head1 INSTALLING PERL IN OPENVOS
37
38=over 4
39
40=item 1
41
42After you have built perl using the Configure script, ensure that you
43have modify and default write permission to C<< >system>ported >> and
44all subdirectories. Then type
45
46 gmake install
47
48=item 2
49
50While there are currently no architecture-specific extensions or
51modules distributed with perl, the following directories can be
52used to hold such files (replace the string VERSION by the
53appropriate version number):
54
55 >system>ported>lib>perl5>VERSION>i786
56
57=item 3
58
59Site-specific perl extensions and modules can be installed in one of
60two places. Put architecture-independent files into:
61
62 >system>ported>lib>perl5>site_perl>VERSION
63
64Put site-specific architecture-dependent files into one of the
65following directories:
66
67 >system>ported>lib>perl5>site_perl>VERSION>i786
68
69=item 4
70
71You can examine the @INC variable from within a perl program
72to see the order in which Perl searches these directories.
73
74=back
75
76=head1 USING PERL IN OPENVOS
77
78=head2 Restrictions of Perl on OpenVOS
79
80This port of Perl version 5 prefers Unix-style, slash-separated
81pathnames over OpenVOS-style greater-than-separated pathnames.
82OpenVOS-style pathnames should work in most contexts, but if you have
83trouble, replace all greater-than characters by slash characters.
84Because the slash character is used as a pathname delimiter, Perl
85cannot process OpenVOS pathnames containing a slash character in a
86directory or file name; these must be renamed.
87
88This port of Perl also uses Unix-epoch date values internally.
89As long as you are dealing with ASCII character string
90representations of dates, this should not be an issue. The
91supported epoch is January 1, 1980 to January 17, 2038.
92
93See the file pod/perlport.pod for more information about the OpenVOS
94port of Perl.
95
96=head1 TEST STATUS
97
98A number of the perl self-tests fails for various reasons; generally
99these are minor and due to subtle differences between common
100POSIX-based environments and the OpenVOS POSIX environment. Ensure
101that you conduct sufficient testing of your code to guarantee that it
102works properly in the OpenVOS environment.
103
104=head1 SUPPORT STATUS
105
106I'm offering this port "as is". You can ask me questions, but I
107can't guarantee I'll be able to answer them. There are some
108excellent books available on the Perl language; consult a book
109seller.
110
111If you want a supported version of perl for OpenVOS, purchase the
112OpenVOS GNU Tools product from Stratus Technologies, along with a
113support contract (or from anyone else who will sell you support).
114
115=head1 AUTHOR
116
117Paul Green (Paul.Green@stratus.com)
118
119=head1 LAST UPDATE
120
121February 28, 2013
122
123=cut
124