use Carp 'confess';
use Scalar::Util 'blessed', 'weaken', 'looks_like_number';
-our $VERSION = '0.78';
+our $VERSION = '0.79';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
$source .= "\n" . 'my $instance = ' . $self->meta_instance->inline_create_instance('$class');
$source .= ";\n" . (join ";\n" => map {
$self->_generate_slot_initializer($_, $close_over)
- } 0 .. (@{$self->attributes} - 1));
+ } @{$self->attributes});
$source .= ";\n" . 'return $instance';
$source .= ";\n" . '}';
warn $source if $self->options->{debug};
sub _generate_slot_initializer {
my $self = shift;
- my $index = shift;
+ my $attr = shift;
my $close = shift;
- my $attr = $self->attributes->[$index];
-
my $default;
if ($attr->has_default) {
# NOTE:
This returns the L<Class::MOP::Class> object for the method.
-=item B<< $metamethod->is_inline >>
-
-Returns a boolean indicating whether or not the constructor is
-inlined.
-
=item B<< $metamethod->can_be_inlined >>
This method always returns true in this class. It exists so that