in reply to 'can' operator?
The overload pragmatic provides a couple of functions you can use for that.
- overload::Overloaded('$foo+1') takes a perl expression as a string and tells you whether any of its operators are overloaded in the context of that expression.
- overload::Method($obj,'+') returns a code reference to the method overloading '+' for $obj, or undef if not overloaded.
After Compline,
Zaxo
In Section
Seekers of Perl Wisdom