use Carp 'confess';
use Scalar::Util 'blessed', 'weaken', 'looks_like_number';
-our $VERSION = '0.08';
+our $VERSION = '0.09';
our $AUTHORITY = 'cpan:STEVAN';
use base 'Moose::Meta::Method',
('$type_constraints[' . $index . ']'),
'$val'
) if ($is_moose && $attr->has_type_constraint);
+
push @source => $self->_generate_slot_assignment($attr, '$val', $index);
- push @source => '}'; # close - wrap this to avoid my $val overwrite warnings
+ push @source => '}'; # close - wrap this to avoid my $val overrite warnings
push @source => "}" if defined $attr->init_arg;
}
use strict;
use warnings;
-use Test::More tests => 2;
+use Test::More tests => 3;
+
+BEGIN {
+ use_ok('Moose');
+}
{
package Foo;
has foo => (
is => 'rw',
isa => 'Str',
- default => sub { use Devel::StackTrace; warn Devel::StackTrace->new;$foo_default_called++; 'foo' },
+ default => sub { $foo_default_called++; 'foo' },
);
our $bar_default_called = 0;