2 package Class::MOP::Instance;
8 use Scalar::Util 'blessed', 'reftype', 'weaken';
10 our $VERSION = '0.01';
13 require Class::MOP::Class;
14 Class::MOP::Class->initialize(blessed($_[0]) || $_[0]);
21 instance => (bless {} => $meta->name)
26 my ($self, $slot_name, $value) = @_;
27 return $self->{instance}->{$slot_name} = $value;
31 my ($self, $slot_name) = @_;
32 exists $self->{instance}->{$slot_name} ? 1 : 0;
36 my ($self, $slot_name) = @_;
37 return $self->{instance}->{$slot_name};
40 *set_slot_value = \&add_slot;
42 sub get_instance { (shift)->{instance} }
52 Class::MOP::Instance - Instance Meta Object
68 =item B<get_slot_value>
70 =item B<set_slot_value>
82 This will return a B<Class::MOP::Class> instance which is related
89 Stevan Little E<lt>stevan@iinteractive.comE<gt>
91 =head1 COPYRIGHT AND LICENSE
93 Copyright 2006 by Infinity Interactive, Inc.
95 L<http://www.iinteractive.com>
97 This library is free software; you can redistribute it and/or modify
98 it under the same terms as Perl itself.