Centralize all user-side rsrc calls to go through result_source()
[dbsrgits/DBIx-Class-Historic.git] / lib / DBIx / Class / UTF8Columns.pm
index 52df664..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
 
@@ -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 {
@@ -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