From: Jesse Luehrs Date: Wed, 18 Aug 2010 16:59:53 +0000 (-0500) Subject: actually, there's no reason that overriding 'is' is unsafe X-Git-Tag: 1.11~14 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d21262bd42c2539c47e5d41e7506710ecd27ad65;p=gitmo%2FMoose.git actually, there's no reason that overriding 'is' is unsafe --- diff --git a/lib/Moose/Meta/Attribute.pm b/lib/Moose/Meta/Attribute.pm index c0193d9..cd7d417 100644 --- a/lib/Moose/Meta/Attribute.pm +++ b/lib/Moose/Meta/Attribute.pm @@ -134,7 +134,7 @@ sub interpolate_class { # method-generating options shouldn't be overridden sub illegal_options_for_inheritance { - qw(is reader writer accessor clearer predicate) + qw(reader writer accessor clearer predicate) } # NOTE/TODO diff --git a/t/020_attributes/022_illegal_options_for_inheritance.t b/t/020_attributes/022_illegal_options_for_inheritance.t index 7448813..fdf6276 100644 --- a/t/020_attributes/022_illegal_options_for_inheritance.t +++ b/t/020_attributes/022_illegal_options_for_inheritance.t @@ -24,7 +24,7 @@ use Test::Exception; extends 'Foo'; - ::throws_ok { has '+foo' => (is => 'rw') } qr/illegal/, "can't override is"; + ::lives_ok { has '+foo' => (is => 'rw') } "can override is"; ::throws_ok { has '+foo' => (reader => 'bar') } qr/illegal/, "can't override reader"; ::lives_ok { has '+foo' => (clearer => 'baz') } "can override unspecified things";