Greetings
As a continuation of my previous question about Moose, I ran into a new problem. I have a Moose class that uses recipe 12 to extend the parent class without Moose. Here it is:
package MyApp::CGI;
use Moose;
extends 'CGI::Application';
sub new {
my $class = shift;
my $obj = $class->SUPER::new( @_ );
return $class->meta->new_object( __INSTANCE__ => $obj, @_ );
}
sub setup {
my $self = shift;
$self->start_mode( 'main' );
my @methods = map { $_->name } $self->meta->get_all_methods;
$self->run_modes( map { /^rm_(.+)$/ => $_ }
grep { /^rm_/ }
@methods
);
}
This works great. I also have a subclass of this class that uses MooseX::Declare. However, since I am now overriding the default Moose constructor, my subclass throws this warning:
Not inlining 'new' for MyApp::CGI::Login since it is not inheriting the default Moose::Object::new
If you are certain you don't need to inline your constructor, specify inline_constructor => 0 in your call to MyApp::CGI::Login->meta->make_immutable
Since it MooseX::Declareautomatically calls make_immutablebackstage, I could not figure out how to get it to turn on the parameter inline_constructor => 0.