Object::Relation::Meta::Method - Object::Relation object method introspection
# 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); }
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.
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.
delegates_to
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.
delegates_to()
acts_as()
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.
To install Object::Relation, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Object::Relation
CPAN shell
perl -MCPAN -e shell install Object::Relation
For more information on module installation, please visit the detailed CPAN module installation guide.