handle the throw_exception bit. Drop DBIx::Class::Exception
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / UUIDColumns.pm
index 63df67b..1873c90 100644 (file)
@@ -24,9 +24,7 @@ Note that the component needs to be loaded before Core.
 
 =head1 METHODS
 
-=over 4
-
-=item uuid_columns
+=head2 uuid_columns
 
 =cut
 
@@ -34,26 +32,24 @@ Note that the component needs to be loaded before Core.
 sub uuid_columns {
     my $self = shift;
     for (@_) {
-       die "column $_ doesn't exist" unless $self->has_column($_);
+       $self->throw_exception("column $_ doesn't exist") unless $self->has_column($_);
     }
     $self->uuid_auto_columns(\@_);
 }
 
 sub insert {
-    my ($self) = @_;
+    my $self = shift;
     for my $column (@{$self->uuid_auto_columns}) {
        $self->store_column( $column, $self->get_uuid )
            unless defined $self->get_column( $column );
     }
-    $self->next::method;
+    $self->next::method(@_);
 }
 
 sub get_uuid {
     return Data::UUID->new->to_string(Data::UUID->new->create),
 }
 
-=back
-
 =head1 AUTHORS
 
 Chia-liang Kao <clkao@clkao.org>