From: Daisuke Murase Date: Wed, 8 Mar 2006 00:52:32 +0000 (+0000) Subject: * added get_columns support on UTF8Columns X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e063fe2c4297c3a23b6ca27a2e2eae92ccba9739;p=dbsrgits%2FDBIx-Class-Historic.git * added get_columns support on UTF8Columns * added contributer --- diff --git a/lib/DBIx/Class.pm b/lib/DBIx/Class.pm index e638295..e5015e7 100644 --- a/lib/DBIx/Class.pm +++ b/lib/DBIx/Class.pm @@ -170,6 +170,8 @@ Robert Sedlacek Justin Guenther +Daisuke Murase + =head1 LICENSE You may distribute this code under the same terms as Perl itself. diff --git a/lib/DBIx/Class/UTF8Columns.pm b/lib/DBIx/Class/UTF8Columns.pm index d5a37df..71c1013 100644 --- a/lib/DBIx/Class/UTF8Columns.pm +++ b/lib/DBIx/Class/UTF8Columns.pm @@ -61,6 +61,21 @@ sub get_column { $value; } +=head2 get_columns + +=cut + +sub get_columns { + my $self = shift; + my %data = $self->next::method(@_); + + for (@{ $self->force_utf8_columns }) { + Encode::_utf8_on($data{$_}) if $data{$_} and !Encode::is_utf8($_); + } + + %data; +} + =head2 store_column =cut