From: Yuval Kogman Date: Thu, 22 Jun 2006 15:34:43 +0000 (+0000) Subject: foreach my $key ( keys %params ), not foreach my $key ( %params ) X-Git-Tag: 0_29_02~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=11977e431ab62b843cf1f4749b2e27b9a212cd4d;p=gitmo%2FClass-MOP.git foreach my $key ( keys %params ), not foreach my $key ( %params ) --- diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index 8287fb2..b546b82 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -259,7 +259,7 @@ sub clone_instance { || confess "You can only clone instances, \$self is not a blessed instance"; my $meta_instance = $class->get_meta_instance(); my $clone = $meta_instance->clone_instance($instance); - foreach my $key (%params) { + foreach my $key (keys %params) { next unless $meta_instance->is_valid_slot($key); $meta_instance->set_slot_value($clone, $key, $params{$key}); }