Operator overloading in Moose
[email protected] (Faelin McCaley Landy) Sat, 15 Jun 2013 02:23:30 -0400
| Newsgroups | perl.moose |
|---|---|
| Message-ID | <CALciv9FdMQ4NVJY_352V4-k4T4pJsEpUy8ewiHvrxb-XA=t0Qw@mail.gmail.com> |
Hi there, More questions! I'm trying to implement both increment/decrement operators and equality operators in Moose (using "++" / "--" and "=="), but my objects don't seem to respond at all to the use overload '==', ... pragma, or either of the other two relevant ones. I even tried copying lines out of the Moose::Cookbook::Basics::Genome_OverloadingSubtypesAndCoercion<https://metacpan.org/module/ETHER/Moose-2.0802/lib/Moose/Cookbook/Basics/Genome_OverloadingSubtypesAndCoercion.pod>, to no avail! Do I have to start messing around with Class::MOP::Method::Overload<https://metacpan.org/module/ETHER/Moose-2.0802/lib/Class/MOP/Method/Overload.pm>? I distinctly hope not; that's a can of worms that I don't really want to pry open... Thanks for all your help, Faelin