Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

With Variable::Magic 0.51 we can now remove the magic after inflating…

… stub objects
  • Loading branch information...
commit 2fc0e773e2de0997b94e45a67deb3949a28f8ed2 1 parent ba0f2dd
@clintongormley authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/Elastic/Model/Meta/Class/Doc.pm
View
4 lib/Elastic/Model/Meta/Class/Doc.pm
@@ -5,7 +5,7 @@ use Moose::Role;
use MooseX::Types::Moose qw(Maybe HashRef);
use Carp;
use namespace::autoclean;
-use Variable::Magic qw(cast wizard);
+use Variable::Magic 0.51 qw(cast wizard dispell);
my $wiz = wizard( map { $_ => \&_inflate } qw(fetch store exists delete) );
my %exclude = map { $_ => 1 } qw(uid _can_inflate _source);
@@ -69,6 +69,8 @@ sub _inflate {
#===================================
my ( $obj, undef, $key ) = @_;
return if $exclude{ $key || '' };
+
+ dispell %$obj, $wiz;
$obj->_inflate_doc if $obj->{_can_inflate};
}
Please sign in to comment.
Something went wrong with that request. Please try again.