Remove application_name attr
[catagits/Catalyst-Runtime.git] / lib / Catalyst / IOC / Container.pm
index 2cbc1cb..31dd7d6 100644 (file)
@@ -1,5 +1,5 @@
 package Catalyst::IOC::Container;
-use Bread::Board;
+use Bread::Board qw/depends_on/;
 use Moose;
 use Config::Any;
 use Data::Visitor::Callback;
@@ -41,12 +41,6 @@ has substitutions => (
     default => sub { +{} },
 );
 
-has application_name => (
-    is       => 'ro',
-    isa      => 'Str',
-    required => 1,
-);
-
 has sub_container_class => (
     isa     => LoadableClass,
     is      => 'ro',
@@ -167,7 +161,6 @@ sub build_home_service {
             }
 
             $home ||= Catalyst::Utils::home($class);
-#            $class->config(home => $home); # FIXME - Needed to make path_to work.
             return $home;
         },
         dependencies => [ depends_on('application_name') ],
@@ -193,7 +186,7 @@ sub build_root_service {
 sub build_application_name_service {
     my $self = shift;
 
-    return Bread::Board::Literal->new( name => 'application_name', value => $self->application_name );
+    return Bread::Board::Literal->new( name => 'application_name', value => $self->name );
 }
 
 sub build_driver_service {
@@ -766,6 +759,8 @@ sub expand_component_module {
     return Devel::InnerPackage::list_packages( $module );
 }
 
+__PACKAGE__->meta->make_immutable;
+
 1;
 
 __END__