Results 1 to 5 of 5

Thread: How to edit Catalyst source files with proper syntax checking?

  1. #1

    How to edit Catalyst source files with proper syntax checking?

    I am working on a Perl Catalyst application. I have set up an Ubuntu (14.04) server with Apache, Subversion, and Jenkins so that a Jenkins job will be fired off any time a file is checked in, and the tests will be run on it. I've also configured Starman to run the Catalyst app, and Apache to use mod_proxy_fcgi to access it.
    On my laptop (running Windows 8.1), I've got the Subversion repo checked out under my Documents folder. I've opened in Komodo the file .../app/lib/app/Controller/Room.pm (created by default when creating a Catalyst app -- the one I'm working on is just the default, for right now). It's complaining about line 36: "Invalid CODE attribtutes: Path : Args(0)."
    However, if I open a command prompt and navigate to that folder, and run "perl -c Root.pm" it says "Root.pm syntax OK".
    So, Komodo is missing some libraries somewhere, or something?
    With that in mind, I went into Komodo Preferences and added .../app/lib to it, and re-ran the syntax check, but it's still reporting "Invalid CODE attributes" as above.
    Years ago I used Komodo to edit Catalyst files and the syntax check was working -- but that was using a company and computer that are long gone. Hopefully this is something simple I've overlooked. Appreciate any insight.

  2. #2

    How to edit Catalyst source files with proper syntax checking?

    Any chance you could share the file in question?
    Also be sure to check out the prefs under Preferences > Syntax & Spell Checking > Language: Perl
    Particularly the "Don't execute BEGIN blocks in current document during syntax-checking" settings.

  3. #3

    How to edit Catalyst source files with proper syntax checking?

    Certainly, below is the "generic" Root.pm source file. There are other files involved in the project but the error seems to be regarding the "sub" construct. If this isn't enough let me know and I'll share everything somehow.

  4. #4

    How to edit Catalyst source files with proper syntax checking?

    Ok, so after some internal investigation (thanks @andyg) it appears that your error is caused because Komodo is indeed unable to see some of your dependencies. Specifically the dependency that defines MODIFY_CODE_ATTRIBUTES. You were on the right track in defining import directories for Perl. My guess is you simply didnt define the correct directory.
    I can't tell you exactly what directory you need to import unfortunately, as I'm not familiar with Catalyst.

  5. #5

    How to edit Catalyst source files with proper syntax checking?

    I searched for "MODIFY_CODE_ATTRIBUTES" throughout the Catalyst files, and found nothing. Then I repeated that grep in c:\Perl64, and it found it in several places. Checking Komodo, I found no other libs defined, so I added c:\Perl64\lib. I also noticed the "Default Perl Interpreter" was "find on path" so I set it to the only Perl I have installed, C:\Perl64\bin\perl.exe. I also filled in the next two fields, "PPM Location" C:\Perl64\bin\ppm.bat and "cpan Location" C:\Perl64\bin\cpan.bat.
    However, even with these changes, it's still giving the error.
    Can you tell me how to determine exactly what command-line it's running when it invokes the "perl -c" syntax check?
    I just did one from a command line, from the Catalyst project's root (i.e., outside of its "lib" folder) and it still finds no errors. I think the answer might be either that command line, or the environment variables set when it runs -- can you help me find those as well?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •