perlplan9.html

来自「perl教程」· HTML 代码 · 共 191 行

HTML
191
字号
<?xml version="1.0" ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<!-- saved from url=(0017)http://localhost/ -->
<script language="JavaScript" src="../../displayToc.js"></script>
<script language="JavaScript" src="../../tocParas.js"></script>
<script language="JavaScript" src="../../tocTab.js"></script>
<link rel="stylesheet" type="text/css" href="../../scineplex.css">
<title>perlplan9 - Plan 9-specific documentation for Perl</title>
<link rel="stylesheet" href="../../Active.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>

<body>

<script>writelinks('__top__',2);</script>
<h1><a>perlplan9 - Plan 9-specific documentation for Perl</a></h1>
<p><a name="__index__"></a></p>

<!-- INDEX BEGIN -->

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#description">DESCRIPTION</a></li>
	<ul>

		<li><a href="#invoking_perl">Invoking Perl</a></li>
		<li><a href="#what_s_in_plan_9_perl">What's in Plan 9 Perl</a></li>
		<li><a href="#what_s_not_in_plan_9_perl">What's not in Plan 9 Perl</a></li>
		<li><a href="#perl5_functions_not_currently_supported_in_plan_9_perl">Perl5 Functions not currently supported in Plan 9 Perl</a></li>
		<li><a href="#signals_in_plan_9_perl">Signals in Plan 9 Perl</a></li>
	</ul>

	<li><a href="#compiling_and_installing_perl_on_plan_9">COMPILING AND INSTALLING PERL ON PLAN 9</a></li>
	<ul>

		<li><a href="#installing_perl_documentation_on_plan_9">Installing Perl Documentation on Plan 9</a></li>
	</ul>

	<li><a href="#bugs">BUGS</a></li>
	<li><a href="#revision_date">Revision date</a></li>
	<li><a href="#author">AUTHOR</a></li>
</ul>
<!-- INDEX END -->

<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>perlplan9 - Plan 9-specific documentation for Perl</p>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>These are a few notes describing features peculiar to
Plan 9 Perl. As such, it is not intended to be a replacement
for the rest of the Perl 5 documentation (which is both 
copious and excellent). If you have any questions to 
which you can't find answers in these man pages, contact 
Luther Huffman at <a href="mailto:lutherh@stratcom.com">lutherh@stratcom.com</a> and we'll try to 
answer them.</p>
<p>
</p>
<h2><a name="invoking_perl">Invoking Perl</a></h2>
<p>Perl is invoked from the command line as described in 
<a href="../../lib/Pod/perl.html">the perl manpage</a>. Most perl scripts, however, do have a first line 
such as &quot;#!/usr/local/bin/perl&quot;. This is known as a shebang 
(shell-bang) statement and tells the OS shell where to find 
the perl interpreter. In Plan 9 Perl this statement should be 
&quot;#!/bin/perl&quot; if you wish to be able to directly invoke the 
script by its name.
     Alternatively, you may invoke perl with the command &quot;Perl&quot;
instead of &quot;perl&quot;. This will produce Acme-friendly error
messages of the form &quot;filename:18&quot;.</p>
<p>Some scripts, usually identified with a *.PL extension, are 
self-configuring and are able to correctly create their own 
shebang path from config information located in Plan 9 
Perl. These you won't need to be worried about.</p>
<p>
</p>
<h2><a name="what_s_in_plan_9_perl">What's in Plan 9 Perl</a></h2>
<p>Although Plan 9 Perl currently only  provides static 
loading, it is built with a number of useful extensions. 
These include Opcode, FileHandle, Fcntl, and POSIX. Expect 
to see others (and DynaLoading!) in the future.</p>
<p>
</p>
<h2><a name="what_s_not_in_plan_9_perl">What's not in Plan 9 Perl</a></h2>
<p>As mentioned previously, dynamic loading isn't currently 
available nor is MakeMaker. Both are high-priority items.</p>
<p>
</p>
<h2><a name="perl5_functions_not_currently_supported_in_plan_9_perl">Perl5 Functions not currently supported in Plan 9 Perl</a></h2>
<p>Some, such as <a href="../../lib/Pod/perlfunc.html#item_chown"><code>chown</code></a> and <a href="../../lib/Pod/perlfunc.html#item_umask"><code>umask</code></a> aren't provided 
because the concept does not exist within Plan 9. Others,
such as some of the socket-related functions, simply
haven't been written yet. Many in the latter category 
may be supported in the future.</p>
<p>The functions not currently implemented include:</p>
<pre>
    chown, chroot, dbmclose, dbmopen, getsockopt, 
    setsockopt, recvmsg, sendmsg, getnetbyname, 
    getnetbyaddr, getnetent, getprotoent, getservent, 
    sethostent, setnetent, setprotoent, setservent, 
    endservent, endnetent, endprotoent, umask</pre>
<p>There may be several other functions that have undefined 
behavior so this list shouldn't be considered complete.</p>
<p>
</p>
<h2><a name="signals_in_plan_9_perl">Signals in Plan 9 Perl</a></h2>
<p>For compatibility with perl scripts written for the Unix 
environment, Plan 9 Perl uses the POSIX signal emulation
provided in Plan 9's ANSI POSIX Environment (APE). Signal stacking
isn't supported. The signals provided are:</p>
<pre>
    SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGABRT,
    SIGFPE, SIGKILL, SIGSEGV, SIGPIPE, SIGPIPE, SIGALRM, 
    SIGTERM, SIGUSR1, SIGUSR2, SIGCHLD, SIGCONT,
    SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU</pre>
<p>
</p>
<hr />
<h1><a name="compiling_and_installing_perl_on_plan_9">COMPILING AND INSTALLING PERL ON PLAN 9</a></h1>
<p>WELCOME to Plan 9 Perl, brave soul!</p>
<pre>
   This is a preliminary alpha version of Plan 9 Perl. Still to be
implemented are MakeMaker and DynaLoader. Many perl commands are
missing or currently behave in an inscrutable manner. These gaps will,
with perseverance and a modicum of luck, be remedied in the near
future.To install this software:</pre>
<p>1. Create the source directories and libraries for perl by running the
plan9/setup.rc command (i.e., located in the plan9 subdirectory).
Note: the setup routine assumes that you haven't dearchived these
files into /sys/src/cmd/perl. After running setup.rc you may delete
the copy of the source you originally detarred, as source code has now
been installed in /sys/src/cmd/perl. If you plan on installing perl
binaries for all architectures, run &quot;setup.rc -a&quot;.</p>
<p>2. After making sure that you have adequate privileges to build system
software, from /sys/src/cmd/perl/5.00301 (adjust version
appropriately) run:</p>
<pre>
        mk install</pre>
<p>If you wish to install perl versions for all architectures (68020,
mips, sparc and 386) run:</p>
<pre>
        mk installall</pre>
<p>3. Wait. The build process will take a *long* time because perl
bootstraps itself. A 75MHz Pentium, 16MB RAM machine takes roughly 30
minutes to build the distribution from scratch.</p>
<p>
</p>
<h2><a name="installing_perl_documentation_on_plan_9">Installing Perl Documentation on Plan 9</a></h2>
<p>This perl distribution comes with a tremendous amount of
documentation. To add these to the built-in manuals that come with
Plan 9, from /sys/src/cmd/perl/5.00301 (adjust version appropriately)
run:</p>
<pre>
        mk man</pre>
<p>To begin your reading, start with:</p>
<pre>
        man perl</pre>
<p>This is a good introduction and will direct you towards other man
pages that may interest you.</p>
<p>(Note: &quot;mk man&quot; may produce some extraneous noise. Fear not.)</p>
<p>
</p>
<hr />
<h1><a name="bugs">BUGS</a></h1>
<p>&quot;As many as there are grains of sand on all the beaches of the 
world . . .&quot; - Carl Sagan</p>
<p>
</p>
<hr />
<h1><a name="revision_date">Revision date</a></h1>
<p>This document was revised 09-October-1996 for Perl 5.003_7.</p>
<p>
</p>
<hr />
<h1><a name="author">AUTHOR</a></h1>
<p>Direct questions, comments, and the unlikely bug report (ahem) direct
comments toward:</p>
<p>Luther Huffman, <a href="mailto:lutherh@stratcom.com,">lutherh@stratcom.com,</a> 
Strategic Computer Solutions, Inc.</p>

</body>

</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?