cleanup (minor things like punctuation, use spaces for docu indenting)
authorJuerd Waalboer <juerd@cpan.org>
Sat, 31 Mar 2007 00:33:29 +0000 (02:33 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 31 Mar 2007 00:33:29 +0000 (02:33 +0200)
Changes
PLP.pm
PLP/HowTo.pod

diff --git a/Changes b/Changes
index 486947ffb41c681933fe48a7b3591bd2e37335b6..d6edbf1be528eafb8437a950d2fd742c97b00f57 100644 (file)
--- a/Changes
+++ b/Changes
@@ -5,10 +5,10 @@
 - Small documentation fixes
 - Setting a header when headers are already sent now tells you where output
   started
-- Speedup in source()
+- Speeded up source()
 
 3.16 - May 21, 2002:
-- Clean up a little
+- Cleaned up a little
 - Changed compile-time <(...)> includes to use paths relative to the file they
   are included by. Include() of course still uses paths relative to the current
   working directory
diff --git a/PLP.pm b/PLP.pm
index f4afee889c7d429e70c003db0f7b82f555d19f93..df6ea349b5263965effc405e795da31c6c77031c 100644 (file)
--- a/PLP.pm
+++ b/PLP.pm
@@ -68,7 +68,7 @@ sub cgi_init {
 
     delete @ENV{
        qw(PATH_TRANSLATED SCRIPT_NAME SCRIPT_FILENAME PATH_INFO),
-        grep { /^REDIRECT_/ } keys %ENV
+        grep /^REDIRECT_/, keys %ENV
     };
 
     $ENV{PATH_INFO} = $path_info if defined $path_info;
index e6b0354eb70656ecbdcafdce6e1a55660e3f5129..93bacb24002e4f4a83950276ff0027857098f26e 100644 (file)
@@ -1,72 +1,73 @@
-=head1 Name
+=head1 NAME
 
 PLP::HowTo - Some examples of commong web things in PLP.
 
-=head1 How to...
+=head1 HOW TO...
 
 Additional Perl functionality is often available in modules. All of the modules
 used in this document are available (for free) at CPAN: http://search.cpan.org/
 
-=over 10
+=head2 send a cookie
 
-=item send a cookie
+ <: 
+     BEGIN {
+        use CGI::Cookie;
+        AddCookie(
+            CGI::Cookie->new(
+                -name => 'ID',
+                -value => 123456,
+                -domain => 'foo.com',
+                -path => '/'
+            )->as_string
+        );
+     }
+ :>
 
-    <: 
-       BEGIN {
-           use CGI::Cookie;
-           AddCookie( CGI::Cookie->new(
-               -name => 'ID',
-               -value => 123456,
-               -domain => 'foo.com',
-               -path => '/'
-           )->as_string );
-       }
-    :>
+=head2 get a cookie
 
-=item get a cookie
+ Your user ID is <:= $cookie{ID} :>
 
-    Your user ID is <:= $cookie{ID} :>
+=head2 set a header
 
-=item set a header
+ <:
+     BEGIN {
+         $header{Content_Type} = 'text/plain';
+     }
+ :>
 
-    <:
-       BEGIN {
-           $header{Content_Type} = 'text/plain';
-       }
-    :>
-
-=item use a database
+=head2 use a database
 
 Use DBI, and alternatively, one of the many simplifying modules. Drivers for
 DBI are in the DBD:: namespace. DBI loads the driver automatically, but it has
 to be available.
 
   <:
-       use DBIx::Simple; # and read its documentation for examples.
   :>
+ <:
+     use DBIx::Simple; # and read its documentation for examples.
+ :>
 
-=item allow a user to upload a file
+=head2 allow a user to upload a file
 
 Use CGI.pm, which can be used with CGI::Upload to make things easier
 
-    <:
-       use CGI;         # and don't use %post in your PLP document.
-       use CGI::Upload; # and read its documentation for examples.
-       my $cgi = CGI->new;
-       my $upload = CGI::Upload->new($cgi);
-       ...
-    :>
-=item download a file into a variable
+ <:
+     use CGI;         # and don't use %post in your PLP document.
+     use CGI::Upload; # and read its documentation for examples.
+     my $cgi = CGI->new;
+     my $upload = CGI::Upload->new($cgi);
+     ...
+ :>
+
+=head2 download a file into a variable
 
   <:
-       use LWP::Simple;
-       my $page = get("http://foo.com/bar.html");
   :>
+ <:
+     use LWP::Simple;
+     my $page = get 'http://foo.com/bar.html';
+ :>
 
-=back
+=head1 FEEDBACK
 
 If you have good, simple examples of how to do common things with PLP, please
-send them! (juerd@cpan.org)
+send them! <juerd@cpan.org>
 
 =cut