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)

Attachments


Subject: Parametrized type constraints don't call their "where" clause anymore
Download (untitled) / with headers
text/plain 668b
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 ]);
Download (untitled) / with headers
text/plain 164b
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


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.