X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FUUIDColumns.pm;h=efbe3d4912b504ac2516a720d9f75802f27f55a8;hb=e821dce9bc8a298173d04210bd7be5f43c91f540;hp=dca0c58d03e62fbf59352b352a4195d0cd915a99;hpb=130c64391b48bae9eb374e931c7d6c308625bf6b;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/UUIDColumns.pm b/lib/DBIx/Class/UUIDColumns.pm index dca0c58..efbe3d4 100644 --- a/lib/DBIx/Class/UUIDColumns.pm +++ b/lib/DBIx/Class/UUIDColumns.pm @@ -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 component resambles the behaviour of +This L component resembles the behaviour of L, 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 {