Skip to content

Commit

Permalink
Update perlfaq to latest 5.0150039
Browse files Browse the repository at this point in the history
Also change header to be clear where perlfaq should be updated
  • Loading branch information
ranguard committed Feb 18, 2012
1 parent 8f31d72 commit 3563ebc
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 84 deletions.
2 changes: 1 addition & 1 deletion bin/update_faq.pl
Expand Up @@ -122,7 +122,7 @@ =head1 DESCRIPTION
# }

sub page_header {
return '[%# DO NOT EDIT THIS FILE, AUTO GENERATED FROM THE perlfaq -%]
return '[%# DO NOT EDIT THIS FILE: generated from perlfaq (https://github.com/perl-doc-cats/perlfaq) -%]
[%-
# Used to get info from htmlify to ttree
page.import({
Expand Down
15 changes: 6 additions & 9 deletions docs/learn/faq/perlfaq.html
@@ -1,4 +1,4 @@
[%# DO NOT EDIT THIS FILE, AUTO GENERATED FROM THE perlfaq -%]
[%# DO NOT EDIT THIS FILE: generated from perlfaq (https://github.com/perl-doc-cats/perlfaq) -%]
[%-
# Used to get info from htmlify to ttree
page.import({
Expand All @@ -8,7 +8,7 @@
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
perlfaq_version = 5.0150037;
perlfaq_version = 5.0150039;
-%]
<div class="pod">

Expand Down Expand Up @@ -214,9 +214,6 @@ <h2 id="perlfaq3:-Programming-Tools"><a href="perlfaq3.html">perlfaq3</a>: Progr
</li>
<li><p>Is there a pretty-printer (formatter) for Perl?</p>

</li>
<li><p>Is there a ctags for Perl?</p>

</li>
<li><p>Is there an IDE or Windows Perl Editor?</p>

Expand Down Expand Up @@ -584,9 +581,6 @@ <h2 id="perlfaq5:-Files-and-Formats"><a href="perlfaq5.html">perlfaq5</a>: Files
</li>
<li><p>Why do I sometimes get an &quot;Argument list too long&quot; when I use &lt;*&gt;?</p>

</li>
<li><p>Is there a leak/bug in glob()?</p>

</li>
<li><p>How can I open a file with a leading &quot;&gt;&quot; or trailing blanks?</p>

Expand Down Expand Up @@ -1048,6 +1042,9 @@ <h2 id="perlfaq9:-Web-Email-and-Networking"><a href="perlfaq9.html">perlfaq9</a>
</li>
<li><p>How do I decode a MIME/BASE64 string?</p>

</li>
<li><p>How do I find the user&#39;s mail address?</p>

</li>
<li><p>How do I send email?</p>

Expand Down Expand Up @@ -1079,5 +1076,5 @@ <h1 id="AUTHOR-AND-COPYRIGHT">AUTHOR AND COPYRIGHT</h1>

<p>This document is available under the same terms as Perl itself. Code examples in all the perlfaq documents are in the public domain. Use them as you see fit (and at your own risk with no warranty from anyone).</p>

<p><em>Version: 5.0150037</em></p></div>
<p><em>Version: 5.0150039</em></p></div>

6 changes: 3 additions & 3 deletions docs/learn/faq/perlfaq1.html
@@ -1,4 +1,4 @@
[%# DO NOT EDIT THIS FILE, AUTO GENERATED FROM THE perlfaq -%]
[%# DO NOT EDIT THIS FILE: generated from perlfaq (https://github.com/perl-doc-cats/perlfaq) -%]
[%-
# Used to get info from htmlify to ttree
page.import({
Expand All @@ -8,7 +8,7 @@
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
perlfaq_version = 5.0150037;
perlfaq_version = 5.0150039;
-%]
<div class="pod">

Expand Down Expand Up @@ -213,5 +213,5 @@ <h1 id="AUTHOR-AND-COPYRIGHT">AUTHOR AND COPYRIGHT</h1>

<p>Irrespective of its distribution, all code examples here are in the public domain. You are permitted and encouraged to use this code and any derivatives thereof in your own programs for fun or for profit as you see fit. A simple comment in the code giving credit to the FAQ would be courteous but is not required.</p>

<p><em>Version: 5.0150037</em></p></div>
<p><em>Version: 5.0150039</em></p></div>

6 changes: 3 additions & 3 deletions docs/learn/faq/perlfaq2.html
@@ -1,4 +1,4 @@
[%# DO NOT EDIT THIS FILE, AUTO GENERATED FROM THE perlfaq -%]
[%# DO NOT EDIT THIS FILE: generated from perlfaq (https://github.com/perl-doc-cats/perlfaq) -%]
[%-
# Used to get info from htmlify to ttree
page.import({
Expand All @@ -8,7 +8,7 @@
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
perlfaq_version = 5.0150037;
perlfaq_version = 5.0150039;
-%]
<div class="pod">

Expand Down Expand Up @@ -193,5 +193,5 @@ <h1 id="AUTHOR-AND-COPYRIGHT">AUTHOR AND COPYRIGHT</h1>

<p>Irrespective of its distribution, all code examples here are in the public domain. You are permitted and encouraged to use this code and any derivatives thereof in your own programs for fun or for profit as you see fit. A simple comment in the code giving credit to the FAQ would be courteous but is not required.</p>

<p><em>Version: 5.0150037</em></p></div>
<p><em>Version: 5.0150039</em></p></div>

19 changes: 4 additions & 15 deletions docs/learn/faq/perlfaq3.html
@@ -1,4 +1,4 @@
[%# DO NOT EDIT THIS FILE, AUTO GENERATED FROM THE perlfaq -%]
[%# DO NOT EDIT THIS FILE: generated from perlfaq (https://github.com/perl-doc-cats/perlfaq) -%]
[%-
# Used to get info from htmlify to ttree
page.import({
Expand All @@ -8,7 +8,7 @@
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
perlfaq_version = 5.0150037;
perlfaq_version = 5.0150039;
-%]
<div class="pod">

Expand All @@ -23,7 +23,6 @@
<li><a href="#How-do-I-profile-my-Perl-programs-">How do I profile my Perl programs?</a></li>
<li><a href="#How-do-I-cross-reference-my-Perl-programs-">How do I cross-reference my Perl programs?</a></li>
<li><a href="#Is-there-a-pretty-printer-formatter-for-Perl-">Is there a pretty-printer (formatter) for Perl?</a></li>
<li><a href="#Is-there-a-ctags-for-Perl-">Is there a ctags for Perl?</a></li>
<li><a href="#Is-there-an-IDE-or-Windows-Perl-Editor-">Is there an IDE or Windows Perl Editor?</a></li>
<li><a href="#Where-can-I-get-Perl-macros-for-vi-">Where can I get Perl macros for vi?</a></li>
<li><a href="#Where-can-I-get-perl-mode-or-cperl-mode-for-emacs-">Where can I get perl-mode or cperl-mode for emacs? </a></li>
Expand Down Expand Up @@ -393,16 +392,6 @@ <h2 id="Is-there-a-pretty-printer-formatter-for-Perl-">Is there a pretty-printer

<p>Put that in your <i>.exrc</i> file (replacing the caret characters with control characters) and away you go. In insert mode, ^T is for indenting, ^D is for undenting, and ^O is for blockdenting--as it were. A more complete example, with comments, can be found at <a href="http://www.cpan.org/authors/id/TOMC/scripts/toms.exrc.gz">http://www.cpan.org/authors/id/TOMC/scripts/toms.exrc.gz</a></p>

<h2 id="Is-there-a-ctags-for-Perl-">Is there a ctags for Perl?</h2>

<p>(contributed by brian d foy)</p>

<p>Ctags uses an index to quickly find things in source code, and many popular editors support ctags for several different languages, including Perl.</p>

<p>Exuberant ctags supports Perl: <a href="http://ctags.sourceforge.net/">http://ctags.sourceforge.net/</a></p>

<p>You might also try pltags: <a href="http://www.mscha.com/pltags.zip">http://www.mscha.com/pltags.zip</a></p>

<h2 id="Is-there-an-IDE-or-Windows-Perl-Editor-">Is there an IDE or Windows Perl Editor?</h2>

<p>Perl programs are just plain text, so any editor will do.</p>
Expand Down Expand Up @@ -464,7 +453,7 @@ <h2 id="Is-there-an-IDE-or-Windows-Perl-Editor-">Is there an IDE or Windows Perl

<p><a href="http://padre.perlide.org/">http://padre.perlide.org/</a></p>

<p>Padre is cross-platform IDE for Perl written in Perl using wxWidgets to provide a native look and feel. It&#39;s open source under the Artistic License.</p>
<p>Padre is cross-platform IDE for Perl written in Perl using wxWidgets to provide a native look and feel. It&#39;s open source under the Artistic License. It is one of the newer Perl IDEs.</p>

</dd>
<dt>PerlBuilder</dt>
Expand Down Expand Up @@ -1017,5 +1006,5 @@ <h1 id="AUTHOR-AND-COPYRIGHT">AUTHOR AND COPYRIGHT</h1>

<p>Irrespective of its distribution, all code examples here are in the public domain. You are permitted and encouraged to use this code and any derivatives thereof in your own programs for fun or for profit as you see fit. A simple comment in the code giving credit to the FAQ would be courteous but is not required.</p>

<p><em>Version: 5.0150037</em></p></div>
<p><em>Version: 5.0150039</em></p></div>

8 changes: 4 additions & 4 deletions docs/learn/faq/perlfaq4.html
@@ -1,4 +1,4 @@
[%# DO NOT EDIT THIS FILE, AUTO GENERATED FROM THE perlfaq -%]
[%# DO NOT EDIT THIS FILE: generated from perlfaq (https://github.com/perl-doc-cats/perlfaq) -%]
[%-
# Used to get info from htmlify to ttree
page.import({
Expand All @@ -8,7 +8,7 @@
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
perlfaq_version = 5.0150037;
perlfaq_version = 5.0150039;
-%]
<div class="pod">

Expand Down Expand Up @@ -674,7 +674,7 @@ <h2 id="How-do-I-find-matching-nesting-anything-">How do I find matching/nesting

<p>To find something between two single characters, a pattern like <code>/x([^x]*)x/</code> will get the intervening bits in $1. For multiple ones, then something more like <code>/alpha(.*?)omega/</code> would be needed. For nested patterns and/or balanced expressions, see the so-called <a href="https://metacpan.org/module/perlre#PARNO--PARNO-PARNO-R-0-">(?PARNO)</a> construct (available since perl 5.10). The CPAN module <a href="https://metacpan.org/module/Regexp::Common">Regexp::Common</a> can help to build such regular expressions (see in particular <a href="https://metacpan.org/module/Regexp::Common::balanced">Regexp::Common::balanced</a> and <a href="https://metacpan.org/module/Regexp::Common::delimited">Regexp::Common::delimited</a>).</p>

<p>More complex cases will require to write a parser, probably using a parsing module from CPAN, like <a href="https://metacpan.org/module/Regexp::Grammars">Regexp::Grammars</a>, <a href="https://metacpan.org/module/Parse::RecDescent">Parse::RecDescent</a>, <a href="https://metacpan.org/module/Parse::Yapp">Parse::Yapp</a>, <a href="https://metacpan.org/module/Text::Balanced">Text::Balanced</a>, or <a href="https://metacpan.org/module/Marpa">Marpa</a>.</p>
<p>More complex cases will require to write a parser, probably using a parsing module from CPAN, like <a href="https://metacpan.org/module/Regexp::Grammars">Regexp::Grammars</a>, <a href="https://metacpan.org/module/Parse::RecDescent">Parse::RecDescent</a>, <a href="https://metacpan.org/module/Parse::Yapp">Parse::Yapp</a>, <a href="https://metacpan.org/module/Text::Balanced">Text::Balanced</a>, or <a href="https://metacpan.org/module/Marpa::XS">Marpa::XS</a>.</p>

<h2 id="How-do-I-reverse-a-string-">How do I reverse a string?</h2>

Expand Down Expand Up @@ -2198,5 +2198,5 @@ <h1 id="AUTHOR-AND-COPYRIGHT">AUTHOR AND COPYRIGHT</h1>

<p>Irrespective of its distribution, all code examples in this file are hereby placed into the public domain. You are permitted and encouraged to use this code in your own programs for fun or for profit as you see fit. A simple comment in the code giving credit would be courteous but is not required.</p>

<p><em>Version: 5.0150037</em></p></div>
<p><em>Version: 5.0150039</em></p></div>

19 changes: 4 additions & 15 deletions docs/learn/faq/perlfaq5.html
@@ -1,4 +1,4 @@
[%# DO NOT EDIT THIS FILE, AUTO GENERATED FROM THE perlfaq -%]
[%# DO NOT EDIT THIS FILE: generated from perlfaq (https://github.com/perl-doc-cats/perlfaq) -%]
[%-
# Used to get info from htmlify to ttree
page.import({
Expand All @@ -8,7 +8,7 @@
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
perlfaq_version = 5.0150037;
perlfaq_version = 5.0150039;
-%]
<div class="pod">

Expand All @@ -33,7 +33,6 @@
<li><a href="#How-can-I-translate-tildes-in-a-filename-">How can I translate tildes (~) in a filename? </a></li>
<li><a href="#How-come-when-I-open-a-file-read-write-it-wipes-it-out-">How come when I open a file read-write it wipes it out? </a></li>
<li><a href="#Why-do-I-sometimes-get-an-Argument-list-too-long-when-I-use-">Why do I sometimes get an &quot;Argument list too long&quot; when I use &lt;*&gt;? </a></li>
<li><a href="#Is-there-a-leak-bug-in-glob-">Is there a leak/bug in glob()? </a></li>
<li><a href="#How-can-I-open-a-file-with-a-leading-or-trailing-blanks-">How can I open a file with a leading &quot;&gt;&quot; or trailing blanks? </a></li>
<li><a href="#How-can-I-reliably-rename-a-file-">How can I reliably rename a file? </a></li>
<li><a href="#How-can-I-lock-a-file-">How can I lock a file? </a></li>
Expand Down Expand Up @@ -255,11 +254,7 @@ <h2 id="How-do-I-change-delete-or-insert-a-line-in-a-file-or-append-to-the-begin

<p>To delete lines, only print the ones that you want.</p>

<pre class="brush: pl; class-name: 'highlight'; toolbar: false; gutter: false"> perl -ni -e &#39;print unless /d/&#39; inFile.txt

... or ...

perl -pi -e &#39;next unless /d/&#39; inFile.txt</pre>
<pre class="brush: pl; class-name: 'highlight'; toolbar: false; gutter: false"> perl -ni -e &#39;print if /d/&#39; inFile.txt</pre>

<h2 id="How-do-I-count-the-number-of-lines-in-a-file-">How do I count the number of lines in a file? </h2>

Expand Down Expand Up @@ -722,12 +717,6 @@ <h2 id="Why-do-I-sometimes-get-an-Argument-list-too-long-when-I-use-">Why do I s

<p>To get around this, either upgrade to Perl v5.6.0 or later, do the glob yourself with readdir() and patterns, or use a module like <a href="https://metacpan.org/module/File::Glob">File::Glob</a>, one that doesn&#39;t use the shell to do globbing.</p>

<h2 id="Is-there-a-leak-bug-in-glob-">Is there a leak/bug in glob()? </h2>

<p>(contributed by brian d foy)</p>

<p>Starting with Perl 5.6.0, <code>glob</code> is implemented internally rather than relying on an external resource. As such, memory issues with <code>glob</code> aren&#39;t a problem in modern perls.</p>

<h2 id="How-can-I-open-a-file-with-a-leading-or-trailing-blanks-">How can I open a file with a leading &quot;&gt;&quot; or trailing blanks? </h2>

<p>(contributed by Brian McCauley)</p>
Expand Down Expand Up @@ -1240,5 +1229,5 @@ <h1 id="AUTHOR-AND-COPYRIGHT">AUTHOR AND COPYRIGHT</h1>

<p>Irrespective of its distribution, all code examples here are in the public domain. You are permitted and encouraged to use this code and any derivatives thereof in your own programs for fun or for profit as you see fit. A simple comment in the code giving credit to the FAQ would be courteous but is not required.</p>

<p><em>Version: 5.0150037</em></p></div>
<p><em>Version: 5.0150039</em></p></div>

6 changes: 3 additions & 3 deletions docs/learn/faq/perlfaq6.html
@@ -1,4 +1,4 @@
[%# DO NOT EDIT THIS FILE, AUTO GENERATED FROM THE perlfaq -%]
[%# DO NOT EDIT THIS FILE: generated from perlfaq (https://github.com/perl-doc-cats/perlfaq) -%]
[%-
# Used to get info from htmlify to ttree
page.import({
Expand All @@ -8,7 +8,7 @@
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
perlfaq_version = 5.0150037;
perlfaq_version = 5.0150039;
-%]
<div class="pod">

Expand Down Expand Up @@ -867,5 +867,5 @@ <h1 id="AUTHOR-AND-COPYRIGHT">AUTHOR AND COPYRIGHT</h1>

<p>Irrespective of its distribution, all code examples in this file are hereby placed into the public domain. You are permitted and encouraged to use this code in your own programs for fun or for profit as you see fit. A simple comment in the code giving credit would be courteous but is not required.</p>

<p><em>Version: 5.0150037</em></p></div>
<p><em>Version: 5.0150039</em></p></div>

22 changes: 9 additions & 13 deletions docs/learn/faq/perlfaq7.html
@@ -1,4 +1,4 @@
[%# DO NOT EDIT THIS FILE, AUTO GENERATED FROM THE perlfaq -%]
[%# DO NOT EDIT THIS FILE: generated from perlfaq (https://github.com/perl-doc-cats/perlfaq) -%]
[%-
# Used to get info from htmlify to ttree
page.import({
Expand All @@ -8,7 +8,7 @@
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
perlfaq_version = 5.0150037;
perlfaq_version = 5.0150039;
-%]
<div class="pod">

Expand Down Expand Up @@ -186,23 +186,19 @@ <h2 id="How-do-I-declare-create-a-structure-">How do I declare/create a structur

<h2 id="How-do-I-create-a-module-">How do I create a module?</h2>

<p>(contributed by brian d foy)</p>

<p><a href="https://metacpan.org/module/perlmod">perlmod</a>, <a href="https://metacpan.org/module/perlmodlib">perlmodlib</a>, <a href="https://metacpan.org/module/perlmodstyle">perlmodstyle</a> explain modules in all the gory details. <a href="https://metacpan.org/module/perlnewmod">perlnewmod</a> gives a brief overview of the process along with a couple of suggestions about style.</p>
<p><a href="https://metacpan.org/module/perlnewmod">perlnewmod</a> is a good place to start, ignore the bits about uploading to CPAN if you don&#39;t want to make your module publicly available.</p>

<p>If you need to include C code or C library interfaces in your module, you&#39;ll need h2xs. h2xs will create the module distribution structure and the initial interface files you&#39;ll need. <a href="https://metacpan.org/module/perlxs">perlxs</a> and <a href="https://metacpan.org/module/perlxstut">perlxstut</a> explain the details.</p>
<p><a href="https://metacpan.org/module/ExtUtils::ModuleMaker">ExtUtils::ModuleMaker</a> and <a href="https://metacpan.org/module/Module::Starter">Module::Starter</a> are also good places to start. Many CPAN authors now use <a href="https://metacpan.org/module/Dist::Zilla">Dist::Zilla</a> to automate as much as possible.</p>

<p>If you don&#39;t need to use C code, other tools such as ExtUtils::ModuleMaker and Module::Starter, can help you create a skeleton module distribution.</p>
<p>Detailed documentation about modules can be found at: <a href="https://metacpan.org/module/perlmod">perlmod</a>, <a href="https://metacpan.org/module/perlmodlib">perlmodlib</a>, <a href="https://metacpan.org/module/perlmodstyle">perlmodstyle</a>.</p>

<p>You may also want to see Sam Tregar&#39;s &quot;Writing Perl Modules for CPAN&quot; ( <a href="http://apress.com/book/bookDisplay.html?bID=14">http://apress.com/book/bookDisplay.html?bID=14</a> ) which is the best hands-on guide to creating module distributions.</p>
<p>If you need to include C code or C library interfaces use h2xs. h2xs will create the module distribution structure and the initial interface files. <a href="https://metacpan.org/module/perlxs">perlxs</a> and <a href="https://metacpan.org/module/perlxstut">perlxstut</a> explain the details.</p>

<h2 id="How-do-I-adopt-or-take-over-a-module-already-on-CPAN-">How do I adopt or take over a module already on CPAN?</h2>

<p>(contributed by brian d foy)</p>

<p>The easiest way to take over a module is to have the current module maintainer either make you a co-maintainer or transfer the module to you.</p>
<p>Ask the current maintainer to make you a co-maintainer or transfer the module to you.</p>

<p>If you can&#39;t reach the author for some reason (e.g. email bounces), the PAUSE admins at modules@perl.org can help. The PAUSE admins treat each case individually.</p>
<p>If you can not reach the author for some reason contact the PAUSE admins at modules@perl.org who may be able to help, but each case it treated seperatly.</p>

<ul>

Expand Down Expand Up @@ -819,5 +815,5 @@ <h1 id="AUTHOR-AND-COPYRIGHT">AUTHOR AND COPYRIGHT</h1>

<p>Irrespective of its distribution, all code examples in this file are hereby placed into the public domain. You are permitted and encouraged to use this code in your own programs for fun or for profit as you see fit. A simple comment in the code giving credit would be courteous but is not required.</p>

<p><em>Version: 5.0150037</em></p></div>
<p><em>Version: 5.0150039</em></p></div>

0 comments on commit 3563ebc

Please sign in to comment.