Skip Menu |
 

This queue is for tickets about the MooseX-Declare CPAN distribution.

Report information
The Basics
Id: 45691
Status: resolved
Priority: 0/
Queue: MooseX-Declare

People
Owner: Nobody in particular
Requestors: nperez [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.20
Fixed in: 0.22



Subject: Nested class definitions seem to not work any more
Download (untitled) / with headers
text/plain 473b
The following gives a runtime error: Can't locate object method "new" via package "SubFoo" (perhaps you forgot to load "SubFoo"?) at test_declare.pl line 13. use MooseX::Declare; use 5.010; role Bar { sub baz { say 'Bar::baz called'; } } class Foo with Bar { sub anon { # nested class definition class SubFoo with Bar { sub blarg { say 'SubFoo::blarg called'; } } return SubFoo->new(); } } my $foo = Foo->new(); $foo->anon();


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.