Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

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

Report information
The Basics
Id: 67645
Status: open
Priority: 0/
Queue: MooseX-Singleton

People
Owner: Nobody in particular
Requestors: zwon [...] trinitum.org
Cc:
AdminCc:

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



Subject: BUILD is not executed with Moose 2
Download (untitled) / with headers
text/plain 162b
If I make class immutable its BUILD method is not executed with Moose 2.0000. Attached test passes with Moose 1.25, but fails with Moose 2.0000. -- Pavel Shaydo
Subject: build_immutable.t
Download build_immutable.t
text/x-perl 299b
use Test::More qw(no_plan); { package Singleton; use MooseX::Singleton; has attribute => (is => 'rw'); sub BUILD { shift->attribute(1); } no Moose; __PACKAGE__->meta->make_immutable; } my $s = Singleton->instance; ok $s->attribute, "Attribute is set";
Please try this patch ;)
Subject: MooseX-Build.patch
Download MooseX-Build.patch
text/x-diff 676b
diff -rc MooseX-Singleton-0.29/lib/MooseX/Singleton/Role/Meta/Class.pm MooseX-Singleton-0.29.patch/lib/MooseX/Singleton/Role/Meta/Class.pm *** MooseX-Singleton-0.29/lib/MooseX/Singleton/Role/Meta/Class.pm 2011-12-09 00:01:00.000000000 +0400 --- MooseX-Singleton-0.29.patch/lib/MooseX/Singleton/Role/Meta/Class.pm 2014-04-09 16:00:54.976917617 +0400 *************** *** 61,67 **** override _inline_extra_init => sub { my $self = shift; ! return '${$existing} = $instance;'; }; } --- 61,67 ---- override _inline_extra_init => sub { my $self = shift; ! return '${$existing} = $instance;', super(); }; }


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.