Don't rely on hash order in tests (RT#81564)
[gitmo/MooseX-AttributeHelpers.git] / TODO
CommitLineData
735d5df8 1
2Add a &reverse_method_lookup to MooseX::AttributeHelpers::Base which
3given a name of a providable method will return the method name chosen
4by the consumer of the module. Something like this.
5
6has +method => (default => sub {
7 return +{
8 'foo' => sub {
9 my ($attr, $reader, $writer) = @_;
10 my $bar_method_name = $attr->reverse_method_lookup('bar');
11 return sub {
12 $_[0]->$bar_method_name()
13 }
14 },
15 'bar' => sub {
16 ...
17 }
18 }
19})
20