From: hakim Date: Fri, 9 Jul 2010 21:59:16 +0000 (+0100) Subject: Docpatch for ::FilterColumn (component loading) X-Git-Tag: v0.08124~116 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f10a2e9a5e117db8677b0df8afc5302290ce7ea4;p=dbsrgits%2FDBIx-Class.git Docpatch for ::FilterColumn (component loading) --- diff --git a/lib/DBIx/Class/FilterColumn.pm b/lib/DBIx/Class/FilterColumn.pm index 45b798c..3c3f04f 100644 --- a/lib/DBIx/Class/FilterColumn.pm +++ b/lib/DBIx/Class/FilterColumn.pm @@ -158,7 +158,12 @@ DBIx::Class::FilterColumn - Automatically convert column data =head1 SYNOPSIS - # In your result classes +In your Schema or DB class add "FilterColumn" to the top of the component list. + + __PACKAGE__->load_components(qw( FilterColumn ... )); + +Set up filters for the columns you want to convert. + __PACKAGE__->filter_column( money => { filter_to_storage => 'to_pennies', filter_from_storage => 'from_pennies', @@ -170,6 +175,7 @@ DBIx::Class::FilterColumn - Automatically convert column data 1; + =head1 DESCRIPTION This component is meant to be a more powerful, but less DWIM-y,