This might have been previously found, but very interesting to know that the compilation carried out by Perl through the perl -c is non-traditional. In C, compilation would throw out all the syntax errors at once since the compiler would read through the entire code.
Interesting to discover that Perl compilation / parse tree building is line by line, therefore, on a 100 line program, if an error was encountered on line 10, the message thrown out by the compiler is:
failed--compilation aborted at MyModule.pm line 10
Therefore, one must not assume that line 10 was the only error that exists in the Perl module. Once the error is fixed on line 10, be prepared to see more subsequent syntax errors, if they exist.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Non-traditional, Line by Line Compilation in Perl
by Anonymous Monk on Dec 07, 2011 at 11:39 UTC | |
by Anonymous Monk on Dec 07, 2011 at 11:42 UTC | |
by sumeetgrover (Monk) on Dec 07, 2011 at 11:55 UTC | |
by Anonymous Monk on Dec 07, 2011 at 12:01 UTC | |
by sumeetgrover (Monk) on Dec 07, 2011 at 12:24 UTC | |
by ambrus (Abbot) on Dec 10, 2011 at 21:06 UTC | |
Re: Non-traditional, Line by Line Compilation in Perl
by JavaFan (Canon) on Dec 07, 2011 at 17:25 UTC | |
Re: Non-traditional, Line by Line Compilation in Perl
by choroba (Cardinal) on Dec 07, 2011 at 11:19 UTC | |
Re: Non-traditional, Line by Line Compilation in Perl
by ambrus (Abbot) on Dec 08, 2011 at 07:01 UTC |
Back to
Meditations