Remove the only use of the CAG 'inherited_ro_instance' group
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / UTF8Columns.pm
index a26dcdc..db571a6 100644 (file)
@@ -3,7 +3,7 @@ use strict;
 use warnings;
 use base qw/DBIx::Class/;
 
-__PACKAGE__->mk_classdata( '_utf8_columns' );
+__PACKAGE__->mk_group_accessors( inherited => '_utf8_columns' );
 
 =head1 NAME
 
@@ -44,7 +44,7 @@ L<get_columns|DBIx::Class::Row/get_columns>. As a result of this problem
 L<create|DBIx::Class::ResultSet/create> sends the original column values
 to the database, while L<update|DBIx::Class::ResultSet/update> sends the
 encoded values. L<DBIx::Class::UTF8Columns> and L<DBIx::Class::ForceUTF8>
-are both affected by ths bug.
+are both affected by this bug.
 
 It is unclear how this bug went undetected for so long (it was
 introduced in March 2006), No attempts to fix it will be made while the
@@ -94,7 +94,7 @@ sub utf8_columns {
     if (@_) {
         foreach my $col (@_) {
             $self->throw_exception("column $col doesn't exist")
-                unless $self->has_column($col);
+                unless $self->result_source->has_column($col);
         }
         return $self->_utf8_columns({ map { $_ => 1 } @_ });
     } else {
@@ -143,7 +143,7 @@ sub get_columns {
 sub store_column {
     my ( $self, $column, $value ) = @_;
 
-    # the dirtyness comparison must happen on the non-encoded value
+    # the dirtiness comparison must happen on the non-encoded value
     my $copy;
 
     if ( defined $value and $self->_is_utf8_column($column) and utf8::is_utf8($value) ) {
@@ -162,13 +162,16 @@ sub _is_utf8_column {
   return ($_[0]->utf8_columns || {})->{$_[1]};
 }
 
-=head1 AUTHORS
+=head1 FURTHER QUESTIONS?
 
-See L<DBIx::Class/CONTRIBUTORS>.
+Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
 
-=head1 LICENSE
+=head1 COPYRIGHT AND LICENSE
 
-You may distribute this code under the same terms as Perl itself.
+This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE>
+by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can
+redistribute it and/or modify it under the same terms as the
+L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.
 
 =cut