in reply to How to syntax-check Catalyst code which throws 'Invalid CODE attributes' errors?

Or really just any way to get past this issue and find more low-level problems like a missing comma

I don't know if it will work, but maybe try temporarily replacing use attributes; with require attributes;, or even try #use attributes; (ie comment it out).

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: How to syntax-check Catalyst code which throws 'Invalid CODE attributes' errors?
by LittleJack (Beadle) on Jun 09, 2021 at 03:46 UTC

    Thanks but the use of Attributes almost certainly isn't flagged in the particular file I'm testing at any given time, it's a .pm file in a big Catalyst application and would be inheriting the attributes thing from Moose (or possibly Moo?).

      Thanks but the use of Attributes almost certainly isn't flagged in the particular file I'm testing at any given time

      Aaaah ... that could make the hack somewhat cumbersome to implement ;-)
      Sorry for the noise.

      Cheers,
      Rob