add_relationship, relationship_info, relationships moved to ResultSource
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat / Stringify.pm
CommitLineData
a3018bd3 1package DBIx::Class::CDBICompat::Stringify;
2
3use strict;
4use warnings;
5
5d283305 6use Scalar::Util;
7
a3018bd3 8use overload
37df4bfe 9 '""' => sub { return shift->stringify_self; },
5d283305 10 fallback => 1;
a3018bd3 11
12sub stringify_self {
13 my $self = shift;
a3018bd3 14 my @cols = $self->columns('Stringify');
5d283305 15 @cols = $self->primary_column unless @cols;
2441e56f 16 my $ret = join "/", map { $self->get_column($_) || '' } @cols;
5d283305 17 return $ret || ref $self;
a3018bd3 18}
19
201;