diff --git a/bin/update_faq.pl b/bin/update_faq.pl index 458772045..e6582643d 100755 --- a/bin/update_faq.pl +++ b/bin/update_faq.pl @@ -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({ diff --git a/docs/learn/faq/perlfaq.html b/docs/learn/faq/perlfaq.html index a9818cfc8..c0f20e8dd 100644 --- a/docs/learn/faq/perlfaq.html +++ b/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({ @@ -8,7 +8,7 @@ => "Perl Frequently Asked Questions, Perl FAQ", keywords => "perl, perl faq, perlfaq" }); - perlfaq_version = 5.0150037; + perlfaq_version = 5.0150039; -%]
Is there a pretty-printer (formatter) for Perl?
-Is there a ctags for Perl?
-Is there an IDE or Windows Perl Editor?
@@ -584,9 +581,6 @@Why do I sometimes get an "Argument list too long" when I use <*>?
-Is there a leak/bug in glob()?
-How can I open a file with a leading ">" or trailing blanks?
@@ -1048,6 +1042,9 @@How do I decode a MIME/BASE64 string?
+How do I find the user's mail address?
+How do I send email?
@@ -1079,5 +1076,5 @@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).
-Version: 5.0150037
Version: 5.0150039
diff --git a/docs/learn/faq/perlfaq1.html b/docs/learn/faq/perlfaq1.html index 87188b959..4d5e524d6 100644 --- a/docs/learn/faq/perlfaq1.html +++ b/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({ @@ -8,7 +8,7 @@ => "Perl Frequently Asked Questions, Perl FAQ", keywords => "perl, perl faq, perlfaq" }); - perlfaq_version = 5.0150037; + perlfaq_version = 5.0150039; -%]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.
-Version: 5.0150037
Version: 5.0150039
diff --git a/docs/learn/faq/perlfaq2.html b/docs/learn/faq/perlfaq2.html index fcd8c8114..a8be5b097 100644 --- a/docs/learn/faq/perlfaq2.html +++ b/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({ @@ -8,7 +8,7 @@ => "Perl Frequently Asked Questions, Perl FAQ", keywords => "perl, perl faq, perlfaq" }); - perlfaq_version = 5.0150037; + perlfaq_version = 5.0150039; -%]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.
-Version: 5.0150037
Version: 5.0150039
diff --git a/docs/learn/faq/perlfaq3.html b/docs/learn/faq/perlfaq3.html index e04189d01..1e15f1e14 100644 --- a/docs/learn/faq/perlfaq3.html +++ b/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({ @@ -8,7 +8,7 @@ => "Perl Frequently Asked Questions, Perl FAQ", keywords => "perl, perl faq, perlfaq" }); - perlfaq_version = 5.0150037; + perlfaq_version = 5.0150039; -%]Put that in your .exrc 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 http://www.cpan.org/authors/id/TOMC/scripts/toms.exrc.gz
-(contributed by brian d foy)
- -Ctags uses an index to quickly find things in source code, and many popular editors support ctags for several different languages, including Perl.
- -Exuberant ctags supports Perl: http://ctags.sourceforge.net/
- -You might also try pltags: http://www.mscha.com/pltags.zip
-Perl programs are just plain text, so any editor will do.
@@ -464,7 +453,7 @@Padre is cross-platform IDE for Perl written in Perl using wxWidgets to provide a native look and feel. It's open source under the Artistic License.
+Padre is cross-platform IDE for Perl written in Perl using wxWidgets to provide a native look and feel. It's open source under the Artistic License. It is one of the newer Perl IDEs.
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.
-Version: 5.0150037
Version: 5.0150039
diff --git a/docs/learn/faq/perlfaq4.html b/docs/learn/faq/perlfaq4.html index 1204b1563..dcacb2f38 100644 --- a/docs/learn/faq/perlfaq4.html +++ b/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({ @@ -8,7 +8,7 @@ => "Perl Frequently Asked Questions, Perl FAQ", keywords => "perl, perl faq, perlfaq" }); - perlfaq_version = 5.0150037; + perlfaq_version = 5.0150039; -%]To find something between two single characters, a pattern like /x([^x]*)x/
will get the intervening bits in $1. For multiple ones, then something more like /alpha(.*?)omega/
would be needed. For nested patterns and/or balanced expressions, see the so-called (?PARNO) construct (available since perl 5.10). The CPAN module Regexp::Common can help to build such regular expressions (see in particular Regexp::Common::balanced and Regexp::Common::delimited).
More complex cases will require to write a parser, probably using a parsing module from CPAN, like Regexp::Grammars, Parse::RecDescent, Parse::Yapp, Text::Balanced, or Marpa.
+More complex cases will require to write a parser, probably using a parsing module from CPAN, like Regexp::Grammars, Parse::RecDescent, Parse::Yapp, Text::Balanced, or Marpa::XS.
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.
-Version: 5.0150037
Version: 5.0150039
diff --git a/docs/learn/faq/perlfaq5.html b/docs/learn/faq/perlfaq5.html index c2a446f79..8a8cc3ad8 100644 --- a/docs/learn/faq/perlfaq5.html +++ b/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({ @@ -8,7 +8,7 @@ => "Perl Frequently Asked Questions, Perl FAQ", keywords => "perl, perl faq, perlfaq" }); - perlfaq_version = 5.0150037; + perlfaq_version = 5.0150039; -%]perl -ni -e 'print if /d/' inFile.txt
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 File::Glob, one that doesn't use the shell to do globbing.
-(contributed by brian d foy)
- -Starting with Perl 5.6.0, glob
is implemented internally rather than relying on an external resource. As such, memory issues with glob
aren't a problem in modern perls.
(contributed by Brian McCauley)
@@ -1240,5 +1229,5 @@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.
-Version: 5.0150037
Version: 5.0150039
diff --git a/docs/learn/faq/perlfaq6.html b/docs/learn/faq/perlfaq6.html index ffb304f23..f6398a282 100644 --- a/docs/learn/faq/perlfaq6.html +++ b/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({ @@ -8,7 +8,7 @@ => "Perl Frequently Asked Questions, Perl FAQ", keywords => "perl, perl faq, perlfaq" }); - perlfaq_version = 5.0150037; + perlfaq_version = 5.0150039; -%]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.
-Version: 5.0150037
Version: 5.0150039
diff --git a/docs/learn/faq/perlfaq7.html b/docs/learn/faq/perlfaq7.html index 24b7cf18a..31e4806bb 100644 --- a/docs/learn/faq/perlfaq7.html +++ b/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({ @@ -8,7 +8,7 @@ => "Perl Frequently Asked Questions, Perl FAQ", keywords => "perl, perl faq, perlfaq" }); - perlfaq_version = 5.0150037; + perlfaq_version = 5.0150039; -%](contributed by brian d foy)
- -perlmod, perlmodlib, perlmodstyle explain modules in all the gory details. perlnewmod gives a brief overview of the process along with a couple of suggestions about style.
+perlnewmod is a good place to start, ignore the bits about uploading to CPAN if you don't want to make your module publicly available.
-If you need to include C code or C library interfaces in your module, you'll need h2xs. h2xs will create the module distribution structure and the initial interface files you'll need. perlxs and perlxstut explain the details.
+ExtUtils::ModuleMaker and Module::Starter are also good places to start. Many CPAN authors now use Dist::Zilla to automate as much as possible.
-If you don't need to use C code, other tools such as ExtUtils::ModuleMaker and Module::Starter, can help you create a skeleton module distribution.
+Detailed documentation about modules can be found at: perlmod, perlmodlib, perlmodstyle.
-You may also want to see Sam Tregar's "Writing Perl Modules for CPAN" ( http://apress.com/book/bookDisplay.html?bID=14 ) which is the best hands-on guide to creating module distributions.
+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. perlxs and perlxstut explain the details.
(contributed by brian d foy)
- -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.
+Ask the current maintainer to make you a co-maintainer or transfer the module to you.
-If you can'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.
+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.
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.
-Version: 5.0150037
Version: 5.0150039
diff --git a/docs/learn/faq/perlfaq8.html b/docs/learn/faq/perlfaq8.html index 5cae37890..933f1afd7 100644 --- a/docs/learn/faq/perlfaq8.html +++ b/docs/learn/faq/perlfaq8.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({ @@ -8,7 +8,7 @@ => "Perl Frequently Asked Questions, Perl FAQ", keywords => "perl, perl faq, perlfaq" }); - perlfaq_version = 5.0150037; + perlfaq_version = 5.0150039; -%]If all you want to do is pretend to be telnet but don't need the initial telnet handshaking, then the standard dual-process approach will suffice:
use IO::Socket; # new in 5.004 - my $handle = IO::Socket::INET->new('www.perl.com:80') - or die "can't connect to port 80 on www.perl.com: $!"; + my $handle = IO::Socket::INET->new('www.perl.com:80') + or die "can't connect to port 80 on www.perl.com $!"; $handle->autoflush(1); if (fork()) { # XXX: undef means failure select($handle); @@ -1130,5 +1130,5 @@AUTHOR AND COPYRIGHT
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.
-Version: 5.0150037
Version: 5.0150039
diff --git a/docs/learn/faq/perlfaq9.html b/docs/learn/faq/perlfaq9.html index 937583339..2d1fe9fa0 100644 --- a/docs/learn/faq/perlfaq9.html +++ b/docs/learn/faq/perlfaq9.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({ @@ -8,7 +8,7 @@ => "Perl Frequently Asked Questions, Perl FAQ", keywords => "perl, perl faq, perlfaq" }); - perlfaq_version = 5.0150037; + perlfaq_version = 5.0150039; -%]There are many Perl web frameworks, e.g. :
+There is no simple answer to this question. Perl frameworks can run everything from basic file servers and small scale intranets to massive multinational multilingual websites that are the core to international businesses.
+ +Below is a list of a few frameworks with comments which might help you in making a decision, depending on your specific requirements. Start by reading the docs, then ask questions on the relevant mailing list or IRC channel.
Strongly object-oriented and fully-featured with a long development history and a large community and addon ecosystem. It is excellent for large and complex applications, where you have full control over the server.
+Young and free of legacy weight, providing a lightweight and easy to learn API. Has a growing addon ecosystem. It is best used for smaller projects and very easy to learn for beginners.
+Fairly young with a focus on HTML5 and real-time web technologies such as WebSockets.
+Currently experimental, strongly object-oriented, built for speed and intended as a toolkit for building micro web apps, custom frameworks or for tieing together existing Plack-compatible web applications with one central dispatcher.
-These are just a few of the more widely used ones. All of them interact with or use Plack which is worth understanding the basics of, as there is a lot of useful Plack::Middleware.
+As to which one you should use, it depends on the complexity of the site you are trying to build. Review the three listed above and see which suites your needs best. Many of them share the same MVC concepts so once you understand one it is easier to understand the others.
+All of these interact with or use Plack which is worth understanding the basics of when building a website in Perl (there is a lot of useful Plack::Middleware).
Most Perl Web Frameworks will have a mechanism for doing this, using the Catalyst framework it would be:
$c->res->redirect($url); - $c->detach(); -+ $c->detach();
If you are using Plack (which most frameworks do), then Plack::Middleware::Rewrite is worth looking at if you are migrating from Apache or have URL's you want to always redirect.
@@ -223,6 +235,16 @@The Email::MIME module can decode base 64-encoded email message parts transparently so the developer doesn't need to worry about it.
+Ask them for it. There are so many email providers available that it's unlikely the local system has any idea how to determine a user's email address.
+ +The exception is for organization-specific email (e.g. foo@yourcompany.com) where policy can be codified in your program. In that case, you could look at $ENV{USER}, $ENV{LOGNAME}, and getpwuid($<) in scalar context, like so:
+ +my $user_name = getpwuid($<)+ +
But you still cannot make assumptions about whether this is correct, unless your policy says it is. You really are best off asking the user.
+Use the Email::MIME and Email::Sender::Simple modules, like so:
@@ -234,7 +256,11 @@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.
-Version: 5.0150037
Version: 5.0150039