From a5200252cbe43d0d240e75e95d9dfd1623975172 Mon Sep 17 00:00:00 2001 From: groditi Date: Fri, 5 Oct 2007 19:28:51 +0000 Subject: simplify value widgets to reduce PROCESS calls, make some classes immutable which were not before. nice increase in performance. --- t/lib/RTest/TestDB/Bar.pm | 3 +++ t/lib/RTest/TestDB/Baz.pm | 2 ++ t/lib/RTest/TestDB/Foo.pm | 3 +++ 3 files changed, 8 insertions(+) (limited to 't') diff --git a/t/lib/RTest/TestDB/Bar.pm b/t/lib/RTest/TestDB/Bar.pm index 4e22d06..1af3f05 100644 --- a/t/lib/RTest/TestDB/Bar.pm +++ b/t/lib/RTest/TestDB/Bar.pm @@ -31,4 +31,7 @@ __PACKAGE__->belongs_to( { 'foreign.id' => 'self.foo_id' } ); +__PACKAGE__->meta->make_immutable; + + 1; diff --git a/t/lib/RTest/TestDB/Baz.pm b/t/lib/RTest/TestDB/Baz.pm index 848cb4f..47cc019 100644 --- a/t/lib/RTest/TestDB/Baz.pm +++ b/t/lib/RTest/TestDB/Baz.pm @@ -26,4 +26,6 @@ __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; + 1; diff --git a/t/lib/RTest/TestDB/Foo.pm b/t/lib/RTest/TestDB/Foo.pm index 5733054..7e3cd2f 100644 --- a/t/lib/RTest/TestDB/Foo.pm +++ b/t/lib/RTest/TestDB/Foo.pm @@ -39,4 +39,7 @@ __PACKAGE__->many_to_many('baz_list' => 'links_to_baz_list' => 'baz'); *get_baz_list = sub { [ shift->baz_list->all ] }; } + +__PACKAGE__->meta->make_immutable; + 1; -- cgit v1.2.3-54-g00ecf