Skip Menu |

This queue is for tickets about the Catalyst-Runtime CPAN distribution.

Report information
The Basics
Id: 47830
Status: open
Priority: 0/
Queue: Catalyst-Runtime

Owner: rafl [...]
Requestors: andreas.marienborg [...]

Bug Information
Severity: Normal
Broken in: 5.80007
Fixed in: (no value)

Subject: Catalyst::Component::ContextClosure breaks with use namespace::autoclean
Download (untitled) / with headers
text/plain 688b
The synopsis for Catalyst::Component::ContextClosure lists the top as: use Moose; use namespace::autoclean; BEGIN { extends 'Catalyst::Controller'; with 'Catalyst::Component::ContextClosure'; } however, if you use namespace::autoclean in the controller, the make_context_closure methods disappears (perhaps it is autocleaned). The test-controller doesn't use namespace::autoclean, which is why this isn't caught in the test (which, on the other hand requires CatalystX::LeakChecker 0.03, while only 0.02 is on cpan atm). Perhaps the test could skip the leak-checking if it isn't available, but still test that closures get created and work even without LeakChecker?
Attaching a stripped down cat app that breaks t/01app.t
Download ClosureApp.tar.gz
application/x-gzip 1k

Message body not shown because it is not plain text.

Hmm, this issue only happens if the 'with' statement is inside the BEGIN block.
Download (untitled) / with headers
text/plain 296b
Just to update this, it is due to metaclass reinitialization in Moose losing stuff. MooseX::MethodAttributes causes this, and rafl kindly wrote a test case: This will need fixing in Moose itself.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to