Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 48850
Status: open
Priority: 0/
Queue: Moose

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

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



Subject: immutable subclass, mutable parent, silent failures
Date: Wed, 19 Aug 2009 12:05:32 -0700
To: bugs-moose <bugs-moose [...] rt.cpan.org>
From: Hans Dieter Pearcey <hdp [...] pobox.com>
It's confusing when someone does something like this: package Base; use Moose; use Subclass; has (...); package Subclass; use Moose; extends 'Base'; __PACKAGE__->meta->make_immutable; The subclass doesn't see any changes made to Base after 'use Subclass' (because it's immutable). This is fine, but we should try to tell those people they're doing it wrong. hdp.
On Wed Aug 19 15:06:00 2009, hdp@pobox.com wrote: Show quoted text
> It's confusing when someone does something like this: > > package Base; > use Moose; > use Subclass; > has (...); > > package Subclass; > use Moose; > extends 'Base'; > __PACKAGE__->meta->make_immutable; > > The subclass doesn't see any changes made to Base after 'use Subclass' > (because > it's immutable). This is fine, but we should try to tell those people > they're > doing it wrong. > > hdp.
Is there an easy way to test this that doesn't send the world into infinite recursion? -Chris