Object - Perl 6 Object class
This file sets up the base classes and methods for Perl 6's object system.
Differences (and conflicts) between Parrot's object model and the Perl 6 model means we have to do a little name and method trickery here and there,
and this file takes care of much of that.
- onload()
- Perform initializations and create the base classes.
- Scalar()
- Default implementation gives reference type semantics,
and returns an object reference,
unless the thing already is one.
- hash()
- Return a hash representation of ourself.
- item()
- Return the scalar component of the invocant.
For most objects,
this is simply the invocant itself.
- list()
- Return the list component of the invocant.
For most (Scalar) objects,
we create a List containing the invocant.
- defined()
- Return true if the object is defined.
- Str()
- Return a string representation of the object
- increment
- Override increment in Objects to use 'succ' method.
- decrement
- Override decrement in Objects to use 'pred' method.
- new()
- Create a new object having the same class as the invocant.
- WHENCE()
- Return the invocant's auto-vivification closure.
- REJECTS(topic)
- Define REJECTS methods for objects (this would normally be part of the Pattern role,
but we put it here for now until we get roles).
- true()
- Defines the .true method on all objects via
prefix:?
.
- get_bool (vtable)
- Returns true if the object is defined,
false otherwise.
- print()
- say()
- Print the object
- WHERE
- Gets the memory address of the object.
- WHICH
- Gets the object's identity value
- 'PARROT'
- Report the object's true nature.
- !cloneattr(attrlist)
- Create a clone of self,
also cloning the attributes given by attrlist.
- WHENCE()
- Returns the protoobject's autovivification closure.
- defined()
- item()
- Returns itself in item context.
- list()
- Returns a list containing itself in list context.
- get_pmc_keyed(key) (vtable method)
- Returns a proto-object with an autovivification closure attached to it.
- !IMMUTABLE()
- !MUTABLE()
- Indicate that objects in the class are mutable or immutable.