small tweaks to meta method docs
[gitmo/Class-MOP.git] / lib / Class / MOP / Instance.pm
index 3a34042..853081b 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use Scalar::Util 'weaken', 'blessed';
 
-our $VERSION   = '0.71_01';
+our $VERSION   = '0.78';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -154,7 +154,9 @@ sub strengthen_slot_value {
 
 sub rebless_instance_structure {
     my ($self, $instance, $metaclass) = @_;
-    bless $instance, $metaclass->name;
+
+    # we use $_[1] here because of t/306_rebless_overload.t regressions on 5.8.8
+    bless $_[1], $metaclass->name;
 }
 
 sub is_dependent_on_superclasses {
@@ -172,7 +174,7 @@ sub inline_create_instance {
 
 sub inline_slot_access {
     my ($self, $instance, $slot_name) = @_;
-    sprintf "%s->{%s}", $instance, $slot_name;
+    sprintf q[%s->{"%s"}], $instance, quotemeta($slot_name);
 }
 
 sub inline_get_slot_value {
@@ -386,7 +388,7 @@ Stevan Little E<lt>stevan@iinteractive.comE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2006-2008 by Infinity Interactive, Inc.
+Copyright 2006-2009 by Infinity Interactive, Inc.
 
 L<http://www.iinteractive.com>