[Bast-commits] r7569 - in DBIx-Class/0.08/trunk/lib/DBIx/Class:
InflateColumn Serialize
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Fri Sep 4 19:32:02 GMT 2009
Author: ribasushi
Date: 2009-09-04 19:32:01 +0000 (Fri, 04 Sep 2009)
New Revision: 7569
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/InflateColumn/DateTime.pm
DBIx-Class/0.08/trunk/lib/DBIx/Class/Serialize/Storable.pm
Log:
Stop double-caching datetime_parser - keep it in the storage only
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/InflateColumn/DateTime.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/InflateColumn/DateTime.pm 2009-09-04 18:50:59 UTC (rev 7568)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/InflateColumn/DateTime.pm 2009-09-04 19:32:01 UTC (rev 7569)
@@ -86,8 +86,6 @@
__PACKAGE__->load_components(qw/InflateColumn/);
-__PACKAGE__->mk_group_accessors('simple' => '__datetime_parser');
-
=head2 register_column
Chains with the L<DBIx::Class::Row/register_column> method, and sets
@@ -224,12 +222,7 @@
}
sub _datetime_parser {
- my $self = shift;
- if (my $parser = $self->__datetime_parser) {
- return $parser;
- }
- my $parser = $self->result_source->storage->datetime_parser(@_);
- return $self->__datetime_parser($parser);
+ shift->result_source->storage->datetime_parser (@_);
}
1;
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Serialize/Storable.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Serialize/Storable.pm 2009-09-04 18:50:59 UTC (rev 7568)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Serialize/Storable.pm 2009-09-04 19:32:01 UTC (rev 7569)
@@ -11,11 +11,6 @@
# reattached in the thaw handler below
delete $to_serialize->{result_source};
- # If the parser is cached there is a chance that the interpeter
- # which receives the ice will not have the parser loaded
- # A re-determination will force an implicit load
- delete $to_serialize->{__datetime_parser};
-
# Dynamic values, easy to recalculate
delete $to_serialize->{$_} for qw/related_resultsets _inflated_column/;
More information about the Bast-commits
mailing list