From: Jesse Luehrs Date: Thu, 21 Apr 2011 01:35:03 +0000 (-0500) Subject: compare references with == rather than eq X-Git-Tag: 2.0100~63 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=92efe680e120e70b2b6e4aba277bd70ca64f05e5;p=gitmo%2FMoose.git compare references with == rather than eq --- diff --git a/lib/Moose/Meta/TypeConstraint.pm b/lib/Moose/Meta/TypeConstraint.pm index 2347c79..1ce53c0 100644 --- a/lib/Moose/Meta/TypeConstraint.pm +++ b/lib/Moose/Meta/TypeConstraint.pm @@ -131,7 +131,7 @@ sub validate { sub has_inlined_type_constraint { my $self = shift; - if ( $self->has_parent && $self->constraint eq $null_constraint ) { + if ( $self->has_parent && $self->constraint == $null_constraint ) { return $self->parent->has_inlined_type_constraint; } @@ -146,7 +146,7 @@ sub _inline_check { Moose->throw_error( 'Cannot inline a type constraint check for ' . $self->name ); } - if ( $self->has_parent && $self->constraint eq $null_constraint ) { + if ( $self->has_parent && $self->constraint == $null_constraint ) { return $self->parent->_inline_check(@_); }