X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=examples%2FArrayBasedStorage.pod;h=1c235055e8bf6e81b51032b9000b4f96fde57661;hb=81c8a65bf02bb1b0e240d8f5b626b0ceabf9a37c;hp=bc5a19b9ddc87008b65f79c58db7b8dc835667d3;hpb=fdbdb5e6eb0e4f6c54629f0bde376aba5e69df14;p=gitmo%2FClass-MOP.git diff --git a/examples/ArrayBasedStorage.pod b/examples/ArrayBasedStorage.pod index bc5a19b..1c23505 100644 --- a/examples/ArrayBasedStorage.pod +++ b/examples/ArrayBasedStorage.pod @@ -15,7 +15,7 @@ sub new { my ($class, $meta, @attrs) = @_; my $self = $class->SUPER::new($meta, @attrs); my $index = 0; - $self->{slot_index_map} = { map { $_ => $index++ } $self->get_all_slots }; + $self->{'%!slot_index_map'} = { map { $_ => $index++ } $self->get_all_slots }; return $self; } @@ -31,7 +31,7 @@ sub clone_instance { # operations on meta instance -sub get_slot_index_map { (shift)->{slot_index_map} } +sub get_slot_index_map { (shift)->{'%!slot_index_map'} } sub get_all_slots { my $self = shift; @@ -40,12 +40,12 @@ sub get_all_slots { sub get_slot_value { my ($self, $instance, $slot_name) = @_; - return $instance->[ $self->{slot_index_map}->{$slot_name} ]; + return $instance->[ $self->{'%!slot_index_map'}->{$slot_name} ]; } sub set_slot_value { my ($self, $instance, $slot_name, $value) = @_; - $instance->[ $self->{slot_index_map}->{$slot_name} ] = $value; + $instance->[ $self->{'%!slot_index_map'}->{$slot_name} ] = $value; } sub is_slot_initialized {