From: Shawn M Moore Date: Fri, 27 Jun 2008 04:27:46 +0000 (+0000) Subject: Better error message for clone_instance("not a blessed value") X-Git-Tag: 0_64~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bd1cc5cd3954be194ede44e50dfc7cb61bf6d3f6;p=gitmo%2FClass-MOP.git Better error message for clone_instance("not a blessed value") --- diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index 050189b..75b7ce0 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -420,7 +420,7 @@ sub clone_object { sub clone_instance { my ($class, $instance, %params) = @_; (blessed($instance)) - || confess "You can only clone instances, \$self is not a blessed instance"; + || confess "You can only clone instances, ($instance) is not a blessed instance"; my $meta_instance = $class->get_meta_instance(); my $clone = $meta_instance->clone_instance($instance); foreach my $attr ($class->compute_all_applicable_attributes()) {