Hello!
Everything works great for Perl files (*.pl), but there's no syntax highlighting in the modules. The files are in the same project and are opened by the EPIC Perl Editor by default. The advice from here, but only once. Now I just cannot get back the highlighting whatever I do.
I also had "Colorer" plugin installed, but uninstalled it shortly after - maybe it could cause the problem.
Eclipse version: 3.7.1
EPIC verson: 0.5.46
Any help will be very appreciated!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Maybe this will help: in Preferences go to File Associations and check *.pm: there should be "Epic Perl Editor (default) locked by Perl Source File content type" - if it's not marked as default, click the Default button. At least this is how it appears in EPIC 'testing' (0.6.x).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
jploski, thank you for the quick response.
I went to Window->Preferences->General->Editors->File Associations and that line you pointed out was already there. There also was "Text Editor locked by 'Perl Source File' content type", but it wasn't marked as default.
I even deleted and then added again the *.pm file type, but, unfortunately, it didn't help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you create a new module file, does it open with the wrong editor? It could be that the wrong association is stored for some files only. Another thing to check is "Content Types" in Preferences - there should be a "Perl Source File" with "*.pl", "*.pm" and "*.t" listed below as File associations. Finally, you may consider upgrading to EPIC 0.6.x (testing).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"Content Types" are also OK, just as you say they should be.
When I added a new module, it was opened with the right editor (EPIC Perl Editor), but I began typing and the errors were shown. So, I copied all my code from the old module and pasted it into the new one… And syntax check disappeared. I started deleting text line by line from the beginning of the file and found out that the culprit code lines were:
Sure, BEGIN blocks are executed (not just parsed) by the compiler (perl -c) and syntax checking is done by the compiler as well. If you have something in a BEGIN block that causes the compiler to abort prematurely, it won't report syntax errors to EPIC. There is nothing that EPIC can do about it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems that Perl couldn't locate current module name in `@INC` - that's why `perl -c` was interrupted by error inside of the `BEGIN` block. So, you were absolutely right, jploski. Thank you very much for your help.
Possible solutions to this problem can be found on StackOverflow.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello!
Everything works great for Perl files (*.pl), but there's no syntax highlighting in the modules. The files are in the same project and are opened by the EPIC Perl Editor by default. The advice from here, but only once. Now I just cannot get back the highlighting whatever I do.
I also had "Colorer" plugin installed, but uninstalled it shortly after - maybe it could cause the problem.
Eclipse version: 3.7.1
EPIC verson: 0.5.46
Any help will be very appreciated!
Maybe this will help: in Preferences go to File Associations and check *.pm: there should be "Epic Perl Editor (default) locked by Perl Source File content type" - if it's not marked as default, click the Default button. At least this is how it appears in EPIC 'testing' (0.6.x).
jploski, thank you for the quick response.
I went to Window->Preferences->General->Editors->File Associations and that line you pointed out was already there. There also was "Text Editor locked by 'Perl Source File' content type", but it wasn't marked as default.
I even deleted and then added again the *.pm file type, but, unfortunately, it didn't help.
If you create a new module file, does it open with the wrong editor? It could be that the wrong association is stored for some files only. Another thing to check is "Content Types" in Preferences - there should be a "Perl Source File" with "*.pl", "*.pm" and "*.t" listed below as File associations. Finally, you may consider upgrading to EPIC 0.6.x (testing).
"Content Types" are also OK, just as you say they should be.
When I added a new module, it was opened with the right editor (EPIC Perl Editor), but I began typing and the errors were shown. So, I copied all my code from the old module and pasted it into the new one… And syntax check disappeared. I started deleting text line by line from the beginning of the file and found out that the culprit code lines were:
This block spoils syntax check in this state, but doesn't spoil it if I remove BEGIN {} or leave nothing between the curly brackets. Any ideas?
Sure, BEGIN blocks are executed (not just parsed) by the compiler (perl -c) and syntax checking is done by the compiler as well. If you have something in a BEGIN block that causes the compiler to abort prematurely, it won't report syntax errors to EPIC. There is nothing that EPIC can do about it.
It seems that Perl couldn't locate current module name in `@INC` - that's why `perl -c` was interrupted by error inside of the `BEGIN` block. So, you were absolutely right, jploski. Thank you very much for your help.
Possible solutions to this problem can be found on StackOverflow.