More indirect call removals: the second part of 77c3a5dc
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / InflateColumn.pm
index 3236b1c..08b1b54 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use base 'DBIx::Class::Row';
-use DBIx::Class::_Util 'is_literal_value';
+use SQL::Abstract 'is_literal_value';
 use namespace::clean;
 
 =head1 NAME
@@ -87,13 +87,13 @@ L<DBIx::Class::DateTime::Epoch>
 sub inflate_column {
   my ($self, $col, $attrs) = @_;
 
-  my $colinfo = $self->column_info($col);
+  my $colinfo = $self->result_source_instance->column_info($col);
 
   $self->throw_exception("InflateColumn can not be used on a column with a declared FilterColumn filter")
     if defined $colinfo->{_filter_info} and $self->isa('DBIx::Class::FilterColumn');
 
   $self->throw_exception("No such column $col to inflate")
-    unless $self->has_column($col);
+    unless $self->result_source_instance->has_column($col);
   $self->throw_exception("inflate_column needs attr hashref")
     unless ref $attrs eq 'HASH';
   $colinfo->{_inflate_info} = $attrs;
@@ -111,7 +111,7 @@ sub _inflated_column {
     is_literal_value($value) #that would be a not-yet-reloaded literal update
   );
 
-  my $info = $self->column_info($col)
+  my $info = $self->result_source->column_info($col)
     or $self->throw_exception("No column info for $col");
 
   return $value unless exists $info->{_inflate_info};
@@ -133,7 +133,7 @@ sub _deflated_column {
     is_literal_value($value)
   );
 
-  my $info = $self->column_info($col) or
+  my $info = $self->result_source->column_info($col) or
     $self->throw_exception("No column info for $col");
 
   return $value unless exists $info->{_inflate_info};
@@ -160,7 +160,7 @@ sub get_inflated_column {
   my ($self, $col) = @_;
 
   $self->throw_exception("$col is not an inflated column")
-    unless exists $self->column_info($col)->{_inflate_info};
+    unless exists $self->result_source->column_info($col)->{_inflate_info};
 
   # we take care of keeping things in sync
   return $self->{_inflated_column}{$col}
@@ -233,19 +233,16 @@ sub store_inflated_column {
 
 =back
 
-=head1 AUTHOR
+=head1 FURTHER QUESTIONS?
 
-Matt S. Trout <mst@shadowcatsystems.co.uk>
+Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
 
-=head1 CONTRIBUTORS
+=head1 COPYRIGHT AND LICENSE
 
-Daniel Westermann-Clark <danieltwc@cpan.org> (documentation)
-
-Jess Robinson <cpan@desert-island.demon.co.uk>
-
-=head1 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