Permalink
Browse files

Model metaclass attributes were being initialized from the same hashref,

meaning that data (eg types in a namespace) were shared between
independent models.

Closes #25
  • Loading branch information...
clintongormley committed Nov 17, 2012
1 parent bdf4d3d commit ce5fcb419bd9046b8e1dfd13be31a1472b5e988f
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Elastic/Model/Meta/Class/Model.pm
@@ -21,7 +21,7 @@ for my $k (qw(namespace char_filter analyzer filter tokenizer)) {
is => 'ro',
traits => ['Hash'],
isa => HashRef,
- default => sub { \%default },
+ default => sub { +{%default} },
handles => {
$k => 'get',
"add_${k}" => 'set',

0 comments on commit ce5fcb4

Please sign in to comment.