Skip to content

Commit

Permalink
update perlfaq to 5.021010
Browse files Browse the repository at this point in the history
  • Loading branch information
ranguard committed Jul 28, 2015
1 parent 1cc885c commit 6615d75
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 52 deletions.
15 changes: 7 additions & 8 deletions bin/update_faq.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/perl

=head1 NAME
=head1 NAME
update_faq.pl - Converts Pod to HTML for the /faq/ section
Expand Down Expand Up @@ -128,7 +128,7 @@ sub page_header {
page.import({
title => "--page_name--",
section => "faq",
description
description
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
Expand All @@ -151,24 +151,24 @@ sub fetch_latest_perlfaq {
$local_name =~ s/\.tar\.gz$//;
$local_version = $local_name;
$local_version =~ s/^perlfaq-//;

copy( $zip->stringify, $tmp_file);

} else {
my $json = JSON->new();

my $latest_meta_source = get('http://api.metacpan.org/release/perlfaq');
my $latest_meta = $json->decode($latest_meta_source);
my $download_url = $latest_meta->{download_url};

warn $download_url;
mirror( $download_url, $tmp_file );

# Back to previous dir please
$local_name = $latest_meta->{name};
$local_version = $latest_meta->{version};

}

my $cwd = getcwd();
chdir '/tmp/';
system('tar -xzf perlfaq.tar.gz');
Expand All @@ -178,4 +178,3 @@ sub fetch_latest_perlfaq {


}

2 changes: 0 additions & 2 deletions dist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,5 @@ Template::Plugin::Date = 0
Template::Plugin::Shuffle = 0
Date::Calc = 0

File::Slurp = 0

; need SSL for rss feed
IO::Socket::SSL = 1.955
8 changes: 4 additions & 4 deletions docs/learn/faq/perlfaq.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
page.import({
title => "perlfaq",
section => "faq",
description
description
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
perlfaq_version = 5.021009;
perlfaq_version = 5.021010;
-%]
<div class="pod">

Expand All @@ -18,7 +18,7 @@ <h1 id="NAME">NAME</h1>

<h1 id="VERSION">VERSION</h1>

<p>version 5.021009</p>
<p>version 5.021010</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

Expand Down Expand Up @@ -1089,5 +1089,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.021009</em></p></div>
<p><em>Version: 5.021010</em></p></div>

8 changes: 4 additions & 4 deletions docs/learn/faq/perlfaq1.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
page.import({
title => "perlfaq1",
section => "faq",
description
description
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
perlfaq_version = 5.021009;
perlfaq_version = 5.021010;
-%]
<div class="pod">

Expand Down Expand Up @@ -42,7 +42,7 @@ <h1 id="NAME">NAME</h1>

<h1 id="VERSION">VERSION</h1>

<p>version 5.021009</p>
<p>version 5.021010</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

Expand Down Expand Up @@ -227,5 +227,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.021009</em></p></div>
<p><em>Version: 5.021010</em></p></div>

8 changes: 4 additions & 4 deletions docs/learn/faq/perlfaq2.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
page.import({
title => "perlfaq2",
section => "faq",
description
description
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
perlfaq_version = 5.021009;
perlfaq_version = 5.021010;
-%]
<div class="pod">

Expand Down Expand Up @@ -43,7 +43,7 @@ <h1 id="NAME">NAME</h1>

<h1 id="VERSION">VERSION</h1>

<p>version 5.021009</p>
<p>version 5.021010</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

Expand Down Expand Up @@ -198,5 +198,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.021009</em></p></div>
<p><em>Version: 5.021010</em></p></div>

8 changes: 4 additions & 4 deletions docs/learn/faq/perlfaq3.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
page.import({
title => "perlfaq3",
section => "faq",
description
description
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
perlfaq_version = 5.021009;
perlfaq_version = 5.021010;
-%]
<div class="pod">

Expand Down Expand Up @@ -56,7 +56,7 @@ <h1 id="NAME">NAME</h1>

<h1 id="VERSION">VERSION</h1>

<p>version 5.021009</p>
<p>version 5.021010</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

Expand Down Expand Up @@ -985,5 +985,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.021009</em></p></div>
<p><em>Version: 5.021010</em></p></div>

10 changes: 5 additions & 5 deletions docs/learn/faq/perlfaq4.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
page.import({
title => "perlfaq4",
section => "faq",
description
description
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
perlfaq_version = 5.021009;
perlfaq_version = 5.021010;
-%]
<div class="pod">

Expand Down Expand Up @@ -128,7 +128,7 @@ <h1 id="NAME">NAME</h1>

<h1 id="VERSION">VERSION</h1>

<p>version 5.021009</p>
<p>version 5.021010</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

Expand Down Expand Up @@ -514,7 +514,7 @@ <h2 id="How-can-I-compare-two-dates-and-find-the-difference">How can I compare t

<p>You can also get differences with a subtraction, which returns a <a href="https://metacpan.org/module/Time::Seconds">Time::Seconds</a> object:</p>

<pre class="brush: pl; class-name: 'highlight'; toolbar: false; gutter: false"> my $diff = $date1 - $date2;
<pre class="brush: pl; class-name: 'highlight'; toolbar: false; gutter: false"> my $date_diff = $date1 - $date2;
print &quot;The difference is &quot;, $date_diff-&gt;days, &quot; days\n&quot;;</pre>

<p>If you want to work with formatted dates, the <a href="https://metacpan.org/module/Date::Manip">Date::Manip</a>, <a href="https://metacpan.org/module/Date::Calc">Date::Calc</a>, or <a href="https://metacpan.org/module/DateTime">DateTime</a> modules can help you.</p>
Expand Down Expand Up @@ -2203,5 +2203,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.021009</em></p></div>
<p><em>Version: 5.021010</em></p></div>

8 changes: 4 additions & 4 deletions docs/learn/faq/perlfaq5.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
page.import({
title => "perlfaq5",
section => "faq",
description
description
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
perlfaq_version = 5.021009;
perlfaq_version = 5.021010;
-%]
<div class="pod">

Expand Down Expand Up @@ -70,7 +70,7 @@ <h1 id="NAME">NAME</h1>

<h1 id="VERSION">VERSION</h1>

<p>version 5.021009</p>
<p>version 5.021010</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

Expand Down Expand Up @@ -1236,5 +1236,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.021009</em></p></div>
<p><em>Version: 5.021010</em></p></div>

8 changes: 4 additions & 4 deletions docs/learn/faq/perlfaq6.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
page.import({
title => "perlfaq6",
section => "faq",
description
description
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
perlfaq_version = 5.021009;
perlfaq_version = 5.021010;
-%]
<div class="pod">

Expand Down Expand Up @@ -52,7 +52,7 @@ <h1 id="NAME">NAME</h1>

<h1 id="VERSION">VERSION</h1>

<p>version 5.021009</p>
<p>version 5.021010</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

Expand Down Expand Up @@ -872,5 +872,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.021009</em></p></div>
<p><em>Version: 5.021010</em></p></div>

8 changes: 4 additions & 4 deletions docs/learn/faq/perlfaq7.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
page.import({
title => "perlfaq7",
section => "faq",
description
description
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
perlfaq_version = 5.021009;
perlfaq_version = 5.021010;
-%]
<div class="pod">

Expand Down Expand Up @@ -59,7 +59,7 @@ <h1 id="NAME">NAME</h1>

<h1 id="VERSION">VERSION</h1>

<p>version 5.021009</p>
<p>version 5.021010</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

Expand Down Expand Up @@ -846,5 +846,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.021009</em></p></div>
<p><em>Version: 5.021010</em></p></div>

10 changes: 5 additions & 5 deletions docs/learn/faq/perlfaq8.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
page.import({
title => "perlfaq8",
section => "faq",
description
description
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
perlfaq_version = 5.021009;
perlfaq_version = 5.021010;
-%]
<div class="pod">

Expand Down Expand Up @@ -79,7 +79,7 @@ <h1 id="NAME">NAME</h1>

<h1 id="VERSION">VERSION</h1>

<p>version 5.021009</p>
<p>version 5.021010</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

Expand Down Expand Up @@ -253,7 +253,7 @@ <h2 id="How-do-I-clear-the-screen">How do I clear the screen?</h2>
<pre class="brush: pl; class-name: 'highlight'; toolbar: false; gutter: false"> use Term::Cap;

my $terminal = Term::Cap-&gt;Tgetent( { OSPEED =&gt; 9600 } );
my $clear_string = $terminal-&gt;Tputs(&#39;cl&#39;);
my $clear_screen = $terminal-&gt;Tputs(&#39;cl&#39;);

print $clear_screen;</pre>

Expand Down Expand Up @@ -1152,5 +1152,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.021009</em></p></div>
<p><em>Version: 5.021010</em></p></div>

8 changes: 4 additions & 4 deletions docs/learn/faq/perlfaq9.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
page.import({
title => "perlfaq9",
section => "faq",
description
description
=> "Perl Frequently Asked Questions, Perl FAQ",
keywords => "perl, perl faq, perlfaq"
});
perlfaq_version = 5.021009;
perlfaq_version = 5.021010;
-%]
<div class="pod">

Expand Down Expand Up @@ -49,7 +49,7 @@ <h1 id="NAME">NAME</h1>

<h1 id="VERSION">VERSION</h1>

<p>version 5.021009</p>
<p>version 5.021010</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

Expand Down Expand Up @@ -369,5 +369,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.021009</em></p></div>
<p><em>Version: 5.021010</em></p></div>

0 comments on commit 6615d75

Please sign in to comment.