Skip Menu |

This queue is for tickets about the Moo CPAN distribution.

Report information
The Basics
Id: 122927
Status: open
Priority: 0/
Queue: Moo

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

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



Subject: Moo should possibly report itself as immutable
...and it doesn't. Example: perl -E 'package My::Moo::Class { use Moo; } package My::Moose::Class { use Moose; __PACKAGE__->meta->make_immutable; } say $_->meta->is_immutable for My::Moo::Class, My::Moose::Class;' 0 1
Subject: Re: [rt.cpan.org #122927] Moo should possibly report itself as immutable
Date: Wed, 30 Aug 2017 10:10:58 -0700
To: bug-Moo [...] rt.cpan.org
From: Karen Etheridge <karen [...] froods.org>
It's not immutable though. You can call a meta function (e.g. from Moose::Meta::Class) that inflates the fake metaclass to a real Moose one, and then makes the requested modifications, without having to say ->make_mutable first. On Wed, Aug 30, 2017 at 2:22 AM, Илья Чесноков via RT <bug-Moo@rt.cpan.org> wrote: Show quoted text
> Wed Aug 30 05:22:44 2017: Request 122927 was acted upon. > Transaction: Ticket created by CHESNOKOV > Queue: Moo > Subject: Moo should possibly report itself as immutable > Broken in: 2.003002 > Severity: Normal > Owner: Nobody > Requestors: CHESNOKOV@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=122927 > > > > ...and it doesn't. > > Example: > > perl -E 'package My::Moo::Class { use Moo; } package My::Moose::Class { > use Moose; __PACKAGE__->meta->make_immutable; } say > $_->meta->is_immutable for My::Moo::Class, My::Moose::Class;' > 0 > 1 >
On Wed Aug 30 13:11:19 2017, karen@froods.org wrote: Show quoted text
> It's not immutable though. You can call a meta function (e.g. from > Moose::Meta::Class) that inflates the fake metaclass to a real Moose one, > and then makes the requested modifications, without having to say > ->make_mutable first.
That sounds a bit strange because the documentation says: Show quoted text
>make_immutable itself is a no-op, since we generate metaclasses that are already immutable, and users converting from Moose had an unfortunate tendency to accidentally load Moose by calling it.