Added has_column and column_info methods
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / UUIDColumns.pm
index d45eac8..15d6826 100644 (file)
@@ -34,7 +34,7 @@ Note that the component needs to be loaded before Core.
 sub uuid_columns {
     my $self = shift;
     for (@_) {
-       die "column $_ doesn't exist" unless exists $self->_columns->{$_};
+       die "column $_ doesn't exist" unless $self->has_column($_);
     }
     $self->uuid_auto_columns(\@_);
 }
@@ -42,8 +42,8 @@ sub uuid_columns {
 sub insert {
     my ($self) = @_;
     for my $column (@{$self->uuid_auto_columns}) {
-       $self->$column( $self->get_uuid )
-           unless defined $self->$column;
+       $self->store_column( $column, $self->get_uuid )
+           unless defined $self->get_column( $column );
     }
     $self->NEXT::ACTUAL::insert;
 }