Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Mouse CPAN distribution.

Report information
The Basics
Id: 61852
Status: resolved
Priority: 0/
Queue: Mouse

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

Bug Information
Severity: Important
Broken in: 0.72
Fixed in: (no value)



Subject: Parametrized type constraints don't call their "where" clause anymore
The following piece of code ######################################### use strict; use warnings; { package X; use Mouse; use Mouse::Util::TypeConstraints; subtype 'List' => as 'ArrayRef[Any]' => where { die "whoops" }; has 'list' => ( is => 'ro', isa => 'List', ); } X->new(list => [ 1 ]); ######################################### stopped calling the "where" clause (thus stopped throwing an exception) during versions 0.71 and 0.72. More precisely, I bisected 5a592ad728880fb6a21e9610cbfeb1670f2053ab to be the first wrong commit. If 'ArrayRef[Any]' is replaced by a simple 'ArrayRef', the code behaves correctly. Regards, Vincent Pit.
Subject: param_type_constraint_where_bug.pl
use strict; use warnings; { package X; use Mouse; use Mouse::Util::TypeConstraints; subtype 'List' => as 'ArrayRef[Any]' => where { die "whoops" }; has 'list' => ( is => 'ro', isa => 'List', ); } X->new(list => [ 1 ]);
Hi, Vincent. Thanks. I have released Mouse 0.78 with the bug fix, although the tests are not perfect. Complex parameterized types might need more tests... --- gfx