Ticket #1051 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Syntax checker does not return the correct error message

Reported by: azawawi Owned by:
Priority: major Milestone:
Component: editor Version: 0.74
Keywords: win32, syntax Cc:

Description

The following snippet

foreach my ($a, $b) (1..10) { }

should return the following error in the syntax window

Missing $ on loop variable at -e line 1.

But it doesnt even though perl -c -e "foreach my ($a, $b) (1..10) { }" does.

This happened on Strawberry Perl v5.10.1 and later but I could not replicate it on other platforms.

Change History

comment:1 Changed 3 years ago by azawawi

Quick update. I tried the following snippet and the error message was displayed on the second line.

use strict;
$foo;
foreach my ($a, $b) (1..10) { }

comment:2 Changed 3 years ago by azawawi

So far i found that on win32 there is some kind of formatting involved since $ENV{TMPDIR} has a long path by default.

set TMPDIR=d:\tools
perl dev.pl

works!

An example problematic error output that we need to parse on win32:

Missing $ on loop variable at C:\Users\username\AppData\Local\Temp\eoZOOAXzTg
	line 3 (#1)
    (F) Apparently you've been programming in csh too much.  Variables
    are always mentioned with the $ in Perl, unlike in the shells, where it
    can vary from one line to the next.
    
Uncaught exception from user code:
	Missing $ on loop variable at C:\Users\username\AppData\Local\Temp\eoZOOAXzTg line 3.
 at C:\Users\username\AppData\Local\Temp\eoZOOAXzTg line 3

comment:3 Changed 3 years ago by azawawi

  • Summary changed from (win32) Syntax checker does not return the correct error message to Syntax checker does not return the correct error message

It happens when the filename is very long

comment:4 Changed 3 years ago by azawawi

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in r13195

Thanks :)

Note: See TracTickets for help on using tickets.