Skip Menu |

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

Report information
The Basics
Id: 35845
Status: resolved
Priority: 0/
Queue: MooseX-Singleton

People
Owner: Nobody in particular
Requestors: bobtfish [...] bobtfish.net
Cc:
AdminCc:

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



Subject: ->instance broken by Moose 0.44
Hi I just upgraded to Moose 0.44 from Moose 0.40, and this appears to have broken MooseX::Singleton... My package is: package API::Roles::TangramWrapper::Map; use MooseX::Singleton; has 'map' => ( is => 'ro', isa => 'HashRef[Str]', default => sub { {} }, ); __PACKAGE__->meta->make_immutable(); 1; In another package I was saying: API::Roles::TangramWrapper::Map->instance->map()->{$for} = $class; a number of times (to fill the HashRef with data), and later on: my $to = API::Roles::TangramWrapper::Map->instance->map->{blessed($t)}; This now *fails*, however if I remove the ->instance, then everything works as it used to...
Subject: Re: [rt.cpan.org #35845] ->instance broken by Moose 0.44
Date: Tue, 13 May 2008 14:00:17 -0400
To: bug-MooseX-Singleton [...] rt.cpan.org
From: Sartak <sartak [...] gmail.com>
Show quoted text
> Hi
Hi Bob, Show quoted text
> I just upgraded to Moose 0.44 from Moose 0.40, and this appears to have > broken MooseX::Singleton... > > My package is: > package API::Roles::TangramWrapper::Map; > use MooseX::Singleton; > > has 'map' => ( > is => 'ro', > isa => 'HashRef[Str]', > default => sub { {} }, > ); > > __PACKAGE__->meta->make_immutable(); > > 1; > > In another package I was saying: > API::Roles::TangramWrapper::Map->instance->map()->{$for} = $class; > > a number of times (to fill the HashRef with data), and later on: > > my $to = API::Roles::TangramWrapper::Map->instance->map->{blessed($t)}; > > This now *fails*, however if I remove the ->instance, then everything > works as it used to...
Ah crap. We're failing tests at least, so it'll be easy to know when we found the problem. I'll have a look at this soon. Shawn
Hi Bob, This was caused by a typo *fix* in Moose. A method named intialize_body was corrected, and that broke part of MX::Singleton. :) Found and fixed by Dave Rolsky. Shawn