⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch08_19.htm

📁 by Randal L. Schwartz and Tom Phoenix ISBN 0-596-00132-0 Third Edition, published July 2001. (See
💻 HTM
字号:
<html><head><title>B::Lint (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 &amp; 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="ch08_18.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="ch08_20.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr></table></div><h2 class="sect1">8.19. B::Lint</h2><p><a name="INDEX-1296" />Provides program checking for Perlprograms. Equivalent to running Perl with the <em class="emphasis">-w</em>option. Named after the Unix <em class="emphasis">lint</em> program forchecking C programs. Invoked as:</p><blockquote><pre class="code">perl -MO=Lint[,<em class="replaceable"><tt>options</em>] <em class="replaceable">program</tt></em></pre></blockquote><p><em class="replaceable"><tt>program</tt></em> is the name of the Perl programthat will be checked. The options are separated by commas and follownormal backend option conventions. Most of the options are<em class="emphasis">lint</em>-check options, in which each option is aword specifying one <em class="emphasis">lint</em> check. Preceding anoption with <tt class="literal">no-</tt> turns off that option. Optionsspecified later override earlier options. There is also onenon-lint-check option, <em class="emphasis">-u</em>. Here is the list ofavailable options:</p><dl><dt><i><em class="emphasis">all</em></i></dt><dd>Turns all warnings on.</p></dd><dt><i><em class="emphasis">context</em></i></dt><dd>Warns whenever an array is used in implicit scalar context.</p></dd><dt><i><em class="emphasis">dollar-underscore</em></i></dt><dd>Warns whenever <tt class="literal">$_</tt> is explicitly used anywhere orwhenever it is used as the implicit argument of a<tt class="literal">print</tt> statement.</p></dd><dt><i><em class="emphasis">implicit-read</em></i></dt><dd>Warns whenever an operation implicitly reads a Perl special variable.</p></dd><dt><i><em class="emphasis">implicit-write</em></i></dt><dd>Warns whenever an operation implicitly writes to a Perl specialvariable.</p></dd><dt><i><em class="emphasis">none</em></i></dt><dd>Turns off all warnings.</p></dd><dt><i><em class="emphasis">private-names</em></i></dt><dd>Warns whenever any variable, subroutine, or method name lives in anon-current package but begins with an underscore ( <tt class="literal">_</tt>). Doesn't warn about an underscore as asingle-character name, e.g., <tt class="literal">$_</tt>.</p></dd><dt><i><em class="emphasis">regexp-variables</em></i></dt><dd>Warns whenever one of the regular expression variables<tt class="literal">$'</tt>, <tt class="literal">$&amp;</tt>, or<tt class="literal">$'</tt> is used.</p></dd><dt><i><em class="emphasis">-u Package</em></i></dt><dd>Normally checks only the main program code and all subroutinesdefined in package <tt class="literal">main</tt>. <em class="emphasis">-u</em>lets you specify other packages to be checked.</p></dd><dt><i><em class="emphasis">undefined-subs</em></i></dt><dd>Warns whenever an undefined subroutine is invoked.</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="ch08_18.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="ch08_20.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr><tr><td align="left" valign="top" width="228">8.18. B::Disassembler</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">8.20. B::Showlex</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 &copy; 2002</a> O'Reilly &amp; 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 + -