'metaclass' => $metaclass,
'options' => $options,
'immutable_metaclass' => undef,
- 'inlined_constructor' => 0,
+ 'inlined_constructor' => undef,
);
return $self;
if ( $options->{replace_constructor} or $constructor->can_be_inlined ) {
$metaclass->add_method( $options->{constructor_name} => $constructor );
- $self->{inlined_constructor} = 1;
+ $self->{inlined_constructor} = $constructor;
}
}
if ( blessed($immutable->get_method($options{constructor_name})) eq $constructor_class ) {
$immutable->remove_method( $options{constructor_name} );
- $self->{inlined_constructor} = 0;
+ $self->{inlined_constructor} = undef;
}
}
}
=item B<inlined_constructor>
+If the constructor was inlined, this returns the constructor method
+object that was created to do this.
+
=back
=head1 AUTHORS