applications.
- Remove use of Test::MockObject as it doesn't install from CPAN
in some environments.
+ - Remove use of dclone to deep copy configs and replace with
+ Catalyst::Utils::merge_hashes which has the same effect, of
+ ensuring child classes don't inherit their parent's config,
+ except works correctly with closures.
5.80005 2009-06-06 14:40:00
use MRO::Compat;
use mro 'c3';
use Scalar::Util 'blessed';
-use Storable 'dclone';
use namespace::clean -except => 'meta';
with 'MooseX::Emulate::Class::Accessor::Fast';
my $class = blessed($self) || $self;
my $meta = Class::MOP::get_metaclass_by_name($class);
unless ($meta->has_package_symbol('$_config')) {
- $self->_config( dclone $config );
+ # Call merge_hashes to ensure we deep copy the parent
+ # config onto the subclass
+ $self->_config( Catalyst::Utils::merge_hashes($config, {}) );
}
}
return $self->_config;