storage fix for fork() and workaround for Apache::DBI
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / UUIDColumns.pm
index dca0c58..efbe3d4 100644 (file)
@@ -13,11 +13,11 @@ DBIx::Class::UUIDColumns - Implicit uuid columns
 
   pacakge Artist;
   __PACKAGE__->load_components(qw/UUIDColumns Core DB/);
-  __PACKAGE__->uuid_columns( 'artist_id' );x
+  __PACKAGE__->uuid_columns( 'artist_id' );
 
 =head1 DESCRIPTION
 
-This L<DBIx::Class> component resambles the behaviour of
+This L<DBIx::Class> component resembles the behaviour of
 L<Class::DBI::UUID>, to make some columns implicitly created as uuid.
 
 Note that the component needs to be loaded before Core.
@@ -32,18 +32,18 @@ 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 {