use Carp 'confess';
use Scalar::Util 'blessed';
-our $VERSION = '0.80';
+our $VERSION = '0.82';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
return unless $self->options->{inline_constructor};
- return
- unless $self->options->{replace_constructor}
- or !$self->metaclass->has_method(
- $self->options->{constructor_name}
- );
+ unless ($self->options->{replace_constructor}
+ or !$self->metaclass->has_method(
+ $self->options->{constructor_name}
+ )) {
+ my $class = $self->metaclass->name;
+ warn "Not inlining a constructor for $class since it defines"
+ . " its own constructor.\n"
+ . "If you are certain you don't need to inline your"
+ . " constructor, specify inline_constructor => 0 in your"
+ . " call to $class->meta->make_immutable\n";
+ return;
+ }
my $constructor_class = $self->options->{constructor_class};
remove_package_symbol
/],
memoize => {
- class_precedence_list => 'ARRAY',
- compute_all_applicable_attributes => 'ARRAY',
- get_meta_instance => 'SCALAR',
- get_method_map => 'SCALAR',
+ class_precedence_list => 'ARRAY',
+ get_all_attributes => 'ARRAY',
+ get_meta_instance => 'SCALAR',
+ get_method_map => 'SCALAR',
}
});