Subject: | Moose::Exporter: possible false circular reference |
Date: | Fri, 10 Dec 2010 15:48:05 -0800 |
To: | bug-moose [...] rt.cpan.org |
From: | Jonathan Swartz <swartz [...] pobox.com> |
This script
#!/usr/bin/perl
use warnings;
use strict;
{ package MyMoose;
use MooseX::HasDefaults::RO ();
use Moose::Exporter;
Moose::Exporter->setup_import_methods( also => [ 'Moose', 'MooseX::HasDefaults::RO'] );
}
reports
Circular reference in 'also' parameter to Moose::Exporter between MooseX::HasDefaults::RO and Moose at /usr/local/lib/perl5/site_perl/5.12.2/darwin-2level/Moose/Exporter.pm line 160.
Moose 1.21, MooseX::HasDefaults 0.03
The same thing will happen if you replace 'Moose' on the setup_imports_methods line with 'MooseX::HasDefaults::RW', or with any other module that includes Moose in its setup_import_methods.
I don't know whether this is a bug, or if so, whether it's a bug in Moose::Import or MooseX::HasDefaults::RW/RO. But it doesn't seem as if there's actually a circular reference here.
Jon