From c689b58e5038a591091020f85a67715460d3b3e7 Mon Sep 17 00:00:00 2001 From: groditi Date: Thu, 25 Oct 2007 23:39:00 +0000 Subject: oddities with create fixed, bug in reflector --- lib/Reaction/InterfaceModel/Reflector/DBIC.pm | 4 ++-- lib/Reaction/UI/CRUDController.pm | 1 + t/lib/RTest/TestDB/Bar.pm | 4 ++-- t/lib/RTest/TestDB/Baz.pm | 3 ++- t/lib/RTest/TestDB/Foo.pm | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/Reaction/InterfaceModel/Reflector/DBIC.pm b/lib/Reaction/InterfaceModel/Reflector/DBIC.pm index 326770f..dbfb351 100644 --- a/lib/Reaction/InterfaceModel/Reflector/DBIC.pm +++ b/lib/Reaction/InterfaceModel/Reflector/DBIC.pm @@ -33,7 +33,7 @@ class DBIC, which { implements build_collection_actions => as { {} }; implements build_default_object_actions => as { [ qw/Update Delete/ ] }; - implements build_default_collection_actions => as { [ 'Create' ] }; + implements build_default_collection_actions => as { [ qw/Create DeleteAll/ ] }; implements build_builtin_object_actions => as { { @@ -45,7 +45,7 @@ class DBIC, which { implements build_builtin_collection_actions => as { { Create => {name => 'Create', base => Create }, - DeleteAll => {name => 'DeleteAll', base => DeleteAll } + DeleteAll => {name => 'DeleteAll', base => DeleteAll, attributes => [] } }; }; diff --git a/lib/Reaction/UI/CRUDController.pm b/lib/Reaction/UI/CRUDController.pm index f416c93..1ff7d88 100644 --- a/lib/Reaction/UI/CRUDController.pm +++ b/lib/Reaction/UI/CRUDController.pm @@ -53,6 +53,7 @@ sub base :Action :CaptureArgs(0) { my ($self, $c) = @_; } +#XXX candidate for futre optimization sub get_collection { my ($self, $c) = @_; my $model = $c->model( $self->model_name ); diff --git a/t/lib/RTest/TestDB/Bar.pm b/t/lib/RTest/TestDB/Bar.pm index 1af3f05..88cf670 100644 --- a/t/lib/RTest/TestDB/Bar.pm +++ b/t/lib/RTest/TestDB/Bar.pm @@ -31,7 +31,7 @@ __PACKAGE__->belongs_to( { 'foreign.id' => 'self.foo_id' } ); -__PACKAGE__->meta->make_immutable; - +#__PACKAGE__->meta->make_immutable; +__PACKAGE__->meta->make_immutable(inline_constructor => 0); 1; diff --git a/t/lib/RTest/TestDB/Baz.pm b/t/lib/RTest/TestDB/Baz.pm index 47cc019..1ac88a7 100644 --- a/t/lib/RTest/TestDB/Baz.pm +++ b/t/lib/RTest/TestDB/Baz.pm @@ -26,6 +26,7 @@ __PACKAGE__->set_primary_key('id'); __PACKAGE__->has_many('links_to_foo_list' => 'RTest::TestDB::FooBaz', 'baz'); __PACKAGE__->many_to_many('foo_list' => 'links_to_foo_list' => 'foo'); -__PACKAGE__->meta->make_immutable; +#__PACKAGE__->meta->make_immutable; +__PACKAGE__->meta->make_immutable(inline_constructor => 0); 1; diff --git a/t/lib/RTest/TestDB/Foo.pm b/t/lib/RTest/TestDB/Foo.pm index 7e3cd2f..20d0305 100644 --- a/t/lib/RTest/TestDB/Foo.pm +++ b/t/lib/RTest/TestDB/Foo.pm @@ -40,6 +40,6 @@ __PACKAGE__->many_to_many('baz_list' => 'links_to_baz_list' => 'baz'); } -__PACKAGE__->meta->make_immutable; +__PACKAGE__->meta->make_immutable(inline_constructor => 0); 1; -- cgit v1.2.3-54-g00ecf