More indirect call removals: the second part of 77c3a5dc
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / UTF8Columns.pm
index 793c1bc..38a4dd4 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
 
@@ -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_instance->has_column($col);
         }
         return $self->_utf8_columns({ map { $_ => 1 } @_ });
     } else {