use strict;
use warnings;
+use lib 't/lib';
+
use Moose ();
use Moose::Util::TypeConstraints;
+use NoInlineAttribute;
use Test::Exception;
use Test::More;
use Test::Moose;
superclasses => ['Moose::Object'],
);
+ my @traits = 'Number';
+ push @traits, 'NoInlineAttribute'
+ if delete $attr{no_inline};
+
$class->add_attribute(
integer => (
- traits => ['Number'],
+ traits => \@traits,
is => 'ro',
isa => 'Int',
default => 5,
run_tests(build_class);
run_tests( build_class( lazy => 1 ) );
run_tests( build_class( trigger => sub { } ) );
+ run_tests( build_class( no_inline => 1 ) );
# Will force the inlining code to check the entire hashref when it is modified.
subtype 'MyInt', as 'Int', where { 1 };