use Catalyst::Utils ();
use MooseX::Types::LoadableClass qw/ LoadableClass /;
use Catalyst::BlockInjection;
+use namespace::autoclean;
extends 'Bread::Board::Container';
+# FIXME - Why do any of these attributes need to be rw?
has config_local_suffix => (
is => 'rw',
isa => 'Str',
isa => LoadableClass,
is => 'ro',
coerce => 1,
- default => 'Bread::Board::Container',
+ default => 'Catalyst::SubContainer',
+ handles => {
+ new_sub_container => 'new',
+ }
);
sub BUILD {
sub build_model_subcontainer {
my $self = shift;
- return $self->sub_container_class->new( name => 'model' );
+ return $self->new_sub_container( name => 'model' );
}
sub build_view_subcontainer {
my $self = shift;
- return $self->sub_container_class->new( name => 'view' );
+ return $self->new_sub_container( name => 'view' );
}
sub build_controller_subcontainer {
my $self = shift;
- return $self->sub_container_class->new( name => 'controller' );
+ return $self->new_sub_container( name => 'controller' );
}
sub build_name_service {
return $arg;
}
-sub get_component {
- my ( $self, $type, $name, $args ) = @_;
- return $self->get_sub_container($type)->resolve( service => $name, parameters => { context => $args } );
-}
-
1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+Catalyst::Container - IOC for Catalyst components
+
+=head1 METHODS
+
+=head2 build_model_subcontainer
+
+=head2 build_view_subcontainer
+
+=head2 build_controller_subcontainer
+
+=head2 build_name_service
+
+=head2 build_driver_service
+
+=head2 build_file_service
+
+=head2 build_substitutions_service
+
+=head2 build_extensions_service
+
+=head2 build_prefix_service
+
+=head2 build_path_service
+
+=head2 build_config_service
+
+=head2 build_raw_config_service
+
+=head2 build_global_files_service
+
+=head2 build_local_files_service
+
+=head2 build_global_config_service
+
+=head2 build_local_config_service
+
+=head2 build_config_path_service
+
+=head2 build_config_local_suffix_service
+
+=head2 _fix_syntax
+
+=head2 _config_substitutions
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify it under
+the same terms as Perl itself.
+
+=cut