[Catalyst-commits] r11352 - Catalyst-Runtime/5.80/trunk/lib/Catalyst
autarch at dev.catalyst.perl.org
autarch at dev.catalyst.perl.org
Fri Sep 11 02:48:32 GMT 2009
Author: autarch
Date: 2009-09-11 02:48:29 +0000 (Fri, 11 Sep 2009)
New Revision: 11352
Modified:
Catalyst-Runtime/5.80/trunk/lib/Catalyst/ClassData.pm
Log:
Preserve immutable_options when temporarily making a class mutable
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/ClassData.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/ClassData.pm 2009-09-10 16:00:18 UTC (rev 11351)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/ClassData.pm 2009-09-11 02:48:29 UTC (rev 11352)
@@ -49,13 +49,15 @@
unless $meta->isa('Class::MOP::Class');
my $was_immutable = $meta->is_immutable;
+ my %immutable_options = $meta->immutable_options;
+
$meta->make_mutable if $was_immutable;
my $alias = "_${attribute}_accessor";
$meta->add_method($alias, $accessor);
$meta->add_method($attribute, $accessor);
- $meta->make_immutable if $was_immutable;
+ $meta->make_immutable(%immutable_options) if $was_immutable;
$class->$attribute($_[2]) if(@_ > 2);
return $accessor;
More information about the Catalyst-commits
mailing list