[Bast-commits] r9909 - in DBIx-Class-DynamicDefault/1.000/trunk: .
lib/DBIx/Class
matthewt at dev.catalyst.perl.org
matthewt at dev.catalyst.perl.org
Sat Apr 14 09:19:02 GMT 2012
Author: matthewt
Date: 2012-04-14 09:19:02 +0000 (Sat, 14 Apr 2012)
New Revision: 9909
Modified:
DBIx-Class-DynamicDefault/1.000/trunk/Changes
DBIx-Class-DynamicDefault/1.000/trunk/Makefile.PL
DBIx-Class-DynamicDefault/1.000/trunk/lib/DBIx/Class/DynamicDefault.pm
Log:
ow. ow. ow. ow. much faster now.
Modified: DBIx-Class-DynamicDefault/1.000/trunk/Changes
===================================================================
--- DBIx-Class-DynamicDefault/1.000/trunk/Changes 2011-12-21 01:24:28 UTC (rev 9908)
+++ DBIx-Class-DynamicDefault/1.000/trunk/Changes 2012-04-14 09:19:02 UTC (rev 9909)
@@ -1,3 +1,9 @@
+0.04 Sat, 14 Apr 2012 10:09:00 +0100
+ Matt S Trout:
+ Fix a massive pessimisation causing repeated ->result_source_instance
+ invocations resulting in get_inherited from C::A::Grouped being the
+ biggest thing in a startup profile.
+
0.03 Thu, 11 Sep 2008 18:42:48 +0200
Florian Ragwitz (1):
Require DBIx::Class >= 0.08009.
Modified: DBIx-Class-DynamicDefault/1.000/trunk/Makefile.PL
===================================================================
--- DBIx-Class-DynamicDefault/1.000/trunk/Makefile.PL 2011-12-21 01:24:28 UTC (rev 9908)
+++ DBIx-Class-DynamicDefault/1.000/trunk/Makefile.PL 2012-04-14 09:19:02 UTC (rev 9909)
@@ -5,8 +5,7 @@
name 'DBIx-Class-DynamicDefault';
all_from 'lib/DBIx/Class/DynamicDefault.pm';
-requires 'DBIx::Class' => '0.08009';
-requires 'parent';
+requires 'DBIx::Class' => '0.08127';
build_requires 'DBICx::TestDatabase';
Modified: DBIx-Class-DynamicDefault/1.000/trunk/lib/DBIx/Class/DynamicDefault.pm
===================================================================
--- DBIx-Class-DynamicDefault/1.000/trunk/lib/DBIx/Class/DynamicDefault.pm 2011-12-21 01:24:28 UTC (rev 9908)
+++ DBIx-Class-DynamicDefault/1.000/trunk/lib/DBIx/Class/DynamicDefault.pm 2012-04-14 09:19:02 UTC (rev 9909)
@@ -3,10 +3,12 @@
package DBIx::Class::DynamicDefault;
-use parent 'DBIx::Class';
+use base 'DBIx::Class';
-our $VERSION = '0.03';
+our $VERSION = '0.04';
+$VERSION = eval $VERSION;
+
__PACKAGE__->mk_classdata(
__column_dynamic_default_triggers => {
on_update => [], on_create => [],
@@ -59,9 +61,13 @@
my @update_columns;
my @create_columns;
- for my $column ($self->columns) {
- my $info = $self->column_info($column);
+ my $source = $self->result_source_instance;
+ my $col_info = $source->columns_info;
+
+ for my $column (keys %$col_info) {
+ my $info = $col_info->{$column};
+
my $update_trigger = $info->{dynamic_default_on_update};
push @update_columns, [$column => $update_trigger, $info->{always_update} || 0]
if $update_trigger;
More information about the Bast-commits
mailing list