in reply to Show all errors on compile time

But on 5.22, the compile process exists as soon as it hits the first syntax error.

You appear to have misdiagnosed the issue because that's not true. Both new and old compilers show as many errors as possible.

Note that some errors prevent the compiler from going any further, but that's always been the case.

Since all you've provided is a misdiagnosis, we can't help you until you provide more information.

Replies are listed 'Best First'.
Re^2: Show all errors on compile time
by ifazlives (Novice) on Aug 10, 2018 at 17:07 UTC
    You are correct. I have misdiagnosed the issue.

    What prompted me to ask the question was:
    In Perl 5.18, I get the below result when I compile a script

    perl -c OrgChart.cgi
    defined(%hash) is deprecated at OrgChart.cgi line 104, <DATA> line 751.
    (Maybe you should just omit the defined()?)
    defined(@array) is deprecated at OrgChart.cgi line 2424, <DATA> line 751.
    (Maybe you should just omit the defined()?)
    defined(@array) is deprecated at OrgChart.cgi line 2426, <DATA> line 751.
    (Maybe you should just omit the defined()?)
    defined(@array) is deprecated at OrgChart.cgi line 2428, <DATA> line 751. (Maybe you should just omit the defined()?)

    But in Perl 5.22, the compile gave me only the first one from 5.18.

    perl -c OrgChart.cgi
    Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at OrgChart.cgi line 104, <DATA> line 755.

    It was my misunderstanding the 5.18 was throwing all error. But infact those where just warnings.
    Regards,
    IE

      defined(%hash) makes no sense.

      In 5.16, it was deprecated and it started warning you that you needed to stop using it.

      In 5.22, it became a fatal error.

      The parser probably can't continue because this isn't an error encountered by the parser. You could use perlbug to file a ticket asking that this type of error doesn't stop the parser.