tobyink/p5-lexical-accessor — pull request #1 by latk (2014-10-09 22:35:43+00:00)
Title: make lexical_has return value work as shown in synopsis

The [`Lexical::Accessor` docs](https://metacpan.org/pod/Lexical::Accessor) have this example in the synopsis:

``` perl
my $accessor = lexical_has identifier => (
is => 'rw',
isa => Int,
default => sub { 0 },
);

# later...
say $self->$accessor;
```

To my surprise, it didn't work, because the return value actually was a *reference* to a coderef. This pull request fixes that by returning proper coderefs, and adds a few basic tests to ensure the proper coderef was returned.

I'm not sure where your distribution would list contributors. Should you merge & release this pull request, please add the information yourself. I am “Lukas Atkinson (cpan:AMON)”.

Anyway, thanks for writing great modules such as this one!