1Object::Pad::MOP::Slot(U3s)er Contributed Perl DocumentatOibojnect::Pad::MOP::Slot(3)
2
3
4
6 "Object::Pad::MOP::Slot" - meta-object representation of data slot of a
7 "Object::Pad" class
8
10 Instances of this class represent a data slot of a class implemented by
11 Object::Pad. Accessors provide information about the slot. The special
12 "value" method allows access to the value of the given slot on
13 instances of its class, letting the meta-object be used as a proxy to
14 it.
15
16 This API should be considered experimental even within the overall
17 context in which "Object::Pad" is expermental.
18
20 name
21 $name = $metaslot->name
22
23 Returns the name of the slot, as a plain string including the leading
24 sigil character.
25
26 class
27 $metaclass = $metaslot->class
28
29 Returns the Object::Pad::MOP::Class instance representing the class of
30 which this slot is a member.
31
32 value
33 $current = $metaslot->value( $instance )
34 @current = $metaslot->value( $instance )
35 %current = $metaslot->value( $instance )
36
37 An accessor method which returns the current value of the slot from an
38 object instance.
39
40 $metaslot->value( $instance ) = $new
41
42 On scalar slots, this method can also act as an lvalue mutator allowing
43 a new value to be set.
44
46 Paul Evans <leonerd@leonerd.org.uk>
47
48
49
50perl v5.34.0 2021-10-08 Object::Pad::MOP::Slot(3)