📄 ch06_06.htm
字号:
<html><head><title>The perlbug Program (Perl in a Nutshell, 2nd Edition)</title><link rel="stylesheet" type="text/css" href="../style/style1.css" /><meta name="DC.Creator" content="Stephen Spainhour" /><meta name="DC.Format" content="text/xml" scheme="MIME" /><meta name="DC.Language" content="en-US" /><meta name="DC.Publisher" content="O'Reilly & Associates, Inc." /><meta name="DC.Source" scheme="ISBN" content="0596002416L" /><meta name="DC.Subject.Keyword" content="stuff" /><meta name="DC.Title" content="Perl in a Nutshell, 2nd Edition" /><meta name="DC.Type" content="Text.Monograph" /></head><body bgcolor="#ffffff"><img src="gifs/smbanner.gif" usemap="#banner-map" border="0" alt="Book Home" /><map name="banner-map"><area shape="rect" coords="1,-2,616,66" href="index.htm" alt="Java and XSLT" /><area shape="rect" coords="629,-11,726,25" href="jobjects/fsearch.htm" alt="Search this book" /></map><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch06_05.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228" /><td align="right" valign="top" width="228"><a href="part3.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr></table></div><h2 class="sect1">6.6. The perlbug Program</h2><p><a name="INDEX-1210" /><a name="INDEX-1211" /><a name="INDEX-1212" /><a name="INDEX-1213" /><a name="INDEX-1214" />As you develop and debug your owncode, it's possible that you'll runinto a bug in Perl itself. If you do, the best way to report it iswith the <em class="emphasis">perlbug</em> program.<em class="emphasis">perlbug</em> is a Perl program designed to automatethe process of reporting bugs in the Perl standard distribution andthe standard modules. It works interactively, prompting you for theinformation needed and generating an email message addressed to<em class="email">perlbug@perl.com</em>. (If the bug you found is in one ofthe nonstandard Perl ports, see the documentation for that port tofind out how to report bugs.) When you run<em class="emphasis">perlbug</em>, it prompts you to include all relevantinformation, making it easier for the Perl developers to reproduceand track down the bug. If you come up with a patch to resolve theproblem, include that too.</p><p>Don't use <em class="emphasis">perlbug</em> to get helpdebugging your code (for that, see the list of newsgroups and otherresources in <a href="ch01_01.htm">Chapter 1, "Introduction to Perl"</a>). But if you believeyou've found a bug in Perl itself,<em class="emphasis">perlbug</em> is the way to report it.</p><p>To run <em class="emphasis">perlbug</em>, simply enter the command withany options you want to include. For example:</p><blockquote><pre class="code">% perlbug -t</pre></blockquote><p>The possible options are:</p><dl><dt><i><em class="emphasis">-a address</em></i></dt><dd><a name="INDEX-1215" />Email address to send report to.Default is <em class="email">perlbug@perl.com</em>.</p></dd><dt><i><em class="emphasis">-b body</em></i></dt><dd><a name="INDEX-1216" />Body ofreport. If not included on the command line or in a file, you aregiven a chance to edit it.</p></dd><dt><i><em class="emphasis">-C</em></i></dt><dd><a name="INDEX-1217" />Don't send a copy toyour Perl administrator.</p></dd><dt><i><em class="emphasis">-c address</em></i></dt><dd><a name="INDEX-1218" />Email address where copy should besent. Default is your Perl administrator.</p></dd><dt><i><em class="emphasis">-d</em></i></dt><dd><a name="INDEX-1219" />Data mode. (The default if youredirect or pipe input.) Prints your configuration data, withoutmailing anything. Use with <em class="emphasis">-v</em> to get morecomplete data.</p></dd><dt><i><em class="emphasis">-e editor</em></i></dt><dd><a name="INDEX-1220" />Editor touse. Defaults to your default editor or to <em class="emphasis">vi</em>.</p></dd><dt><i><em class="emphasis">-f file</em></i></dt><dd><a name="INDEX-1221" />File containing prepared body ofreport.</p></dd><dt><i><em class="emphasis">-h</em></i></dt><dd><a name="INDEX-1222" />Prints help message.</p></dd><dt><i><em class="emphasis">-ok</em></i></dt><dd><a name="INDEX-1223" />Reports successful build on thissystem to Perl porters. Forces <em class="emphasis">-S</em> and<em class="emphasis">-C</em>; forces and supplies values for<em class="emphasis">-s</em> and <em class="emphasis">-b</em>. Use with<em class="emphasis">-v</em> to get more complete data. Only reports ifthis system is less than 60 days old.</p></dd><dt><i><em class="emphasis">-okay</em></i></dt><dd><a name="INDEX-1224" />Like <em class="emphasis">-ok</em> but willreport on systems older than 60 days.</p></dd><dt><i><em class="emphasis">-r address</em></i></dt><dd><a name="INDEX-1225" />Returnaddress. If not specified on the command line,<em class="emphasis">perlbug</em> prompts for it.</p></dd><dt><i><em class="emphasis">-S</em></i></dt><dd><a name="INDEX-1226" />Send without asking for confirmation.</p></dd><dt><i><em class="emphasis">-s subject</em></i></dt><dd><a name="INDEX-1227" />Subject to include. If not specifiedon command line, <em class="emphasis">perlbug</em> prompts for it.</p></dd><dt><i><em class="emphasis">-t</em></i></dt><dd><a name="INDEX-1228" />Test mode.Target address defaults to <em class="email">perlbug-test@perl.com</em>.</p></dd><dt><i><em class="emphasis">-v</em></i></dt><dd><a name="INDEX-1229" />Verbose.Includes verbose configuration data in report.<a name="INDEX-1230" /><a name="INDEX-1231" /><a name="INDEX-1232" /><a name="INDEX-1233" /><a name="INDEX-1234" /><a name="INDEX-1235" /></p></dd></dl><hr width="684" align="left" /><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch06_05.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228"><a href="index.htm"><img src="../gifs/txthome.gif" alt="Home" border="0" /></a></td><td align="right" valign="top" width="228"><a href="part3.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr><tr><td align="left" valign="top" width="228">6.5. The Perl Profiler</td><td align="center" valign="top" width="228"><a href="index/index.htm"><img src="../gifs/index.gif" alt="Book Index" border="0" /></a></td><td align="right" valign="top" width="228">III. Modules</td></tr></table></div><hr width="684" align="left" /><img src="../gifs/navbar.gif" usemap="#library-map" border="0" alt="Library Navigation Links" /><p><p><font size="-1"><a href="copyrght.htm">Copyright © 2002</a> O'Reilly & Associates. All rights reserved.</font></p><map name="library-map"><area shape="rect" coords="1,0,85,94" href="../index.htm"><area shape="rect" coords="86,1,178,103" href="../lwp/index.htm"><area shape="rect" coords="180,0,265,103" href="../lperl/index.htm"><area shape="rect" coords="267,0,353,105" href="../perlnut/index.htm"><area shape="rect" coords="354,1,446,115" href="../prog/index.htm"><area shape="rect" coords="448,0,526,132" href="../tk/index.htm"><area shape="rect" coords="528,1,615,119" href="../cookbook/index.htm"><area shape="rect" coords="617,0,690,135" href="../pxml/index.htm"></map></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -