Shlomi Fish  committed 30fd8f6

Add the select(FILEHANDLE) item.

  • Participants
  • Parent commits 362d4ba
  • Branches default

Comments (0)

Files changed (2)

File lib/sgml/shlomif-docbook/xsl-5-stylesheets/shlomif-db5-xhtml-mydocbook.xsl

 <xsl:template match="d:article" priority="1">
     <xsl:call-template name="id.warning"/>
-    <xsl:element name="{$div.element}" namespace="">
+    <div>
         <xsl:call-template name="common.html.attributes">
             <xsl:with-param name="inherit" select="1"/>
-        <xsl:call-template name="id.attribute">
-            <xsl:with-param name="conditional" select="0"/>
-        </xsl:call-template>
+        <xsl:if test="$ != 0">
+            <xsl:attribute name="id">
+                <xsl:call-template name=""/>
+            </xsl:attribute>
+        </xsl:if>
         <xsl:call-template name="article.titlepage"/>
         <xsl:apply-templates select="*[not(@role = 'introduction')]"/>
         <xsl:call-template name="process.footnotes"/>
-    </xsl:element>
+    </div>

File src/tutorials/bad-elements/perl-elements-to-avoid.xml-grammar-vered.xml

+<item xml:id="select_filehandle">
+<title>Using select($file_handle)</title>
+One should not use <pdoc_f f="select" />’s <code>select($file_handle)</code>
+syntax to set the “currently selected filehandle” because this will affect
+all subsequent uses by such functions as <pdoc_f f="print" /> and is a
+sure-fire way to confuse the maintenance programmer. Instead, use
+<cpan_self_mod m="IO::Handle" /> and its methods. For example:
+<bad_code syntax="perl">
+my $old_fh = select(STDERR);
+$| = 1; # Set -&gt;autoflush()
+should be instead written as:
+<code_blk syntax="perl">
+use IO::Handle;
+The second syntax of <code>select()</code> which tries to see which file
+handles or sockets are active is of more valid use, but note that for a
+simple delay, one should use <cpan_self_mod m="Time::HiRes" /> and otherwise,
+there are some more efficient platform-specific methods to do that such as
+<cpan_self_mod m="IO::Epoll" /> for Linux or kqueue for FreeBSD, which are
+abstracted by event-driven programming frameworks on CPAN.
 <item xml:id="non_recommended_regex_vars">
 <title>Non-Recommended Regular Expression-related Variables</title>