Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

stripped trailing spaces and inserted missing EOL newlines

  • Loading branch information...
commit d9b1b931fb28fbabf80ac7fe036b21835c442144 1 parent af5d92f
Christian Walde wchristian authored
4 Changes
@@ -44,7 +44,7 @@
44 44 * Update "How to contribute to the perlfaq"
45 45
46 46 5.01500301 Mon, 29 Aug 2011 11:08:17 +0200
47   - * Cause the 'perlfaq' package to be indexed by PAUSE so we can make use
  47 + * Cause the 'perlfaq' package to be indexed by PAUSE so we can make use
48 48 of its permission system.
49 49
50 50 5.015003 Fri, 26 Aug 2011 14:37:47 +0200
@@ -55,7 +55,7 @@
55 55 * Add a note on searching perlfaq (Matthew Horsfall).
56 56
57 57 5.015000 Fri, 08 Jul 2011 11:37:58 +0200
58   - * First stand-alone release to CPAN. This release is identical to
  58 + * First stand-alone release to CPAN. This release is identical to
59 59 the version of perlfaq included with the perl code as of 5.15.0.
60 60
61 61 -----
2  MANIFEST.SKIP
... ... @@ -1,3 +1,3 @@
1 1 bin/create_question_list.pl
2 2 dist.ini
3   -perlfaq.tt
  3 +perlfaq.tt
3  dist.ini
@@ -7,6 +7,7 @@ author = brian d foy <bdfoy@cpan.org>
7 7 author = Leo Lapworth <LLAP@cpan.org>
8 8 author = perlfaq-workers <perlfaq-workers@perl.org>
9 9 author = The Perl 5 Porters <perl5-porters@perl.org>
  10 +author = Christian Walde <walde.christian@googlemail.com>
10 11 license = Perl_5
11 12 copyright_holder = Tom Christiansen, Nathan Torkington, and others
12 13
@@ -38,4 +39,4 @@ run = bin/create_question_list.pl
38 39 ; authordep Template::Toolkit
39 40 ; authordep HTML::TreeBuilder
40 41 ; authordep Pod::Simple::XHTML
41   -; authordep Path::Class
  42 +; authordep Path::Class
48 lib/perlfaq1.pod
Source Rendered
@@ -10,20 +10,20 @@ about Perl.
10 10 =head2 What is Perl?
11 11
12 12 Perl is a high-level programming language with an eclectic heritage
13   -written by Larry Wall and a cast of thousands.
  13 +written by Larry Wall and a cast of thousands.
14 14
15 15 Perl's process, file, and text manipulation facilities make it
16 16 particularly well-suited for tasks involving quick prototyping, system
17 17 utilities, software tools, system management tasks, database access,
18 18 graphical programming, networking, and web programming.
19 19
20   -Perl derives from the ubiquitous C programming language and to a
21   -lesser extent from sed, awk, the Unix shell, and many other tools
  20 +Perl derives from the ubiquitous C programming language and to a
  21 +lesser extent from sed, awk, the Unix shell, and many other tools
22 22 and languages.
23 23
24 24 These strengths make it especially popular with web developers
25 25 and system administrators. Mathematicians, geneticists, journalists,
26   -managers and many other people also use Perl.
  26 +managers and many other people also use Perl.
27 27
28 28 =head2 Who supports Perl? Who develops it? Why is it free?
29 29
@@ -36,7 +36,7 @@ documentation you're reading now were all written by volunteers.
36 36 The core development team (known as the Perl Porters)
37 37 are a group of highly altruistic individuals committed to
38 38 producing better software for free than you could hope to purchase for
39   -money. You may snoop on pending developments via the
  39 +money. You may snoop on pending developments via the
40 40 L<archives|http://www.nntp.perl.org/group/perl.perl5.porters/>
41 41 or read the L<faq|http://dev.perl.org/perl5/docs/p5p-faq.html>,
42 42 or you can subscribe to the mailing list by sending
@@ -133,11 +133,11 @@ support.
133 133
134 134 The current major release of Perl is Perl 5, first released in
135 135 1994. It can run scripts from the previous major release, Perl 4
136   -(March 1991), but has significant differences.
  136 +(March 1991), but has significant differences.
137 137
138 138 Perl 6 is a reinvention of Perl, it is a language in the same lineage but
139   -not compatible. The two are complementary, not mutually exclusive. Perl 6 is
140   -not meant to replace Perl 5, and vice versa. See L</"What is Perl 6?"> below
  139 +not compatible. The two are complementary, not mutually exclusive. Perl 6 is
  140 +not meant to replace Perl 5, and vice versa. See L</"What is Perl 6?"> below
141 141 to find out more.
142 142
143 143 See L<perlhist> for a history of Perl revisions.
@@ -145,16 +145,16 @@ See L<perlhist> for a history of Perl revisions.
145 145 =head2 What is Perl 6?
146 146
147 147 Perl 6 was I<originally> described as the community's rewrite of Perl 5.
148   -Development started in 2002; syntax and design work continue to this day.
149   -As the language has evolved, it has become clear that it is a separate
150   -language, incompatible with Perl 5 but in the same language family.
151   -
152   -Contrary to popular belief, Perl 6 and Perl 5 peacefully coexist with one
153   -another. Perl 6 has proven to be a fascinating source of ideas for those
154   -using Perl 5 (the L<Moose> object system is a well-known example). There is
155   -overlap in the communities, and this overlap fosters the tradition of sharing
156   -and borrowing that have been instrumental to Perl's success. The current
157   -leading implementation of Perl 6 is Rakudo, and you can learn more about
  148 +Development started in 2002; syntax and design work continue to this day.
  149 +As the language has evolved, it has become clear that it is a separate
  150 +language, incompatible with Perl 5 but in the same language family.
  151 +
  152 +Contrary to popular belief, Perl 6 and Perl 5 peacefully coexist with one
  153 +another. Perl 6 has proven to be a fascinating source of ideas for those
  154 +using Perl 5 (the L<Moose> object system is a well-known example). There is
  155 +overlap in the communities, and this overlap fosters the tradition of sharing
  156 +and borrowing that have been instrumental to Perl's success. The current
  157 +leading implementation of Perl 6 is Rakudo, and you can learn more about
158 158 it at L<http://rakudo.org>.
159 159
160 160 If you want to learn more about Perl 6, or have a desire to help in
@@ -203,13 +203,13 @@ discussed in Part 2.
203 203
204 204 =head2 How does Perl compare with other languages like Java, Python, REXX, Scheme, or Tcl?
205 205
206   -Perl can be used for almost any coding problem, even ones which require
  206 +Perl can be used for almost any coding problem, even ones which require
207 207 integrating specialist C code for extra speed. As with any tool it can
208 208 be used well or badly. Perl has many strengths, and a few weaknesses,
209   -precisely which areas are good and bad is often a personal choice.
  209 +precisely which areas are good and bad is often a personal choice.
210 210
211   -When choosing a language you should also be influenced by the
212   -L<resources|http://www.cpan.org/>, L<testing culture|http://www.cpantesters.org/>
  211 +When choosing a language you should also be influenced by the
  212 +L<resources|http://www.cpan.org/>, L<testing culture|http://www.cpantesters.org/>
213 213 and L<community|http://www.perl.org/community.html> which surrounds it.
214 214
215 215 For comparisons to a specific language it is often best to create
@@ -249,12 +249,12 @@ well), or you have an application language specifically designed for a
249 249 certain task (e.g. prolog, make).
250 250
251 251 If you find that you need to speed up a specific part of a Perl
252   -application (not something you often need) you may want to use C,
  252 +application (not something you often need) you may want to use C,
253 253 but you can access this from your Perl code with L<perlxs>.
254 254
255 255 =head2 What's the difference between "perl" and "Perl"?
256 256
257   -"Perl" is the name of the language. Only the "P" is capitalized.
  257 +"Perl" is the name of the language. Only the "P" is capitalized.
258 258 The name of the interpreter (the program which runs the Perl script)
259 259 is "perl" with a lowercase "p".
260 260
30 lib/perlfaq2.pod
Source Rendered
@@ -35,13 +35,13 @@ See L<CPAN Ports|http://www.cpan.org/ports/>
35 35
36 36 =head2 I don't have a C compiler. How can I build my own Perl interpreter?
37 37
38   -For Windows, use a binary version of Perl,
  38 +For Windows, use a binary version of Perl,
39 39 L<Strawberry Perl|http://strawberryperl.com/> and
40 40 L<ActivePerl|http://www.activestate.com/activeperl> come with a
41 41 bundled C compiler.
42 42
43   -Otherwise if you really do want to build Perl, you need to get a
44   -binary version of C<gcc> for your system first. Use a search
  43 +Otherwise if you really do want to build Perl, you need to get a
  44 +binary version of C<gcc> for your system first. Use a search
45 45 engine to find out how to do this for your operating system.
46 46
47 47 =head2 I copied the Perl binary from one machine to another, but scripts don't work.
@@ -77,14 +77,14 @@ architecture.
77 77
78 78 CPAN stands for Comprehensive Perl Archive Network, a multi-gigabyte
79 79 archive replicated on hundreds of machines all over the world. CPAN
80   -contains tens of thousands of modules and extensions, source code
81   -and documentation, designed for I<everything> from commercial
  80 +contains tens of thousands of modules and extensions, source code
  81 +and documentation, designed for I<everything> from commercial
82 82 database interfaces to keyboard/screen control and running large web sites.
83 83
84 84 You can search CPAN on L<http://metacpan.org> or
85 85 L<http://search.cpan.org/>.
86 86
87   -The master web site for CPAN is L<http://www.cpan.org/>,
  87 +The master web site for CPAN is L<http://www.cpan.org/>,
88 88 L<http://www.cpan.org/SITES.html> lists all mirrors.
89 89
90 90 See the CPAN FAQ at L<http://www.cpan.org/misc/cpan-faq.html> for answers
@@ -128,7 +128,7 @@ which maintains the web site L<http://www.perl.org/> as a general
128 128 advocacy site for the Perl language. It uses the domain to provide
129 129 general support services to the Perl community, including the hosting
130 130 of mailing lists, web sites, and other services. There are also many
131   -other sub-domains for special topics like learning Perl and jobs in Perl,
  131 +other sub-domains for special topics like learning Perl and jobs in Perl,
132 132 such as:
133 133
134 134 =over 4
@@ -143,10 +143,10 @@ such as:
143 143
144 144 =back
145 145
146   -L<Perl Mongers|http://www.pm.org/> uses the pm.org domain for services
147   -related to local Perl user groups, including the hosting of mailing lists
148   -and web sites. See the L<Perl Mongers web site|http://www.pm.org/> for more
149   -information about joining, starting, or requesting services for a
  146 +L<Perl Mongers|http://www.pm.org/> uses the pm.org domain for services
  147 +related to local Perl user groups, including the hosting of mailing lists
  148 +and web sites. See the L<Perl Mongers web site|http://www.pm.org/> for more
  149 +information about joining, starting, or requesting services for a
150 150 Perl user group.
151 151
152 152 CPAN, or the Comprehensive Perl Archive Network L<http://www.cpan.org/>,
@@ -179,7 +179,7 @@ Several unix/linux releated magazines frequently includes articles on Perl.
179 179 =head2 Which Perl blogs should I read?
180 180
181 181 L<Perl News|http://perlnews.org/> covers some of the major events in the Perl
182   -world, L<Perl Weekly|http://perlweekly.com/> is a weekly e-mail
  182 +world, L<Perl Weekly|http://perlweekly.com/> is a weekly e-mail
183 183 (and RSS feed) of hand-picked Perl articles.
184 184
185 185 L<http://blogs.perl.org/> hosts many Perl blogs, there are also
@@ -198,7 +198,7 @@ that you can grab and carefully read to your manager. It is distributed
198 198 in releases and comes in well-defined packages. There is a very large
199 199 and supportive user community and an extensive literature.
200 200
201   -If you still need commercial support
  201 +If you still need commercial support
202 202 L<ActiveState|http://www.activestate.com/activeperl> offers
203 203 this.
204 204
@@ -216,8 +216,8 @@ information about your installation to include with your message, then
216 216 sends the message to the right place.
217 217
218 218 To determine if a module came with your version of Perl, you can
219   -install and use the L<Module::CoreList> module. It has the information
220   -about the modules (with their versions) included with each release
  219 +install and use the L<Module::CoreList> module. It has the information
  220 +about the modules (with their versions) included with each release
221 221 of Perl.
222 222
223 223 Every CPAN module has a bug tracker set up in RT, L<http://rt.cpan.org>.
12 lib/perlfaq3.pod
Source Rendered
@@ -133,8 +133,8 @@ Have you read the appropriate manpages? Here's a brief index:
133 133
134 134 =item Various
135 135
136   -L<http://www.cpan.org/misc/olddoc/FMTEYEWTK.tgz>
137   -(not a man-page but still useful, a collection of various essays on
  136 +L<http://www.cpan.org/misc/olddoc/FMTEYEWTK.tgz>
  137 +(not a man-page but still useful, a collection of various essays on
138 138 Perl techniques)
139 139
140 140 =back
@@ -153,7 +153,7 @@ evaluated. You can also examine the symbol table, get stack
153 153 backtraces, check variable values, set breakpoints, and other
154 154 operations typically found in symbolic debuggers.
155 155
156   -You can also use L<Devel::REPL> which is an interactive shell for Perl,
  156 +You can also use L<Devel::REPL> which is an interactive shell for Perl,
157 157 commonly known as a REPL - Read, Evaluate, Print, Loop. It provides
158 158 various handy features.
159 159
@@ -315,8 +315,8 @@ for Perl programs.
315 315
316 316 =head2 Is there a pretty-printer (formatter) for Perl?
317 317
318   -L<Perl::Tidy> comes with a perl script L<perltidy> which indents and
319   -reformats Perl scripts to make them easier to read by trying to follow
  318 +L<Perl::Tidy> comes with a perl script L<perltidy> which indents and
  319 +reformats Perl scripts to make them easier to read by trying to follow
320 320 the rules of the L<perlstyle>. If you write Perl, or spend much time reading
321 321 Perl, you will probably find it useful.
322 322
@@ -906,7 +906,7 @@ you use. It can allow existing CGI scripts to enjoy this flexibility and
906 906 performance with minimal changes, or can be used along with modern Perl web
907 907 frameworks to make writing and deploying web services with Perl a breeze.
908 908
909   -These solutions can have far-reaching effects on your system and on the way you
  909 +These solutions can have far-reaching effects on your system and on the way you
910 910 write your CGI programs, so investigate them with care.
911 911
912 912 See also
24 lib/perlfaq4.pod
Source Rendered
@@ -340,7 +340,7 @@ the entire list. So
340 340 push(@results, some_func($i));
341 341 }
342 342
343   -or even
  343 +or even
344 344
345 345 push(@results, some_func($_)) for 5 .. 500_005;
346 346
@@ -370,15 +370,15 @@ who attempts to generate random numbers by deterministic means is, of
370 370 course, living in a state of sin."
371 371
372 372 Perl relies on the underlying system for the implementation of
373   -C<rand> and C<srand>; on some systems, the generated numbers are
374   -not random enough (especially on Windows : see
375   -L<http://www.perlmonks.org/?node_id=803632>).
  373 +C<rand> and C<srand>; on some systems, the generated numbers are
  374 +not random enough (especially on Windows : see
  375 +L<http://www.perlmonks.org/?node_id=803632>).
376 376 Several CPAN modules in the C<Math> namespace implement better
377   -pseudorandom generators; see for example
378   -L<Math::Random::MT> ("Mersenne Twister", fast), or
379   -L<Math::TrulyRandom> (uses the imperfections in the system's
  377 +pseudorandom generators; see for example
  378 +L<Math::Random::MT> ("Mersenne Twister", fast), or
  379 +L<Math::TrulyRandom> (uses the imperfections in the system's
380 380 timer to generate random numbers, which is rather slow).
381   -More algorithms for random numbers are described in
  381 +More algorithms for random numbers are described in
382 382 "Numerical Recipes in C" at L<http://www.nr.com/>
383 383
384 384 =head2 How do I get a random number between X and Y?
@@ -724,13 +724,13 @@ and/or balanced expressions, see the so-called
724 724 L<< (?PARNO)|perlre/C<(?PARNO)> C<(?-PARNO)> C<(?+PARNO)> C<(?R)> C<(?0)> >>
725 725 construct (available since perl 5.10).
726 726 The CPAN module L<Regexp::Common> can help to build such
727   -regular expressions (see in particular
  727 +regular expressions (see in particular
728 728 L<Regexp::Common::balanced> and L<Regexp::Common::delimited>).
729 729
730 730 More complex cases will require to write a parser, probably
731 731 using a parsing module from CPAN, like
732   -L<Regexp::Grammars>, L<Parse::RecDescent>, L<Parse::Yapp>,
733   -L<Text::Balanced>, or L<Marpa::XS>.
  732 +L<Regexp::Grammars>, L<Parse::RecDescent>, L<Parse::Yapp>,
  733 +L<Text::Balanced>, or L<Marpa::XS>.
734 734
735 735 =head2 How do I reverse a string?
736 736
@@ -2531,7 +2531,7 @@ L<Data::Diver> does for you:
2531 2531 =head2 How can I prevent addition of unwanted keys into a hash?
2532 2532
2533 2533 Since version 5.8.0, hashes can be I<restricted> to a fixed number
2534   -of given keys. Methods for creating and dealing with restricted hashes
  2534 +of given keys. Methods for creating and dealing with restricted hashes
2535 2535 are exported by the L<Hash::Util> module.
2536 2536
2537 2537 =head1 Data: Misc
28 lib/perlfaq9.pod
Source Rendered
@@ -9,14 +9,14 @@ sending and receiving email as well as general networking.
9 9
10 10 =head2 Should I use a web framework?
11 11
12   -Yes. If you are building a web site with any level of interactivity
  12 +Yes. If you are building a web site with any level of interactivity
13 13 (forms / users / databases), you
14 14 will want to use a framework to make handling requests
15 15 and responses easier.
16 16
17 17 If there is no interactivity then you may still want
18 18 to look at using something like L<Template Toolkit|https://metacpan.org/module/Template>
19   -or L<Plack::Middleware::TemplateToolkit>
  19 +or L<Plack::Middleware::TemplateToolkit>
20 20 so maintenance of your HTML files (and other assets) is easier.
21 21
22 22 =head2 Which web framework should I use?
@@ -51,28 +51,28 @@ the others.
51 51 =head2 What is Plack and PSGI?
52 52
53 53 L<PSGI> is the Perl Web Server Gateway Interface Specification, it is
54   -a standard that many Perl web frameworks use, you should not need to
  54 +a standard that many Perl web frameworks use, you should not need to
55 55 understand it to build a web site, the part you might want to use is L<Plack>.
56 56
57   -L<Plack> is a set of tools for using the PSGI stack. It contains
58   -L<middleware|https://metacpan.org/search?q=plack%3A%3Amiddleware>
59   -components, a reference server and utilities for Web application frameworks.
  57 +L<Plack> is a set of tools for using the PSGI stack. It contains
  58 +L<middleware|https://metacpan.org/search?q=plack%3A%3Amiddleware>
  59 +components, a reference server and utilities for Web application frameworks.
60 60 Plack is like Ruby's Rack or Python's Paste for WSGI.
61 61
62 62 You could build a web site using L<Plack> and your own code,
63   -but for anything other than a very basic web site, using a web framework
  63 +but for anything other than a very basic web site, using a web framework
64 64 (that uses L<Plack>) is a better option.
65 65
66 66 =head2 How do I remove HTML from a string?
67 67
68   -Use L<HTML::Strip>, or L<HTML::FormatText> which not only removes HTML
69   -but also attempts to do a little simple formatting of the resulting
  68 +Use L<HTML::Strip>, or L<HTML::FormatText> which not only removes HTML
  69 +but also attempts to do a little simple formatting of the resulting
70 70 plain text.
71 71
72 72 =head2 How do I extract URLs?
73 73
74   -L<HTML::SimpleLinkExtor> will extract URLs from HTML, it handles anchors,
75   -images, objects, frames, and many other tags that can contain a URL.
  74 +L<HTML::SimpleLinkExtor> will extract URLs from HTML, it handles anchors,
  75 +images, objects, frames, and many other tags that can contain a URL.
76 76 If you need anything more complex, you can create your own subclass of
77 77 L<HTML::LinkExtor> or L<HTML::Parser>. You might even use
78 78 L<HTML::SimpleLinkExtor> as an example for something specifically
@@ -136,7 +136,7 @@ Most of the time you should not need to do this as
136 136 your web framework, or if you are making a request,
137 137 the L<LWP> or other module would handle it for you.
138 138
139   -To encode a string yourself, use the L<URI::Escape> module. The C<uri_escape>
  139 +To encode a string yourself, use the L<URI::Escape> module. The C<uri_escape>
140 140 function returns the escaped string:
141 141
142 142 my $original = "Colon : Hash # Percent %";
@@ -161,7 +161,7 @@ using the L<Catalyst> framework it would be:
161 161
162 162 $c->res->redirect($url);
163 163 $c->detach();
164   -
  164 +
165 165 If you are using Plack (which most frameworks do), then
166 166 L<Plack::Middleware::Rewrite> is worth looking at if you
167 167 are migrating from Apache or have URL's you want to always
@@ -310,7 +310,7 @@ uses SSL and can authenticate to the server via SASL.
310 310
311 311 This is like the SMTP transport, but uses TLS security. You can
312 312 authenticate with this module as well, using any mechanisms your server
313   -supports after STARTTLS.
  313 +supports after STARTTLS.
314 314
315 315 =back
316 316
6 lib/perlglossary.pod
Source Rendered
@@ -3390,9 +3390,9 @@ in the three-argument form of L<open|perlfunc/open>.
3390 3390
3391 3391 =item XS
3392 3392
3393   -A language to extend Perl with L<C> and C++. XS is an interface description
3394   -file format used to create an extension interface between
3395   -Perl and C code (or a C library) which one wishes to use with Perl.
  3393 +A language to extend Perl with L<C> and C++. XS is an interface description
  3394 +file format used to create an extension interface between
  3395 +Perl and C code (or a C library) which one wishes to use with Perl.
3396 3396 See L<perlxs> for the exact explanation or read the L<perlxstut>
3397 3397 tutorial.
3398 3398
4 perlfaq.tt
@@ -32,7 +32,7 @@ your suggestion create an issue or pull request against
32 32 L<https://github.com/perl-doc-cats/perlfaq>.
33 33
34 34 Once approved, changes are merged into L<https://github.com/tpf/perlfaq>, the
35   -repository which drives L<http://learn.perl.org/faq/>, and they are
  35 +repository which drives L<http://learn.perl.org/faq/>, and they are
36 36 distributed with the next Perl 5 release.
37 37
38 38 =head2 What if my question isn't answered in the FAQ?
@@ -71,7 +71,7 @@ Try the resources in L<perlfaq2>.
71 71
72 72 Tom Christiansen wrote the original perlfaq then expanded it with the
73 73 help of Nat Torkington. brian d foy substantialy edited and expanded
74   -the perlfaq. perlfaq-workers and others have also supplied feedback,
  74 +the perlfaq. perlfaq-workers and others have also supplied feedback,
75 75 patches and corrections over the years.
76 76
77 77 =head1 AUTHOR AND COPYRIGHT

0 comments on commit d9b1b93

Please sign in to comment.
Something went wrong with that request. Please try again.