| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "PERLPLAN9 1" |
| 58 |
.TH PERLPLAN9 1 2025-11-16 "perl v5.40.1" "Perl Programmers Reference Guide" |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
perlplan9 \- Plan 9\-specific documentation for Perl |
| 65 |
.SH DESCRIPTION |
| 66 |
.IX Header "DESCRIPTION" |
| 67 |
These are a few notes describing features peculiar to |
| 68 |
Plan 9 Perl. As such, it is not intended to be a replacement |
| 69 |
for the rest of the Perl 5 documentation (which is both |
| 70 |
copious and excellent). If you have any questions to |
| 71 |
which you can't find answers in these man pages, contact |
| 72 |
Luther Huffman at [email protected] and we'll try to |
| 73 |
answer them. |
| 74 |
.SS "Invoking Perl" |
| 75 |
.IX Subsection "Invoking Perl" |
| 76 |
Perl is invoked from the command line as described in |
| 77 |
perl. Most perl scripts, however, do have a first line |
| 78 |
such as "#!/usr/local/bin/perl". This is known as a shebang |
| 79 |
(shell-bang) statement and tells the OS shell where to find |
| 80 |
the perl interpreter. In Plan 9 Perl this statement should be |
| 81 |
"#!/bin/perl" if you wish to be able to directly invoke the |
| 82 |
script by its name. |
| 83 |
Alternatively, you may invoke perl with the command "Perl" |
| 84 |
instead of "perl". This will produce Acme-friendly error |
| 85 |
messages of the form "filename:18". |
| 86 |
.PP |
| 87 |
Some scripts, usually identified with a *.PL extension, are |
| 88 |
self-configuring and are able to correctly create their own |
| 89 |
shebang path from config information located in Plan 9 |
| 90 |
Perl. These you won't need to be worried about. |
| 91 |
.SS "What's in Plan 9 Perl" |
| 92 |
.IX Subsection "What's in Plan 9 Perl" |
| 93 |
Although Plan 9 Perl currently only provides static |
| 94 |
loading, it is built with a number of useful extensions. |
| 95 |
These include Opcode, FileHandle, Fcntl, and POSIX. Expect |
| 96 |
to see others (and DynaLoading!) in the future. |
| 97 |
.SS "What's not in Plan 9 Perl" |
| 98 |
.IX Subsection "What's not in Plan 9 Perl" |
| 99 |
As mentioned previously, dynamic loading isn't currently |
| 100 |
available nor is MakeMaker. Both are high-priority items. |
| 101 |
.SS "Perl5 Functions not currently supported in Plan 9 Perl" |
| 102 |
.IX Subsection "Perl5 Functions not currently supported in Plan 9 Perl" |
| 103 |
Some, such as \f(CW\*(C`chown\*(C'\fR and \f(CW\*(C`umask\*(C'\fR aren't provided |
| 104 |
because the concept does not exist within Plan 9. Others, |
| 105 |
such as some of the socket-related functions, simply |
| 106 |
haven't been written yet. Many in the latter category |
| 107 |
may be supported in the future. |
| 108 |
.PP |
| 109 |
The functions not currently implemented include: |
| 110 |
.PP |
| 111 |
.Vb 5 |
| 112 |
\& chown, chroot, dbmclose, dbmopen, getsockopt, |
| 113 |
\& setsockopt, recvmsg, sendmsg, getnetbyname, |
| 114 |
\& getnetbyaddr, getnetent, getprotoent, getservent, |
| 115 |
\& sethostent, setnetent, setprotoent, setservent, |
| 116 |
\& endservent, endnetent, endprotoent, umask |
| 117 |
.Ve |
| 118 |
.PP |
| 119 |
There may be several other functions that have undefined |
| 120 |
behavior so this list shouldn't be considered complete. |
| 121 |
.SS "Signals in Plan 9 Perl" |
| 122 |
.IX Subsection "Signals in Plan 9 Perl" |
| 123 |
For compatibility with perl scripts written for the Unix |
| 124 |
environment, Plan 9 Perl uses the POSIX signal emulation |
| 125 |
provided in Plan 9's ANSI POSIX Environment (APE). Signal stacking |
| 126 |
isn't supported. The signals provided are: |
| 127 |
.PP |
| 128 |
.Vb 4 |
| 129 |
\& SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGABRT, |
| 130 |
\& SIGFPE, SIGKILL, SIGSEGV, SIGPIPE, SIGPIPE, SIGALRM, |
| 131 |
\& SIGTERM, SIGUSR1, SIGUSR2, SIGCHLD, SIGCONT, |
| 132 |
\& SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU |
| 133 |
.Ve |
| 134 |
.SH "COMPILING AND INSTALLING PERL ON PLAN 9" |
| 135 |
.IX Header "COMPILING AND INSTALLING PERL ON PLAN 9" |
| 136 |
WELCOME to Plan 9 Perl, brave soul! |
| 137 |
.PP |
| 138 |
.Vb 5 |
| 139 |
\& This is a preliminary alpha version of Plan 9 Perl. Still to be |
| 140 |
\&implemented are MakeMaker and DynaLoader. Many perl commands are |
| 141 |
\&missing or currently behave in an inscrutable manner. These gaps will, |
| 142 |
\&with perseverance and a modicum of luck, be remedied in the near |
| 143 |
\&future.To install this software: |
| 144 |
.Ve |
| 145 |
.PP |
| 146 |
1. Create the source directories and libraries for perl by running the |
| 147 |
plan9/setup.rc command (i.e., located in the plan9 subdirectory). |
| 148 |
Note: the setup routine assumes that you haven't dearchived these |
| 149 |
files into /sys/src/cmd/perl. After running setup.rc you may delete |
| 150 |
the copy of the source you originally detarred, as source code has now |
| 151 |
been installed in /sys/src/cmd/perl. If you plan on installing perl |
| 152 |
binaries for all architectures, run "setup.rc \-a". |
| 153 |
.PP |
| 154 |
2. After making sure that you have adequate privileges to build system |
| 155 |
software, from /sys/src/cmd/perl/5.00301 (adjust version |
| 156 |
appropriately) run: |
| 157 |
.PP |
| 158 |
.Vb 1 |
| 159 |
\& mk install |
| 160 |
.Ve |
| 161 |
.PP |
| 162 |
If you wish to install perl versions for all architectures (68020, |
| 163 |
mips, sparc and 386) run: |
| 164 |
.PP |
| 165 |
.Vb 1 |
| 166 |
\& mk installall |
| 167 |
.Ve |
| 168 |
.PP |
| 169 |
3. Wait. The build process will take a *long* time because perl |
| 170 |
bootstraps itself. A 75MHz Pentium, 16MB RAM machine takes roughly 30 |
| 171 |
minutes to build the distribution from scratch. |
| 172 |
.SS "Installing Perl Documentation on Plan 9" |
| 173 |
.IX Subsection "Installing Perl Documentation on Plan 9" |
| 174 |
This perl distribution comes with a tremendous amount of |
| 175 |
documentation. To add these to the built-in manuals that come with |
| 176 |
Plan 9, from /sys/src/cmd/perl/5.00301 (adjust version appropriately) |
| 177 |
run: |
| 178 |
.PP |
| 179 |
.Vb 1 |
| 180 |
\& mk man |
| 181 |
.Ve |
| 182 |
.PP |
| 183 |
To begin your reading, start with: |
| 184 |
.PP |
| 185 |
.Vb 1 |
| 186 |
\& man perl |
| 187 |
.Ve |
| 188 |
.PP |
| 189 |
This is a good introduction and will direct you towards other man |
| 190 |
pages that may interest you. |
| 191 |
.PP |
| 192 |
(Note: "mk man" may produce some extraneous noise. Fear not.) |
| 193 |
.SH BUGS |
| 194 |
.IX Header "BUGS" |
| 195 |
"As many as there are grains of sand on all the beaches of the |
| 196 |
world . . ." \- Carl Sagan |
| 197 |
.SH "Revision date" |
| 198 |
.IX Header "Revision date" |
| 199 |
This document was revised 09\-October\-1996 for Perl 5.003_7. |
| 200 |
.SH AUTHOR |
| 201 |
.IX Header "AUTHOR" |
| 202 |
Direct questions, comments, and the unlikely bug report (ahem) direct |
| 203 |
comments toward: |
| 204 |
.PP |
| 205 |
Luther Huffman, [email protected], |
| 206 |
Strategic Computer Solutions, Inc. |