develooper Front page | perl.perl5.porters | Postings from July 2001

[PATCH perlsnap] /^qnx|nto$/ --> /^(?:qnx|nto)$/

Thread Next
From:
Philip Newton
Date:
July 1, 2001 00:33
Subject:
[PATCH perlsnap] /^qnx|nto$/ --> /^(?:qnx|nto)$/
Message ID:
perl.perl5.porters-39484@nntp.perl.org
Looking through changes again, I see a couple of places where
C<$^O eq 'qnx'> turned into C<$^O =~ /^qnx|nto$/>. Presumably, this
is supposed to be something like "if $^O is either 'qnx' or 'nto'" and
not "if $^O starts with 'qnx' or ends with 'nto'". Non-capturing parens
added in those places to clarify the meaning.

--- lib/ExtUtils/MM_Unix.pm.orig        Wed Jun 27 15:32:56 2001
+++ lib/ExtUtils/MM_Unix.pm     Sun Jul  1 07:10:17 2001
@@ -84,7 +84,7 @@

     # Handle POSIX-style node names beginning with double slash
     my $node = '';
-    if ( $^O =~ m/^qnx|nto$/ && $path =~ s:^(//[^/]+)(/|\z):/:s ) {
+    if ( $^O =~ m/^(?:qnx|nto)$/ && $path =~ s:^(//[^/]+)(/|\z):/:s ) {
       $node = $1;
     }
     $path =~ s|(?<=[^/])/+|/|g ;                   # xx////xx  -> xx/xx
--- lib/File/Spec/Unix.pm.orig  Wed Jun 27 15:32:56 2001
+++ lib/File/Spec/Unix.pm       Sun Jul  1 07:10:56 2001
@@ -37,7 +37,7 @@

     # Handle POSIX-style node names beginning with double slash
     my $node = '';
-    if ( $^O =~ m/^qnx|nto$/ && $path =~ s:^(//[^/]+)(/|\z):/:s ) {
+    if ( $^O =~ m/^(?:qnx|nto)$/ && $path =~ s:^(//[^/]+)(/|\z):/:s ) {
       $node = $1;
     }
     $path =~ s|/+|/|g unless($^O eq 'cygwin');     # xx////xx  -> xx/xx
End of patch.

Cheers,
Philip
-- 
Philip Newton <Philip.Newton@gmx.net>

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About