Perl 6
SMOP OO API: Revision 3
In order to ensure the interoperability among object representations and even between different object systems that uses the same representation. In this context we need to define the HOW and REPR API, this is the SMOP OO API that allows representations to be interchanged, and custom BUILD methods to be written.

^ Object API

This is what is implemented by Object

method new($prototype: *@protoobjects, *%initialize) {...};
method bless($prototype: $candidate?, *@protoobjects, *%initialize) {...};
submethod CREATE($prototype: :$repr) {...};
submethod BUILDALL($object: *@protoobjects, *%initialize) {...};
submethod BUILD($object: *@protoobjects, *%initialize) {...};


This is the instrospection API, that is available as standard Perl 6 and modify the current object.
method ^methods($object: ) {...};
method ^add_method($object: $name, $method) {...};
method ^add_isa($object: $superclass) {...};
method ^add_role($object: $role) {...};


This is SMOP specific, and it isn't part of the standard Perl 6, however, this is how different representations can coexist in SMOP. This only operates in the specific object, it doesn't look to any of the superclasses, that might even have a different representation.

sub CREATE() {...};
sub bless($object, $direct_prototype) {...};
sub add_isa($object, $new_superclass) {...};
sub del_isa($object, $unwanted_superclass) {...};
sub add_role($object, $new_role) {...};
sub del_role($object, $unwanted_role) {...};
sub add_private_storage($object, $prototype, $name, $container) {...};
sub get_private_storage($object, $prototype, $name) {...};
sub del_private_storage($object, $prototype) {...};
sub add_class_storage($prototype, $name, $container) {...};
sub get_class_storage($prototype, $name) {...};
sub del_class_storage($prototype, $name) {...};
sub add_method_definition($object, $name, $method) {...};
sub get_method_definition($object, $name) {...};
sub del_method_definition($object, $name) {...};
sub add_attribute_definition($prototype, $name, $signature) {...};
sub get_attribute_definition($prototype, $name) {...};
sub del_attribute_definition($prototype, $name) {...};

Upload Files

Click "Browse" to find the file you want to upload. When you click "Upload file" your file will be uploaded and added to the list of attachments for this page.

Maximum file size: 50MB

File Name Author Date Uploaded Size

Save Page As

Enter a meaningful and distinctive title for your page.

Page Title:

Tip: You'll be able to find this page later by using the title you choose.

Page Already Exists

There is already a page named XXX. Would you like to:

Save with a different name:

Save the page with the name "XXX"

Append your text to the bottom of the existing page named: "XXX"

Upload Files

Click "Browse" to find the file you want to upload. When you click "Add file" this file will be added to the list of attachments for this page, and uploaded when you save the page.

Add Tags

Enter a tag and click "Add tag". The tag will be saved when you save the page.