This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
diag.t: Don’t check ‘calls’ in column 0
authorFather Chrysostomos <sprout@cpan.org>
Sun, 17 Nov 2013 14:40:14 +0000 (06:40 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 17 Nov 2013 21:09:00 +0000 (13:09 -0800)
because they may be function declarations instead.  It was getting
confused by win32_croak_not_implemented, which does not have ");"
in it before the first string.

t/porting/diag.t

index aa46d9e..6684d99 100644 (file)
@@ -240,7 +240,7 @@ sub check_file {
 
     my $multiline = 0;
     # Loop to accumulate the message text all on one line.
-    if (m/\b(?:$source_msg_re(?:_nocontext)?|$regcomp_re)\s*\(/) {
+    if (m/(?!^)\b(?:$source_msg_re(?:_nocontext)?|$regcomp_re)\s*\(/) {
       while (not m/\);$/) {
         my $nextline = <$codefh>;
         # Means we fell off the end of the file.  Not terribly surprising;