12 is_deeply([Foo->meta->get_overload_list], []);
13 is_deeply([Foo->meta->get_overloaded_operators], []);
18 BEGIN { $plus_impl = sub { $plus = 1; $_[0] + $_[1] } }
20 package Foo::Overloaded;
22 use overload '+' => $plus_impl;
26 is_deeply([Foo::Overloaded->meta->get_overloaded_operators], ['+']);
27 my @overloads = Foo::Overloaded->meta->get_overload_list;
28 is(scalar(@overloads), 1);
29 my $plus_meth = $overloads[0];
30 isa_ok($plus_meth, 'Class::MOP::Method::Overload');
31 is($plus_meth->operator, '+');
32 is($plus_meth->name, '(+');
33 is($plus_meth->body, $plus_impl);
34 is($plus_meth->package_name, 'Foo::Overloaded');
35 is($plus_meth->associated_metaclass, Foo::Overloaded->meta);