Skip Menu |

This queue is for tickets about the Lexical-Accessor CPAN distribution.

Report information
The Basics
Id: 101559
Status: resolved
Priority: 0/
Queue: Lexical-Accessor

People
Owner: Nobody in particular
Requestors: AMON [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.008
Fixed in: 0.009



Subject: Code in Synopsis does not work
The `Lexical::Accessor` docs have this example in the synopsis: 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 of `lexical_has` actually was a reference to a coderef rather than a coderef. This GitHub pull request[1] fixes that by returning proper coderefs, and adds a few basic tests to ensure the proper coderef was returned. [1]: https://github.com/tobyink/p5-lexical-accessor/pull/1