![]() |
![]()
| ![]() |
![]()
NAMEClass::MOP::Overload - Overload Meta Object VERSIONversion 2.2207 SYNOPSISmy $meta = Class->meta; my $overload = $meta->get_overloaded_operator('+'); if ( $overload->has_method_name ) { print 'Method for + is ', $overload->method_name, "\n"; } else { print 'Overloading for + is implemented by ', $overload->coderef_name, " sub\n"; } DESCRIPTIONThis class provides meta information for overloading in classes and roles. INHERITANCE"Class::MOP::Overload" is a subclass of Class::MOP::Object. METHODSClass::MOP::Overload->new(%options)This method creates a new "Class::MOP::Overload" object. It accepts a number of options:
$overload->operatorReturns the operator for this overload object. $overload->method_nameReturns the method name that implements overloading, if it has one. $overload->has_method_nameReturns true if the object has a method name. $overload->methodReturns the Class::MOP::Method that implements overloading, if it has one. $overload->has_methodReturns true if the object has a method. $overload->coderefReturns the coderef that implements overloading, if it has one. $overload->has_coderefReturns true if the object has a coderef. $overload->coderef_packageReturns the package for the coderef that implements overloading, if it has one. $overload->has_coderefReturns true if the object has a coderef package. $overload->coderef_nameReturns the sub name for the coderef that implements overloading, if it has one. $overload->has_coderef_nameReturns true if the object has a coderef name. $overload->is_anonymousReturns true if the overloading is implemented by an anonymous coderef. $overload->associated_metaclassReturns the Class::MOP::Module (class or role) that is associated with the overload object. $overload->cloneClones the overloading object, setting "original_overload" in the process. $overload->original_overloadFor cloned objects, this returns the Class::MOP::Overload object from which they were cloned. This can be used to determine the source of an overloading in a class that came from a role, for example. AUTHORS
COPYRIGHT AND LICENSEThis software is copyright (c) 2006 by Infinity Interactive, Inc. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
|