Name
Object::Relation::Meta::Method - Object::Relation object method introspection
Synopsis
# Assuming MyThingy was generated by Object::Relation::Meta.
my $class = MyThingy->my_class;
my $thingy = MyThingy->new;
print "\nMethods:\n";
for my $meth ($class->methods) {
print " o ", $meth->name, $/;
$meth->call($thingy);
}
Description
This class inherits from Class::Meta::Method to provide method metadata for Object::Relation classes. See the Class::Meta documentation for details on meta classes. See the "Instance Interface" section for the attributes added to Object::Relation::Meta::Method in addition to those defined by Class::Meta::Method.
Instance Interface
Accessor Methods
delegates_to
my $delegates_to = $meth->delegates_to;
If the method transparently delegates to an object of another class, this method will return the Object::Relation::Meta::Class object describing that class. This method is implicitly set by Object::Relation::Meta for classes that either extend or mediate another class, or are a type of another class. In those cases, Object::Relation::Meta will create extra methods to delegate to the methods of the referenced or extended classes, and those methods will have their delegates_to
methods set accordingly.
acts_as
my $acts_as = $meth->acts_as;
If delegates_to()
returns a Object::Relation::Meta::Class object representing the class of object to which the method delegates, acts_as()
returns the Object::Relation::Meta::Method object to which this method corresponds. That is, this method acts as the method returned here.
Copyright and License
Copyright (c) 2004-2006 Kineticode, Inc. <info@obj_relode.com>
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.