in reply to Error reporting in Function::Parameters

Hello golux,

If I'm permitted to do some wild guess, the problem you are facing does not rely within Method::Signatures nor Function::Parameters but with Moo on it's own.

Moo does a lot of code generation and a syntax error makes everything go messy.

Also compiletime/runtime timing must play a role in this: as you discovered perl -c Moo_with_syntax_errors_module.pm reveals the right point where the error happens: 'Bareword "nnext" not allowed.. '

I'd try to change use module into require module or using Module::Load as side experiment.

I hope this can be useful for you even if my English is easily misunderstandable and my OO experience is very very limited.

See also this Moo report

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: Error reporting in Function::Parameters -- or by Moo?
by Haarg (Priest) on Jun 01, 2018 at 03:36 UTC
    The error reported doesn't change if use of Moo is removed from the code. Moo doesn't change how the rest of your code is parsed. This is definitely an issue in Function::Parameters. It seems to be getting confused about how to continue parsing after a compilation error.