AutoUpdate, add_constructor, a toy set_sql emulator, object index stubs and destroy...
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat / Stringify.pm
diff --git a/lib/DBIx/Class/CDBICompat/Stringify.pm b/lib/DBIx/Class/CDBICompat/Stringify.pm
new file mode 100644 (file)
index 0000000..a3a4c28
--- /dev/null
@@ -0,0 +1,18 @@
+package DBIx::Class::CDBICompat::Stringify;
+
+use strict;
+use warnings;
+
+use overload
+  '""' => sub { shift->stringify_self };
+
+sub stringify_self {
+        my $self = shift;
+        #return (ref $self || $self) unless $self;    # empty PK
+        #return ref $self unless $self;
+        my @cols = $self->columns('Stringify');
+        #@cols = $self->primary_column unless @cols;
+        #return join "/", map { $self->get($_) } @cols;
+}
+
+1;