extends 'Foo';
- ::ok ! ::exception { has '+foo' => (is => 'rw') }, "can override is";
- ::like ::exception { has '+foo' => (reader => 'bar') }, qr/illegal/, "can't override reader";
- ::ok ! ::exception { has '+foo' => (clearer => 'baz') }, "can override unspecified things";
+ ::is( ::exception { has '+foo' => (is => 'rw') }, undef, "can override is" );
+ ::like( ::exception { has '+foo' => (reader => 'bar') }, qr/illegal/, "can't override reader" );
+ ::is( ::exception { has '+foo' => (clearer => 'baz') }, undef, "can override unspecified things" );
- ::like ::exception { has '+bar' => (clearer => 'quux') }, qr/illegal/, "can't override clearer";
- ::ok ! ::exception { has '+bar' => (predicate => 'has_bar') }, "can override unspecified things";
+ ::like( ::exception { has '+bar' => (clearer => 'quux') }, qr/illegal/, "can't override clearer" );
+ ::is( ::exception { has '+bar' => (predicate => 'has_bar') }, undef, "can override unspecified things" );
}
{
package Bar;
use Moose;
- ::ok ! ::exception {
+ ::is( ::exception {
has bar => (
traits => ['Bar::Meta::Attribute'],
my_illegal_option => 'FOO',
is => 'bare',
);
- }, "can use illegal options";
+ }, undef, "can use illegal options" );
has baz => (
traits => ['Bar::Meta::Attribute'],
extends 'Bar';
- ::like ::exception { has '+bar' => (my_illegal_option => 'BAR') },
- qr/illegal/,
- "can't override illegal attribute";
- ::ok ! ::exception { has '+baz' => (my_illegal_option => 'BAR') },
- "can add illegal option if superclass doesn't set it";
+ ::like( ::exception { has '+bar' => (my_illegal_option => 'BAR') }, qr/illegal/, "can't override illegal attribute" );
+ ::is( ::exception { has '+baz' => (my_illegal_option => 'BAR') }, undef, "can add illegal option if superclass doesn't set it" );
}
my $bar_attr = Bar->meta->get_attribute('bar');