The p6opaque Responder Interface is the default responder for all Perl 6 objects, according to the SMOP OO API.

p6opaque Structure

I use 'repr' as class keyword here to indicate that this is not a real class, but the low-level reponder interface that intercepts the calls with the '^!' prefix. Everything else should be delegated to the metaclass instance.

repr p6opaque {

has $.^!instanceof; # direct delegation of a single prototype, used by most object instances.
has $.^!WHENCE; # autovivication closure, used by autovivification
has p6opaque_proto %.^!proto_storage handles *;
has Hash of Hash %.^!instance_storage;
default ($ri, $identifier, $capture) {

$capture.invocant.^!how.dispatch($ri, $identifier, $capture);

}
bool method ^!defined {

self.^!instance_storage

}

}

repr p6opaque_proto {

has $.^!how; # the metaclass instance in use
has $.^!who; # the package implementing this prototype
has @.^!isa; # an array of other protoypes
has @.^!does; # an array of other prototypes
has %.^!storage; # prototype storage (class variables)
has %.^!attributes; # attribute definitions
has %.^!methods; # methods by name
has %.^!submethods; # submethods by name