Skip Menu |

This queue is for tickets about the MooseX-ClassAttribute CPAN distribution.

Report information
The Basics
Id: 75722
Status: new
Priority: 0/
Queue: MooseX-ClassAttribute

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

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



Subject: type constraints not checked
It doesn't appear that type constraints are checked for class attributes. Consider: use strict; use warnings; { package Foo; use Moose; use MooseX::ClassAttribute; class_has attr => ( is => 'ro', isa => 'Int', default => 'not an int' ); } my $obj = Foo->new; print $obj->attr, "\n"; __END__ not an int $attr->get_value should not succeed, as the default value clearly does match the type constraint. The correct behaviour does occur when the attribute is lazy.