# New Ticket Created by curtis_ovid_...@yahoo.com # Please include the string: [perl #127209] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=127209 >
This code: class Foo { subset Limit of Rat where -10 .. 10; has Limit $.x is rw }; Foo.new( x => 15.0 ); Produces the following error: Type check failed in assignment to $!x; expected Foo::Limit but got Rat As a dev, I would like to know that it's the constraint that failed, but the code implies that a Rat is wrong (which is correct, but misleading to me). Best,Ovid-- IT consulting, training, specializing in Perl, databases, and agile developmenthttp://www.allaroundtheworld.fr/. Buy my book! - http://bit.ly/beginning_perl