perl-docs-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pgollu...@apache.org
Subject svn commit: r266284 - in /perl/modperl/docs/trunk/src/docs: general/control/control.pod general/correct_headers/correct_headers.pod general/perl_reference/perl_reference.pod general/testing/testing.pod tutorials/tips/mod_perl_tricks/mod_perl_tricks.pod
Date Fri, 02 Sep 2005 04:44:17 GMT
Author: pgollucci
Date: Thu Sep  1 21:44:13 2005
New Revision: 266284

URL: http://svn.apache.org/viewcvs?rev=266284&view=rev
Log:
s/my(/my (/g

Modified:
    perl/modperl/docs/trunk/src/docs/general/control/control.pod
    perl/modperl/docs/trunk/src/docs/general/correct_headers/correct_headers.pod
    perl/modperl/docs/trunk/src/docs/general/perl_reference/perl_reference.pod
    perl/modperl/docs/trunk/src/docs/general/testing/testing.pod
    perl/modperl/docs/trunk/src/docs/tutorials/tips/mod_perl_tricks/mod_perl_tricks.pod

Modified: perl/modperl/docs/trunk/src/docs/general/control/control.pod
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/src/docs/general/control/control.pod?rev=266284&r1=266283&r2=266284&view=diff
==============================================================================
--- perl/modperl/docs/trunk/src/docs/general/control/control.pod (original)
+++ perl/modperl/docs/trunk/src/docs/general/control/control.pod Thu Sep  1 21:44:13 2005
@@ -895,7 +895,7 @@
   # send email about the problem 
   #######################  
   sub send_mail{
-    my($from,$to,$subject,$messagebody) = @_;
+    my ($from,$to,$subject,$messagebody) = @_;
   
     open MAIL, "|$mail_program"
         or die "Can't open a pipe to a $mail_program :$!\n";

Modified: perl/modperl/docs/trunk/src/docs/general/correct_headers/correct_headers.pod
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/src/docs/general/correct_headers/correct_headers.pod?rev=266284&r1=266283&r2=266284&view=diff
==============================================================================
--- perl/modperl/docs/trunk/src/docs/general/correct_headers/correct_headers.pod (original)
+++ perl/modperl/docs/trunk/src/docs/general/correct_headers/correct_headers.pod Thu Sep 
1 21:44:13 2005
@@ -122,7 +122,7 @@
   use Date::Parse;
   # Date::Parse parses RCS format, Apache::Util::parsedate doesn't
   $Mtime ||=
-    Date::Parse::str2time(substr q$Date: 2002/07/31 14:41:49 $, 6);
+    Date::Parse::str2time(substr q$Date$, 6);
   $r->set_last_modified($Mtime);
 
 =head3 Expires and Cache-Control
@@ -466,12 +466,12 @@
 deals with them.
 
   sub handler {
-    my($r) = @_;
+    my ($r) = @_;
     my $uri = $r->uri;
-    if ( my($u1,$u2) = $uri =~ / ^ ([^?]+?) ; ([^?]*) $ /x ) {
+    if ( my ($u1,$u2) = $uri =~ / ^ ([^?]+?) ; ([^?]*) $ /x ) {
       $r->uri($u1);
       $r->args($u2);
-    } elsif ( my($u1,$u2) = $uri =~ m/^(.*?)%3[Bb](.*)$/ ) {
+    } elsif ( my ($u1,$u2) = $uri =~ m/^(.*?)%3[Bb](.*)$/ ) {
       # protect against old proxies that escape volens nolens
       # (see HTTP standard section 5.1.2)
       $r->uri($u1);

Modified: perl/modperl/docs/trunk/src/docs/general/perl_reference/perl_reference.pod
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/src/docs/general/perl_reference/perl_reference.pod?rev=266284&r1=266283&r2=266284&view=diff
==============================================================================
--- perl/modperl/docs/trunk/src/docs/general/perl_reference/perl_reference.pod (original)
+++ perl/modperl/docs/trunk/src/docs/general/perl_reference/perl_reference.pod Thu Sep  1
21:44:13 2005
@@ -335,20 +335,20 @@
 
 =item *
 
-C<my()> vs. C<use vars>:
+C<my ()> vs. C<use vars>:
 
 With use vars(), you are making an entry in the symbol table, and you
 are telling the compiler that you are going to be referencing that
 entry without an explicit package name.
 
-With my(), NO ENTRY IS PUT IN THE SYMBOL TABLE.  The compiler figures
-out C<at compile time> which my() variables (i.e. lexical variables)
+With my (), NO ENTRY IS PUT IN THE SYMBOL TABLE.  The compiler figures
+out C<at compile time> which my () variables (i.e. lexical variables)
 are the same as each other, and once you hit execute time you cannot
 go looking those variables up in the symbol table.
 
 =item *
 
-C<my()> vs. C<local()>:
+C<my ()> vs. C<local()>:
 
 local() creates a temporal-limited package-based scalar, array, hash,
 or glob -- when the scope of definition is exited at runtime, the
@@ -356,7 +356,7 @@
 are *also* global... only the value changes.  (Aside: that is what
 causes variable suicide. :)
 
-my() creates a lexically-limited non-package-based scalar, array, or
+my () creates a lexically-limited non-package-based scalar, array, or
 hash -- when the scope of definition is exited at compile-time, the
 variable ceases to be accessible.  Any references to such a variable
 at runtime turn into unique anonymous variables on each scope exit.
@@ -369,14 +369,14 @@
 between
 modules/packages|general::perl_reference::perl_reference/Using_Global_Variables_and_Sharing_Them_Between_Modules_Packages>
 and an article by Mark-Jason Dominus about how Perl handles variables
-and namespaces, and the difference between C<use vars()> and C<my()> -
+and namespaces, and the difference between C<use vars()> and C<my ()> -
 http://www.plover.com/~mjd/perl/FAQs/Namespaces.html .
 
-=head1 my() Scoped Variable in Nested Subroutines
+=head1 my () Scoped Variable in Nested Subroutines
 
 Before we proceed let's make the assumption that we want to develop
 the code under the C<strict> pragma. We will use lexically scoped
-variables (with help of the my() operator) whenever it's possible.
+variables (with help of the my () operator) whenever it's possible.
 
 =head2 The Poison
 
@@ -849,7 +849,7 @@
     hello();
   }
 
-Therefore, hello() is an inner subroutine and if you have used my()
+Therefore, hello() is an inner subroutine and if you have used my ()
 scoped variables defined and altered outside and used inside hello(),
 it won't work as you expect starting from the second call, as was
 explained in the previous section.
@@ -858,7 +858,7 @@
 
 First of all there is nothing to worry about, as long as you don't
 forget to turn the warnings On.  If you do happen to have the 
-"L<my() Scoped Variable in Nested 
+"L<my () Scoped Variable in Nested 
 Subroutines|general::perl_reference::perl_reference/my___Scoped_Variable_in_Nested_Subroutines>"
 problem, Perl will always alert you.
 
@@ -982,7 +982,7 @@
   Counter is equal to 2 !
 
 By the way, the warning we saw before has gone, and so has the
-problem, since there is no C<my()> (lexically defined) variable used
+problem, since there is no C<my ()> (lexically defined) variable used
 in the nested subroutine.
 
 In the above example we know C<$counter> is just a simple small
@@ -1466,7 +1466,7 @@
   package web ;
   # Call like this: web::print_with_class('loud',"Don't shout!");
   sub print_with_class{
-    my( $class, $text ) = @_ ;
+    my ( $class, $text ) = @_ ;
     print qq{<span class="$class">$text</span>};
   }
   1;
@@ -2015,7 +2015,7 @@
 they do not belong to any particular package (not even C<main::>) and
 are universally available. This means that if you change them, you
 change them anywhere across the entire program; furthermore you cannot
-scope them with my(). However you can local()ise them which means that
+scope them with my (). However you can local()ise them which means that
 any changes you apply will only last until the end of the enclosing
 scope. In the mod_perl situation where the child server doesn't
 usually exit, if in one of your scripts you modify a global variable

Modified: perl/modperl/docs/trunk/src/docs/general/testing/testing.pod
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/src/docs/general/testing/testing.pod?rev=266284&r1=266283&r2=266284&view=diff
==============================================================================
--- perl/modperl/docs/trunk/src/docs/general/testing/testing.pod (original)
+++ perl/modperl/docs/trunk/src/docs/general/testing/testing.pod Thu Sep  1 21:44:13 2005
@@ -2013,7 +2013,7 @@
       "the closure problem is there",
   );
   sub req {
-      my($same_interp, $url) = @_;
+      my ($same_interp, $url) = @_;
       my $res = Apache::TestRequest::same_interp_do($same_interp,
                                                     \&GET, $url);
       return $res ? $res->content : undef;

Modified: perl/modperl/docs/trunk/src/docs/tutorials/tips/mod_perl_tricks/mod_perl_tricks.pod
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/src/docs/tutorials/tips/mod_perl_tricks/mod_perl_tricks.pod?rev=266284&r1=266283&r2=266284&view=diff
==============================================================================
--- perl/modperl/docs/trunk/src/docs/tutorials/tips/mod_perl_tricks/mod_perl_tricks.pod (original)
+++ perl/modperl/docs/trunk/src/docs/tutorials/tips/mod_perl_tricks/mod_perl_tricks.pod Thu
Sep  1 21:44:13 2005
@@ -1163,7 +1163,7 @@
   open (IN,$file=~/\.gz$/ ? "zcat $file |" : $file ) || die "Can't open file/pipe: $!"; 
   
   while (<IN>) {
-      my($date,$host,$agent,$URL) = /^\[(.+)\] (\S+) "(.*)" (\S+)$/;
+      my ($date,$host,$agent,$URL) = /^\[(.+)\] (\S+) "(.*)" (\S+)$/;
       next unless $URL=~/\.(html|htm|txt)$/;
   
       $HITS++;
@@ -1307,7 +1307,7 @@
       || die $db->errstr;
   while (<>) {
       chomp;
-      my($date,$host,$method,$url,$user,$browser,$referer,$status,$bytes) = /$PATTERN/o;
+      my ($date,$host,$method,$url,$user,$browser,$referer,$status,$bytes) = /$PATTERN/o;
       $user    = undef if $user    eq '-';
       $referer = undef if $referer eq '-';
       $browser = undef if $browser eq '-';
@@ -2169,7 +2169,7 @@
          chomp;
          s/^\s+//; s/\s+$//;   #fold leading and trailing whitespace
          next if /^#/ || /^$/; # skip comments and empty lines
-         next unless my($url, $label) = /^(\S+)\s+(.+)/;
+         next unless my ($url, $label) = /^(\S+)\s+(.+)/;
          push @c, $url;     # keep the url in an ordered array
          $c{$url} = $label; # keep its label in a hash
       }
@@ -2269,7 +2269,7 @@
   }
   
   sub TIEHANDLE {
-      my($class,$r) = @_;
+      my ($class,$r) = @_;
       # initialize a deflation stream
       my $d = deflateInit(-WindowBits=>-MAX_WBITS()) || return undef;
   
@@ -2512,13 +2512,13 @@
   sub handler {
      my $r = shift;
   
-     my($res, $sent_pwd) = $r->get_basic_auth_pw;
+     my ($res, $sent_pwd) = $r->get_basic_auth_pw;
      return $res if $res != OK;
      
      my $user = $r->connection->user;
      my $reason = "";
   
-     my($name,$passwd) = getpwnam($user);
+     my ($name,$passwd) = getpwnam($user);
      if (!$name) {
          $reason = "user does not have an account on this system";
      } else {
@@ -2575,7 +2575,7 @@
   sub handler {
       my $r = shift;
   
-      my($res, $sent_pwd) = $r->get_basic_auth_pw;
+      my ($res, $sent_pwd) = $r->get_basic_auth_pw;
       return $res if $res != OK;
   
       my $user = lc $r->connection->user;
@@ -2739,7 +2739,7 @@
   my $Ad = join "|", qw{ads? advertisement banner};
   
   sub handler {
-      my($r) = @_;
+      my ($r) = @_;
       return DECLINED unless $r->proxyreq;
       $r->handler("perl-script"); #ok, let's do it
       $r->push_handlers(PerlHandler => \&proxy_handler);
@@ -2747,7 +2747,7 @@
   }
   
   sub proxy_handler {
-      my($r) = @_;
+      my ($r) = @_;
    
       my $request = HTTP::Request->new($r->method, $r->uri);
       
@@ -2794,7 +2794,7 @@
   
   sub block_ad {
       my $data = shift;
-      my($x, $y) = imgsize($data);
+      my ($x, $y) = imgsize($data);
    
       my $im = GD::Image->new($x,$y);
    



---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org


Mime
View raw message