home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / zkuste / Perl / ActivePerl-5.6.0.613.msi / 䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥 / _07981c78d24db8cd0ac0a72b5c334411 < prev    next >
Text File  |  2000-03-23  |  6KB  |  154 lines

  1.  
  2. <HTML>
  3. <HEAD>
  4. <TITLE>B::Lint - Perl lint</TITLE>
  5. <LINK REL="stylesheet" HREF="../../Active.css" TYPE="text/css">
  6. <LINK REV="made" HREF="mailto:">
  7. </HEAD>
  8.  
  9. <BODY>
  10. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  11. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  12. <STRONG><P CLASS=block> B::Lint - Perl lint</P></STRONG>
  13. </TD></TR>
  14. </TABLE>
  15.  
  16. <A NAME="__index__"></A>
  17. <!-- INDEX BEGIN -->
  18.  
  19. <UL>
  20.  
  21.     <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
  22.  
  23.     <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
  24.     <LI><A HREF="#description">DESCRIPTION</A></LI>
  25.     <LI><A HREF="#options and lint checks">OPTIONS AND LINT CHECKS</A></LI>
  26.     <LI><A HREF="#non lintcheck options">NON LINT-CHECK OPTIONS</A></LI>
  27.     <LI><A HREF="#bugs">BUGS</A></LI>
  28.     <LI><A HREF="#author">AUTHOR</A></LI>
  29. </UL>
  30. <!-- INDEX END -->
  31.  
  32. <HR>
  33. <P>
  34. <H1><A NAME="name">NAME</A></H1>
  35. <P>B::Lint - Perl lint</P>
  36. <P>
  37. <HR>
  38. <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
  39. <UL>
  40. <LI>Linux</LI>
  41. <LI>Solaris</LI>
  42. <LI>Windows</LI>
  43. </UL>
  44. <HR>
  45. <H1><A NAME="synopsis">SYNOPSIS</A></H1>
  46. <P>perl -MO=Lint[,OPTIONS] foo.pl</P>
  47. <P>
  48. <HR>
  49. <H1><A NAME="description">DESCRIPTION</A></H1>
  50. <P>The B::Lint module is equivalent to an extended version of the <STRONG>-w</STRONG>
  51. option of <STRONG>perl</STRONG>. It is named after the program <STRONG>lint</STRONG> which carries
  52. out a similar process for C programs.</P>
  53. <P>
  54. <HR>
  55. <H1><A NAME="options and lint checks">OPTIONS AND LINT CHECKS</A></H1>
  56. <P>Option words are separated by commas (not whitespace) and follow the
  57. usual conventions of compiler backend options. Following any options
  58. (indicated by a leading <STRONG>-</STRONG>) come lint check arguments. Each such
  59. argument (apart from the special <STRONG>all</STRONG> and <STRONG>none</STRONG> options) is a
  60. word representing one possible lint check (turning on that check) or
  61. is <STRONG>no-foo</STRONG> (turning off that check). Before processing the check
  62. arguments, a standard list of checks is turned on. Later options
  63. override earlier ones. Available options are:</P>
  64. <DL>
  65. <DT><STRONG><A NAME="item_context"><STRONG>context</STRONG></A></STRONG><BR>
  66. <DD>
  67. Produces a warning whenever an array is used in an implicit scalar
  68. context. For example, both of the lines
  69. <PRE>
  70.     $foo = length(@bar);
  71.     $foo = @bar;
  72. will elicit a warning. Using an explicit B<scalar()> silences the
  73. warning. For example,</PRE>
  74. <PRE>
  75.     $foo = scalar(@bar);</PRE>
  76. <P></P>
  77. <DT><STRONG><A NAME="item_implicit%2Dread_and_implicit%2Dwrite"><STRONG>implicit-read</STRONG> and <STRONG>implicit-write</STRONG></A></STRONG><BR>
  78. <DD>
  79. These options produce a warning whenever an operation implicitly
  80. reads or (respectively) writes to one of Perl's special variables.
  81. For example, <STRONG>implicit-read</STRONG> will warn about these:
  82. <PRE>
  83.     /foo/;</PRE>
  84. <P>and <STRONG>implicit-write</STRONG> will warn about these:</P>
  85. <PRE>
  86.     s/foo/bar/;</PRE>
  87. <P>Both <STRONG>implicit-read</STRONG> and <STRONG>implicit-write</STRONG> warn about this:</P>
  88. <PRE>
  89.     for (@a) { ... }</PRE>
  90. <P></P>
  91. <DT><STRONG><A NAME="item_dollar%2Dunderscore"><STRONG>dollar-underscore</STRONG></A></STRONG><BR>
  92. <DD>
  93. This option warns whenever $_ is used either explicitly anywhere or
  94. as the implicit argument of a <STRONG>print</STRONG> statement.
  95. <P></P>
  96. <DT><STRONG><A NAME="item_private%2Dnames"><STRONG>private-names</STRONG></A></STRONG><BR>
  97. <DD>
  98. This option warns on each use of any variable, subroutine or
  99. method name that lives in a non-current package but begins with
  100. an underscore (``_''). Warnings aren't issued for the special case
  101. of the single character name ``_'' by itself (e.g. $_ and @_).
  102. <P></P>
  103. <DT><STRONG><A NAME="item_undefined%2Dsubs"><STRONG>undefined-subs</STRONG></A></STRONG><BR>
  104. <DD>
  105. This option warns whenever an undefined subroutine is invoked.
  106. This option will only catch explicitly invoked subroutines such
  107. as <CODE>foo()</CODE> and not indirect invocations such as <CODE>&$subref()</CODE>
  108. or <CODE>$obj->meth()</CODE>. Note that some programs or modules delay
  109. definition of subs until runtime by means of the AUTOLOAD
  110. mechanism.
  111. <P></P>
  112. <DT><STRONG><A NAME="item_regexp%2Dvariables"><STRONG>regexp-variables</STRONG></A></STRONG><BR>
  113. <DD>
  114. This option warns whenever one of the regexp variables $', $& or
  115. $' is used. Any occurrence of any of these variables in your
  116. program can slow your whole program down. See <A HREF="../../lib/Pod/perlre.html">the perlre manpage</A> for
  117. details.
  118. <P></P>
  119. <DT><STRONG><A NAME="item_all"><STRONG>all</STRONG></A></STRONG><BR>
  120. <DD>
  121. Turn all warnings on.
  122. <P></P>
  123. <DT><STRONG><A NAME="item_none"><STRONG>none</STRONG></A></STRONG><BR>
  124. <DD>
  125. Turn all warnings off.
  126. <P></P></DL>
  127. <P>
  128. <HR>
  129. <H1><A NAME="non lintcheck options">NON LINT-CHECK OPTIONS</A></H1>
  130. <DL>
  131. <DT><STRONG><A NAME="item_%2Du_Package"><STRONG>-u Package</STRONG></A></STRONG><BR>
  132. <DD>
  133. Normally, Lint only checks the main code of the program together
  134. with all subs defined in package main. The <STRONG>-u</STRONG> option lets you
  135. include other package names whose subs are then checked by Lint.
  136. <P></P></DL>
  137. <P>
  138. <HR>
  139. <H1><A NAME="bugs">BUGS</A></H1>
  140. <P>This is only a very preliminary version.</P>
  141. <P>
  142. <HR>
  143. <H1><A NAME="author">AUTHOR</A></H1>
  144. <P>Malcolm Beattie, <A HREF="mailto:mbeattie@sable.ox.ac.uk.">mbeattie@sable.ox.ac.uk.</A></P>
  145. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  146. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  147. <STRONG><P CLASS=block> B::Lint - Perl lint</P></STRONG>
  148. </TD></TR>
  149. </TABLE>
  150.  
  151. </BODY>
  152.  
  153. </HTML>
  154.