Array found where operator expected at /opt/perl/5.10/lib/site_perl/5.10.1/Catalyst/Controller.pm line 215, at end of line (Missing operator before ?) Undefined subroutine &Catalyst::Controller::find_meta called at /opt/perl/5.10/lib/site_perl/5.10.1/Catalyst/Controller.pm line 199. Compilation failed in require at /opt/perl/5.10/lib/site_perl/5.10.1/Module/Runtime.pm line 317. at /opt/perl/5.10/lib/site_perl/5.10.1/Catalyst/Script/Server.pm line 239

If I comment out the 'use namespace::clean' at the top of Catalyst::Controller everything is fine (or seems fine).

If I downgrade Class::Load, Module::Runtime, Module::Implementation, and MooseX::MethodAttributes everything is fine with the app w/o changes to Catalyst code.

I haven't yet figured out what's going on. I do know that after the most recent release of Class::Load/Module::Runtime there was a change to MooseX::MethodAttributes that fixed some problem discovered due to the release of Class::Load etc... But I'm still seeing problems.

> Array found where operator expected at /opt/perl/5.10/lib/site_perl/5.10.1/Catalyst/Controller.pm line 215, at end of line > (Missing operator before ?) > Undefined subroutine &Catalyst::Controller::find_meta called at /opt/perl/5.10/lib/site_perl/5.10.1/Catalyst/Controller.pm line 199. > Compilation failed in require at /opt/perl/5.10/lib/site_perl/5.10.1/Module/Runtime.pm line 317. > at /opt/perl/5.10/lib/site_perl/5.10.1/Catalyst/Script/Server.pm line 239

I'm seeing examples of this coming up from CPAN testers reports for one of my modules. The vast majority of results are passes, but a few get this failure or one of a couple of similarish ones (fails so far are listed below). Fails are over a variety of perl versions across BSD and Solaris platforms.

I'm aiming to spend a bit of time chasing this in the next couple of days, although hints would be very welcome...

[.and I must at this point say a huge thanks to the CPAN testers guys]

> With a very simple catalyst app this happens: > > Array found where operator expected at /opt/perl/5.10/lib/site_perl/5.10.1/Catalyst/Controller.pm line 215, at end of line > (Missing operator before ?) > Undefined subroutine &Catalyst::Controller::find_meta called at /opt/perl/5.10/lib/site_perl/5.10.1/Catalyst/Controller.pm line 199. > Compilation failed in require at /opt/perl/5.10/lib/site_perl/5.10.1/Module/Runtime.pm line 317. > at /opt/perl/5.10/lib/site_perl/5.10.1/Catalyst/Script/Server.pm line 239 > > > If I comment out the 'use namespace::clean' at the top of Catalyst::Controller > everything is fine (or seems fine). > > If I downgrade Class::Load, Module::Runtime, Module::Implementation, and > MooseX::MethodAttributes everything is fine with the app w/o changes to > Catalyst code. >

I'm getting this as well on perlbrew 5.10.1 and it's just started happening. I'm trying to trace back to how/when:

[ghenry [at] dax-xe SureVoIP-API]$ CATALYST_DEBUG=1 DBIC_TRACE=1 script/surevoip_api_server.pl Array found where operator expected at /home/ghenry/perl5/lib/perl5/Catalyst/Controller.pm line 215, at end of line (Missing operator before ?) String found where operator expected at /home/ghenry/surevoip/surevoip-api-git/SureVoIP-API/script/../lib/SureVoIP/API/Controller/SMS.pm line 19, near "has 'sms_form'" (Do you need to predeclare has?) syntax error at /home/ghenry/surevoip/surevoip-api-git/SureVoIP-API/script/../lib/SureVoIP/API/Controller/SMS.pm line 19, near "has 'sms_form'" BEGIN not safe after errors--compilation aborted at /home/ghenry/surevoip/surevoip-api-git/SureVoIP-API/script/../lib/SureVoIP/API/Controller/SMS.pm line 44. Compilation failed in require at /home/ghenry/perl5/lib/perl5/Catalyst/Utils.pm line 287. Compilation failed in require at /home/ghenry/perl5/lib/perl5/Module/Runtime.pm line 317. at /home/ghenry/perl5/lib/perl5/Catalyst/Script/Server.pm line 239

I'm on the latest Cat and MooseX::MethodAttributes, but will check for downgrades like you did.

>> With a very simple catalyst app this happens: >> >> Array found where operator expected at /opt/perl/5.10/lib/site_perl/5.10.1/Catalyst/Controller.pm line 215, at end of line >> (Missing operator before ?) >> Undefined subroutine &Catalyst::Controller::find_meta called at /opt/perl/5.10/lib/site_perl/5.10.1/Catalyst/Controller.pm line 199. >> Compilation failed in require at /opt/perl/5.10/lib/site_perl/5.10.1/Module/Runtime.pm line 317.

Does it work if you set NAMESPACE_CLEAN_USE_PP=1 in your environment? (As that fixes it for me where I can replicate this).

The culprit here appears to be a combination of namespace::clean, B::Hooks::EndOfScope and MooseX::MethodAttributes - but I'm not sure where the problem lies yet, so additional data points would be helpful :)

On Wed, Feb 15, 2012 at 09:48:37PM +0000, Tomas Doran wrote: > > On 15 Feb 2012, at 15:55, Gavin Henry wrote: > > >> With a very simple catalyst app this happens: > >> > >> Array found where operator expected at > >> /opt/perl/5.10/lib/site_perl/5.10.1/Catalyst/Controller.pm line > >> 215, at end of line (Missing operator before ?) Undefined > >> subroutine &Catalyst::Controller::find_meta called at > >> /opt/perl/5.10/lib/site_perl/5.10.1/Catalyst/Controller.pm line > >> 199. Compilation failed in require at > >> /opt/perl/5.10/lib/site_perl/5.10.1/Module/Runtime.pm line 317. > > Does it work if you set NAMESPACE_CLEAN_USE_PP=1 in your environment? > (As that fixes it for me where I can replicate this). > > The culprit here appears to be a combination of namespace::clean, > B::Hooks::EndOfScope and MooseX::MethodAttributes - but I'm not sure > where the problem lies yet, so additional data points would be helpful > :) > > Cheers t0m

It works for me with NAMESPACE_CLEAN_USE_PP=1. If I change it to 0 I get failures again. I'm the one that started this thread so all the details of my setup are in the initial e-mail. A couple of addendums: I am using Centos 5.4 with a custom compiled perl 5.10.1. Please let me know what other details you may need.

On Wed, Feb 15, 2012 at 09:48:37PM +0000, Tomas Doran wrote: > > On 15 Feb 2012, at 15:55, Gavin Henry wrote: > > >> With a very simple catalyst app this happens: > >> > >> Array found where operator expected at > >> /opt/perl/5.10/lib/site_perl/5.10.1/Catalyst/Controller.pm line > >> 215, at end of line (Missing operator before ?) Undefined > >> subroutine &Catalyst::Controller::find_meta called at > >> /opt/perl/5.10/lib/site_perl/5.10.1/Catalyst/Controller.pm line > >> 199. Compilation failed in require at > >> /opt/perl/5.10/lib/site_perl/5.10.1/Module/Runtime.pm line 317. > > Does it work if you set NAMESPACE_CLEAN_USE_PP=1 in your environment? > (As that fixes it for me where I can replicate this). > > The culprit here appears to be a combination of namespace::clean, > B::Hooks::EndOfScope and MooseX::MethodAttributes - but I'm not sure > where the problem lies yet, so additional data points would be helpful > :) Looks like the culprit was B::Hooks::EndOfScope. The latest (0.10) of that package plus the most recent Catalyst seems to have resolved the problems. Thank you to everyone involved.