diff options
Diffstat (limited to 'lib/Catalyst')
-rw-r--r-- | lib/Catalyst/Model/Reaction/InterfaceModel/DBIC.pm | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/Catalyst/Model/Reaction/InterfaceModel/DBIC.pm b/lib/Catalyst/Model/Reaction/InterfaceModel/DBIC.pm index bd75604..6b59e29 100644 --- a/lib/Catalyst/Model/Reaction/InterfaceModel/DBIC.pm +++ b/lib/Catalyst/Model/Reaction/InterfaceModel/DBIC.pm @@ -20,9 +20,6 @@ class DBIC, is 'Reaction::Object', is 'Catalyst::Component', which { my $im_class = $cfg{im_class}; Class::MOP::load_class($im_class); - my $model_name = $class; - $model_name =~ s/^[\w:]+::(?:Model|M):://; - #XXXthis could be cut out later for a more elegant method my @domain_models = $im_class->domain_models; confess "Unable to locate domain model in ${im_class}" @@ -33,18 +30,6 @@ class DBIC, is 'Reaction::Object', is 'Catalyst::Component', which { my $schema_class = $domain_model->_isa_metadata; Class::MOP::load_class($schema_class); - { - #I should probably MOPize this at some point maybe? nahhhh - #XXXMaybe I should just fix CRUDController and eliminate this shit period. - #pure bloat and namespace pollution - no strict 'refs'; - foreach my $collection ( $im_class->parameter_attributes ){ - my $classname = join '::', $class, $collection->name, 'ACCEPT_CONTEXT'; - my $reader = $collection->get_read_method; - *$classname = sub{ $_[1]->model($model_name)->$reader }; - } - } - my $params = $cfg{db_params} || {}; my $schema = $schema_class ->connect($cfg{db_dsn}, $cfg{db_user}, $cfg{db_password}, $params); |