Skip Menu |

This queue is for tickets about the Class-MOP CPAN distribution.

Report information
The Basics
Id: 48837
Status: resolved
Priority: 0/
Queue: Class-MOP

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

Bug Information
Severity: Normal
Broken in: 0.92
Fixed in: (no value)



Subject: Possible documentation Bug in POD of Class::MOP::Attribute
Hi. In the POD for the initializer section: === The initializer is called as a method with three arguments. The first is the value that was passed to the constructor. The second is a subroutine reference that can be called to actually set the attribute's value, and the last is the associated Class::MOP::Attribute object. === The code example below reads: === Class::MOP::Attribute->new( 'doubled' => ( initializer => sub { my ( $instance, $value, $set ) = @_; $set->( $value * 2 ); }, ) ); === I suspect that the order mentioned in the first pasted section is incorrect. It should be: === The initializer is called as a method with three arguments. The first is the associated Class::MOP::Attribute object. The second is the value that was passed to the constructor, and the last is a subroutine reference that can be called to actually set the attribute's value. === Kind regards, Florian
Actually, the POD is correct. I think you may be confused because it's called as a method. I'm resolving this ticket. Please do not respond directly, or it will be re-opened. -dave