#722644 syntax checker should check for balanced parentheses first

Package:
perl
Source:
perl
Description:
Larry Wall's Practical Extraction and Report Language
Submitter:
Date:
2013-09-13 21:57:21 UTC
Severity:
wishlist
#722644#5
Date:
2013-09-13 01:22:29 UTC
From:
To:
The syntax checker should check for balanced parentheses first.

$ perl -c p
"my" variable $p masks earlier declaration in same scope at p line 30.
$ perltidy p
## Please see file p.ERR
$ cat p.ERR

28: for my $g(keys $p) {
                       ^
29: for my $m ( 0.. $#{$$p{$g}{members}{data}} } ) {
              ^
29: for my $m ( 0.. $#{$$p{$g}{members}{data}} } ) {
                                               ^
Found 1 extra '(' between '{' on line 28 and '}' on line 29
    The most recent un-matched '(' is on line 29

There is no previous '{' to match a '}' on line 41
41: }
    ^
41:	Starting negative indentation
87:	final indentation level: -1
87:	To see 1 non-critical warnings rerun with -w
87:	To save a full .LOG file rerun with -g

#722644#10
Date:
2013-09-13 02:15:53 UTC
From:
To:
Here we observe a missing } causes more wild goose chases... i.e.,

Useless use of hash element in void context at ./p line 60.

#722644#15
Date:
2013-09-13 21:48:26 UTC
From:
To:
Also here perhaps say instead "explicit package name or my()".

$ cat r.pl
use warnings FATAL => 'all';
use strict;
$u++
$ perl r.pl
Global symbol "$u" requires explicit package name at r.pl line 3.
Execution of r.pl aborted due to compilation errors.