Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 63818
Status: resolved
Priority: 0/
Queue: Moose

People
Owner: Nobody in particular
Requestors: swartz [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.0800



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
This is because the algorithm we use for detecting cycles in 'also' declarations only works for undirected graphs, but the 'also' relationship forms a directed graph. It should certainly be fixed.
Any ETA on this? See this StackOverflow question for another instance where this issue may be implicated: http://stackoverflow.com/a/10307862/164
I'm not on the moose list, but here's a stab: https://github.com/wickline/moose/commit/8cf626b265d1a3a0aea3781a27a5ae13b6b317f3 On Thu Apr 26 10:21:11 2012, JSIRACUSA wrote: Show quoted text
> Any ETA on this? See this StackOverflow question for another instance > where this issue may be > implicated: http://stackoverflow.com/a/10307862/164