From: Peter Rabbitson Date: Thu, 20 Aug 2009 06:19:07 +0000 (+0000) Subject: Apply pod patch by arthas (slightly modified) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9c71b5e27a7a1c8e9c4cfc03bc9c29b5b1b655af;p=dbsrgits%2FDBIx-Class-Historic.git Apply pod patch by arthas (slightly modified) --- diff --git a/lib/DBIx/Class/InflateColumn/DateTime.pm b/lib/DBIx/Class/InflateColumn/DateTime.pm index 7e50807..a7a13a6 100644 --- a/lib/DBIx/Class/InflateColumn/DateTime.pm +++ b/lib/DBIx/Class/InflateColumn/DateTime.pm @@ -18,6 +18,7 @@ columns to be of the datetime, timestamp or date datatype. __PACKAGE__->load_components(qw/InflateColumn::DateTime Core/); __PACKAGE__->add_columns( starts_when => { data_type => 'datetime' } + create_date => { data_type => 'date' } ); NOTE: You B load C B C. See @@ -69,6 +70,16 @@ one your code should continue to work without modification (though note that this feature is new as of 0.07, so it may not be perfect yet - bug reports to the list very much welcome). +If the data_type of a field is C, C or C (or +a derivative of these datatypes, e.g. C, this +module will automatically call the appropriate parse/format method for +deflation/inflation as defined in the storage class. For instance, for +a C field the methods C and C +would be called on deflation/inflation. If the storage class does not +provide a specialized inflator/deflator, C<[parse|format]_datetime> will +be used as a fallback. See L for more information on +date formatting. + For more help with using components, see L. =cut